-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from dmrickey/2.13.0.next
2.13.0.next
- Loading branch information
Showing
72 changed files
with
1,717 additions
and
618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div id="ckl-global-bonus-actor-disabled-container"> | ||
<h2>{{localize 'ckl-roll-bonuses.global-bonus.actor.disable'}}</h2> | ||
<p class="ckl-description">{{localize 'ckl-roll-bonuses.global-bonus.actor.description'}}</p> | ||
|
||
<div style="display:flex;flex-direction:column;"> | ||
{{#each settings }} | ||
<li class="form-group"> | ||
<label class="checkbox" {{#if checked}}style="text-decoration: line-through;"{{/if}}> | ||
<input type="checkbox" name="{{path}}" {{#if checked}}checked{{/if}}> | ||
{{label}} | ||
</label> | ||
</li> | ||
{{/each}} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<form class="ckl-auto-global-settings"> | ||
<p class="main-description">{{{localize "ckl-roll-bonuses.global-settings.application.description"}}}</p> | ||
<hr> | ||
|
||
<ul class="section-list"> | ||
{{#each sections}} | ||
<li class="section form-group"> | ||
<label> | ||
<input name="{{key}}" type="checkbox" {{#if value}}checked{{/if}} /> | ||
<span>{{label}}</span> | ||
</label> | ||
<div class="text"> | ||
<div class="description"> | ||
{{description}} | ||
</div> | ||
{{#if issues}} | ||
<div class="issues"> | ||
{{issues}} | ||
</div> | ||
{{/if}} | ||
</div> | ||
</li> | ||
<hr> | ||
{{/each}} | ||
</ul> | ||
<div class="form-group"> | ||
<button type="submit"> | ||
<i class="fas fa-save"></i> {{localize 'PF1.Save'}} | ||
</button> | ||
</div> | ||
</form> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
MANIFEST-000352 | ||
MANIFEST-000392 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
2024/07/13-10:45:30.831 2c54 Recovering log #350 | ||
2024/07/13-10:45:30.835 2c54 Delete type=0 #350 | ||
2024/07/13-10:45:30.835 2c54 Delete type=3 #348 | ||
2024/07/23-21:05:38.861 9524 Recovering log #390 | ||
2024/07/23-21:05:38.865 9524 Delete type=0 #390 | ||
2024/07/23-21:05:38.865 9524 Delete type=3 #388 | ||
2024/07/23-21:38:38.247 90f0 Level-0 table #395: started | ||
2024/07/23-21:38:38.247 90f0 Level-0 table #395: 0 bytes OK | ||
2024/07/23-21:38:38.248 90f0 Delete type=0 #393 | ||
2024/07/23-21:38:38.249 90f0 Manual compaction at level-0 from '!items!3p2PtsJOLjsF390z' @ 72057594037927935 : 1 .. '!items!UITO7TgwvXGWG1N7' @ 0 : 0; will stop at (end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
2024/07/13-10:43:39.321 5464 Recovering log #347 | ||
2024/07/13-10:43:39.324 5464 Delete type=0 #347 | ||
2024/07/13-10:43:39.324 5464 Delete type=3 #346 | ||
2024/07/13-10:44:41.842 776c Level-0 table #351: started | ||
2024/07/13-10:44:41.842 776c Level-0 table #351: 0 bytes OK | ||
2024/07/13-10:44:41.843 776c Delete type=0 #349 | ||
2024/07/13-10:44:41.845 776c Manual compaction at level-0 from '!items!3p2PtsJOLjsF390z' @ 72057594037927935 : 1 .. '!items!UITO7TgwvXGWG1N7' @ 0 : 0; will stop at (end) | ||
2024/07/23-09:27:48.928 a1cc Recovering log #386 | ||
2024/07/23-09:27:48.931 a1cc Delete type=0 #386 | ||
2024/07/23-09:27:48.931 a1cc Delete type=3 #384 | ||
2024/07/23-21:05:17.069 90f0 Level-0 table #391: started | ||
2024/07/23-21:05:17.069 90f0 Level-0 table #391: 0 bytes OK | ||
2024/07/23-21:05:17.070 90f0 Delete type=0 #389 | ||
2024/07/23-21:05:17.071 90f0 Manual compaction at level-0 from '!items!3p2PtsJOLjsF390z' @ 72057594037927935 : 1 .. '!items!UITO7TgwvXGWG1N7' @ 0 : 0; will stop at (end) |
Binary file not shown.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
MANIFEST-000294 | ||
MANIFEST-000336 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
2024/07/13-10:45:30.838 1a0 Recovering log #292 | ||
2024/07/13-10:45:30.841 1a0 Delete type=0 #292 | ||
2024/07/13-10:45:30.841 1a0 Delete type=3 #290 | ||
2024/07/23-21:05:38.868 a1cc Recovering log #333 | ||
2024/07/23-21:05:38.871 a1cc Delete type=0 #333 | ||
2024/07/23-21:05:38.871 a1cc Delete type=3 #331 | ||
2024/07/23-21:38:38.246 90f0 Level-0 table #339: started | ||
2024/07/23-21:38:38.246 90f0 Level-0 table #339: 0 bytes OK | ||
2024/07/23-21:38:38.247 90f0 Delete type=0 #337 | ||
2024/07/23-21:38:38.249 90f0 Manual compaction at level-0 from '!journal!FrG2K3YAM1jdSxcC' @ 72057594037927935 : 1 .. '!journal.pages!FrG2K3YAM1jdSxcC.zHKvVEnQ3jAyUiKn' @ 0 : 0; will stop at (end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
2024/07/13-10:43:39.328 7180 Recovering log #289 | ||
2024/07/13-10:43:39.331 7180 Delete type=0 #289 | ||
2024/07/13-10:43:39.331 7180 Delete type=3 #288 | ||
2024/07/13-10:44:41.843 776c Level-0 table #293: started | ||
2024/07/13-10:44:41.843 776c Level-0 table #293: 0 bytes OK | ||
2024/07/13-10:44:41.844 776c Delete type=0 #291 | ||
2024/07/13-10:44:41.845 776c Manual compaction at level-0 from '!journal!FrG2K3YAM1jdSxcC' @ 72057594037927935 : 1 .. '!journal.pages!FrG2K3YAM1jdSxcC.zHKvVEnQ3jAyUiKn' @ 0 : 0; will stop at (end) | ||
2024/07/23-09:27:48.935 9734 Recovering log #329 | ||
2024/07/23-09:27:48.938 9734 Delete type=0 #329 | ||
2024/07/23-09:27:48.938 9734 Delete type=3 #327 | ||
2024/07/23-21:05:17.074 90f0 Level-0 table #334: started | ||
2024/07/23-21:05:17.083 90f0 Level-0 table #334: 632545 bytes OK | ||
2024/07/23-21:05:17.085 90f0 Delete type=0 #332 | ||
2024/07/23-21:05:17.086 90f0 Manual compaction at level-0 from '!journal!FrG2K3YAM1jdSxcC' @ 72057594037927935 : 1 .. '!journal.pages!FrG2K3YAM1jdSxcC.zHKvVEnQ3jAyUiKn' @ 0 : 0; will stop at '!journal.pages!FrG2K3YAM1jdSxcC.zHKvVEnQ3jAyUiKn' @ 2441 : 1 | ||
2024/07/23-21:05:17.086 90f0 Compacting 1@0 + 1@1 files | ||
2024/07/23-21:05:17.090 90f0 Generated table #335@0: 10 keys, 40296 bytes | ||
2024/07/23-21:05:17.090 90f0 Compacted 1@0 + 1@1 files => 40296 bytes | ||
2024/07/23-21:05:17.091 90f0 compacted to: files[ 0 1 0 0 0 0 0 ] | ||
2024/07/23-21:05:17.091 90f0 Delete type=2 #324 | ||
2024/07/23-21:05:17.092 90f0 Delete type=2 #334 | ||
2024/07/23-21:05:17.092 90f0 Manual compaction at level-0 from '!journal.pages!FrG2K3YAM1jdSxcC.zHKvVEnQ3jAyUiKn' @ 2441 : 1 .. '!journal.pages!FrG2K3YAM1jdSxcC.zHKvVEnQ3jAyUiKn' @ 0 : 0; will stop at (end) |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { MODULE_NAME } from '../consts.mjs'; | ||
import { addGlobalBonusDisablerToActor } from '../handlebars-handlers/global-bonuses/add-global-bonus-disabler-to-actor.mjs'; | ||
import { api } from '../util/api.mjs'; | ||
import { LocalHookHandler, localHooks } from '../util/hooks.mjs'; | ||
import { GlobalBonusSettings } from '../util/settings.mjs'; | ||
import { BaseGlobalBonus } from './base-global-bonus.mjs'; | ||
|
||
export class GlobalBonuses { | ||
/** | ||
* @param {typeof BaseGlobalBonus} bonus | ||
*/ | ||
static registerBonus(bonus) { | ||
GlobalBonuses.allBonuses.push(bonus); | ||
GlobalBonusSettings.registerKey(bonus); | ||
Hooks.once('i18nInit', () => { | ||
if (GlobalBonusSettings.setting(bonus.key)) { | ||
bonus.registerBonuses(); | ||
} | ||
}); | ||
|
||
api.globalTypeMap[bonus.key] = bonus; | ||
} | ||
|
||
/** | ||
* @type {Array<typeof BaseGlobalBonus>}} | ||
*/ | ||
static allBonuses = []; | ||
} | ||
|
||
/** | ||
* @param {ItemAction} action | ||
* @param {RollData} rollData | ||
*/ | ||
function initRollData(action, rollData) { | ||
GlobalBonuses.allBonuses.forEach((bonus) => { | ||
const { actor } = action; | ||
if (bonus.isDisabled() || bonus.isDisabledForActor(actor)) { | ||
return; | ||
} | ||
|
||
bonus.initRollData(action, rollData); | ||
}); | ||
} | ||
LocalHookHandler.registerHandler(localHooks.initItemActionRollData, initRollData); | ||
|
||
Hooks.on('renderActorSheet', ( | ||
/** @type {ActorSheetPF} */ { actor, isEditable }, | ||
/** @type {[HTMLElement]} */[html], | ||
/** @type {unknown} */ _data | ||
) => { | ||
const bonuses = GlobalBonuses.allBonuses | ||
.filter((b) => !b.isDisabled()); | ||
const settings = bonuses.map((b) => ({ | ||
checked: b.isDisabledForActor(actor), | ||
journal: `journal - ${b.key}`, // TODO | ||
label: b.label, | ||
path: `flags.${MODULE_NAME}.${b.actorDisabledFlag}`, | ||
})); | ||
|
||
addGlobalBonusDisablerToActor(html, settings, isEditable); | ||
}); |
Oops, something went wrong.