mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-24 08:23:38 +02:00
Compare commits
No commits in common. "94a2a5723b38015a6d4b8df5f3cc9733eff7bea8" and "a4fff56461a105bc5389a708f8c53ce4dd3aa115" have entirely different histories.
94a2a5723b
...
a4fff56461
10 changed files with 2 additions and 71 deletions
|
|
@ -3,7 +3,6 @@ import * as applications from './module/applications/_module.mjs';
|
|||
import * as data from './module/data/_module.mjs';
|
||||
import * as models from './module/data/_module.mjs';
|
||||
import * as documents from './module/documents/_module.mjs';
|
||||
import { macros } from './module/_module.mjs';
|
||||
import * as collections from './module/documents/collections/_module.mjs';
|
||||
import * as dice from './module/dice/_module.mjs';
|
||||
import * as fields from './module/data/fields/_module.mjs';
|
||||
|
|
@ -94,7 +93,6 @@ Hooks.once('init', () => {
|
|||
data,
|
||||
models,
|
||||
documents,
|
||||
macros,
|
||||
dice,
|
||||
fields
|
||||
};
|
||||
|
|
|
|||
14
lang/en.json
14
lang/en.json
|
|
@ -2486,14 +2486,6 @@
|
|||
"secondaryWeapon": "Secondary Weapon"
|
||||
}
|
||||
},
|
||||
"MACROS": {
|
||||
"Spotlight": {
|
||||
"errors": {
|
||||
"noActiveCombat": "There is no active encounter",
|
||||
"noCombatantSelected": "A combatant token must be either selected or hovered to spotlight it"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ROLLTABLES": {
|
||||
"FIELDS": {
|
||||
"formulaName": { "label": "Formula Name" }
|
||||
|
|
@ -2733,12 +2725,6 @@
|
|||
"setResourceIdentifier": "Set Resource Identifier"
|
||||
}
|
||||
},
|
||||
"Keybindings": {
|
||||
"spotlight": {
|
||||
"name": "Spotlight Combatant",
|
||||
"hint": "Move the spotlight to a hovered or selected token that's present in an active encounter"
|
||||
}
|
||||
},
|
||||
"Menu": {
|
||||
"title": "Daggerheart Game Settings",
|
||||
"automation": {
|
||||
|
|
|
|||
|
|
@ -7,4 +7,3 @@ export * as documents from './documents/_module.mjs';
|
|||
export * as enrichers from './enrichers/_module.mjs';
|
||||
export * as helpers from './helpers/_module.mjs';
|
||||
export * as systemRegistration from './systemRegistration/_module.mjs';
|
||||
export * as macros from './macros/_modules.mjs';
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ export default class DhEffectsDisplay extends HandlebarsApplicationMixin(Applica
|
|||
const effects = DhEffectsDisplay.getTokenEffects();
|
||||
const effect = effects.find(x => x.id === element.dataset.effectId);
|
||||
await effect.delete();
|
||||
this.render();
|
||||
}
|
||||
|
||||
setupHooks() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
export const keybindings = {
|
||||
spotlight: 'DHSpotlight'
|
||||
};
|
||||
|
||||
export const menu = {
|
||||
Automation: {
|
||||
Name: 'GameSettingsAutomation',
|
||||
|
|
|
|||
|
|
@ -29,18 +29,6 @@ export default class DhpActor extends Actor {
|
|||
return this.system.metadata.isNPC;
|
||||
}
|
||||
|
||||
prepareData() {
|
||||
super.prepareData();
|
||||
|
||||
// Update effects if it is the user's character or is controlled
|
||||
if (canvas.ready) {
|
||||
const controlled = canvas.tokens.controlled.some((t) => t.actor === this);
|
||||
if (game.user.character === this || controlled) {
|
||||
ui.effectsDisplay.render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @inheritDoc */
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
export { default as spotlightCombatant } from './spotlightCombatant.mjs';
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
/**
|
||||
* Spotlights a combatant.
|
||||
* The combatant can be selected in a number of ways. If many are applied at the same time, the following order is used:
|
||||
* 1) SelectedCombatant
|
||||
* 2) HoveredCombatant
|
||||
*/
|
||||
const spotlightCombatant = () => {
|
||||
if (!game.combat)
|
||||
return ui.notifications.error(game.i18n.localize('DAGGERHEART.MACROS.Spotlight.errors.noActiveCombat'));
|
||||
|
||||
const selectedCombatant = canvas.tokens.controlled.length > 0 ? canvas.tokens.controlled[0].combatant : null;
|
||||
const hoveredCombatant = game.canvas.tokens.hover?.combatant;
|
||||
|
||||
const combatant = selectedCombatant ?? hoveredCombatant;
|
||||
if (!combatant)
|
||||
return ui.notifications.error(game.i18n.localize('DAGGERHEART.MACROS.Spotlight.errors.noCombatantSelected'));
|
||||
|
||||
ui.combat.setCombatantSpotlight(combatant.id);
|
||||
};
|
||||
|
||||
export default spotlightCombatant;
|
||||
|
|
@ -18,7 +18,6 @@ import {
|
|||
import { CompendiumBrowserSettings, DhTagTeamRoll } from '../data/_module.mjs';
|
||||
|
||||
export const registerDHSettings = () => {
|
||||
registerKeyBindings();
|
||||
registerMenuSettings();
|
||||
registerMenus();
|
||||
registerNonConfigSettings();
|
||||
|
|
@ -34,20 +33,6 @@ export const registerDHSettings = () => {
|
|||
});
|
||||
};
|
||||
|
||||
export const registerKeyBindings = () => {
|
||||
game.keybindings.register(CONFIG.DH.id, CONFIG.DH.SETTINGS.keybindings.spotlight, {
|
||||
name: game.i18n.localize('DAGGERHEART.SETTINGS.Keybindings.spotlight.name'),
|
||||
hint: game.i18n.localize('DAGGERHEART.SETTINGS.Keybindings.spotlight.hint'),
|
||||
uneditable: [],
|
||||
editable: [],
|
||||
onDown: game.system.api.macros.spotlightCombatant,
|
||||
onUp: () => {},
|
||||
restricted: true,
|
||||
reservedModifiers: [],
|
||||
precedence: CONST.KEYBINDING_PRECEDENCE.NORMAL
|
||||
});
|
||||
};
|
||||
|
||||
const registerMenuSettings = () => {
|
||||
game.settings.register(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.variantRules, {
|
||||
scope: 'world',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"id": "daggerheart",
|
||||
"title": "Daggerheart",
|
||||
"description": "An unofficial implementation of the Daggerheart system",
|
||||
"version": "1.9.6",
|
||||
"version": "1.9.5",
|
||||
"compatibility": {
|
||||
"minimum": "13.346",
|
||||
"verified": "13.351",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue