mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
A token having a turnmarker is now determined by a global setting, and not wether its a combatants turn
This commit is contained in:
parent
2a294684d4
commit
1fe1ec3dcb
8 changed files with 105 additions and 21 deletions
|
|
@ -16,6 +16,7 @@ import {
|
|||
DhVariantRuleSettings
|
||||
} from '../applications/settings/_module.mjs';
|
||||
import { CompendiumBrowserSettings } from '../data/_module.mjs';
|
||||
import SpotlightTracker from '../data/spotlightTracker.mjs';
|
||||
|
||||
export const registerDHSettings = () => {
|
||||
registerKeyBindings();
|
||||
|
|
@ -40,7 +41,12 @@ export const registerKeyBindings = () => {
|
|||
hint: game.i18n.localize('DAGGERHEART.SETTINGS.Keybindings.spotlight.hint'),
|
||||
uneditable: [],
|
||||
editable: [],
|
||||
onDown: game.system.api.macros.spotlightCombatant,
|
||||
onDown: () => {
|
||||
const selectedTokens = canvas.tokens.controlled.length > 0 ? canvas.tokens.controlled[0] : null;
|
||||
const hoveredTokens = game.canvas.tokens.hover ? game.canvas.tokens.hover : null;
|
||||
const tokens = selectedTokens ?? hoveredTokens;
|
||||
game.system.api.macros.spotlightCombatant(tokens);
|
||||
},
|
||||
onUp: () => {},
|
||||
restricted: true,
|
||||
reservedModifiers: [],
|
||||
|
|
@ -177,4 +183,10 @@ const registerNonConfigSettings = () => {
|
|||
config: false,
|
||||
type: CompendiumBrowserSettings
|
||||
});
|
||||
|
||||
game.settings.register(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.SpotlightTracker, {
|
||||
scope: 'world',
|
||||
config: false,
|
||||
type: SpotlightTracker
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue