mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
284 - Armor/Weapon Feature Improvements (#292)
* Added parsing of effect values from Item data model. Almost finished with itemConfig. * Added the last to itemConfig * Fixed armor * ContextMenu localization fixes * Better tooltips for tagify * Corrected resource logic
This commit is contained in:
parent
eae4f12910
commit
b3e7c6b9b2
51 changed files with 3043 additions and 2310 deletions
|
|
@ -45,7 +45,13 @@ export const registerSocketHooks = () => {
|
|||
await game.settings.set(
|
||||
CONFIG.DH.id,
|
||||
CONFIG.DH.SETTINGS.gameSettings.Resources.Fear,
|
||||
Math.max(0, Math.min(game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).maxFear, data.update))
|
||||
Math.max(
|
||||
0,
|
||||
Math.min(
|
||||
game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).maxFear,
|
||||
data.update
|
||||
)
|
||||
)
|
||||
);
|
||||
/* Hooks.callAll(socketEvent.DhpFearUpdate);
|
||||
await game.socket.emit(`system.${CONFIG.DH.id}`, { action: socketEvent.DhpFearUpdate }); */
|
||||
|
|
@ -64,7 +70,7 @@ export const registerSocketHooks = () => {
|
|||
};
|
||||
|
||||
export const emitAsGM = async (eventName, callback, update, uuid = null) => {
|
||||
if(!game.user.isGM) {
|
||||
if (!game.user.isGM) {
|
||||
return await game.socket.emit(`system.${CONFIG.DH.id}`, {
|
||||
action: socketEvent.GMUpdate,
|
||||
data: {
|
||||
|
|
@ -74,11 +80,11 @@ export const emitAsGM = async (eventName, callback, update, uuid = null) => {
|
|||
}
|
||||
});
|
||||
} else return callback(update);
|
||||
}
|
||||
};
|
||||
|
||||
export const emitAsOwner = (eventName, userId, args) => {
|
||||
if(userId === game.user.id) return;
|
||||
if(!eventName || !userId) return false;
|
||||
if (userId === game.user.id) return;
|
||||
if (!eventName || !userId) return false;
|
||||
game.socket.emit(`system.${CONFIG.DH.id}`, {
|
||||
action: eventName,
|
||||
data: {
|
||||
|
|
@ -87,4 +93,4 @@ export const emitAsOwner = (eventName, userId, args) => {
|
|||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue