mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Feature] 613 - Countdown Improvements (#1184)
* Added CountdownEdit view * Added countdowns UI element * . * Fixed migration of countdowns * . * . * style countdown interface, application and ownership dialog * fix buttons height in ownsership selection * . * Added coloured pips to UI cooldowns to signify player visibility if not every player has it * . * Added max-height and overflow * Sync countdown current with max when equal (#1221) * Update module/applications/ui/countdownEdit.mjs Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com> * . --------- Co-authored-by: moliloo <dev.murilobrito@gmail.com> Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
parent
07cdcf2d78
commit
906c7ac853
24 changed files with 1024 additions and 498 deletions
|
|
@ -25,6 +25,7 @@ export const GMUpdateEvent = {
|
|||
UpdateEffect: 'DhGMUpdateEffect',
|
||||
UpdateSetting: 'DhGMUpdateSetting',
|
||||
UpdateFear: 'DhGMUpdateFear',
|
||||
UpdateCountdowns: 'DhGMUpdateCountdowns',
|
||||
UpdateSaveMessage: 'DhGMUpdateSaveMessage'
|
||||
};
|
||||
|
||||
|
|
@ -60,6 +61,10 @@ export const registerSocketHooks = () => {
|
|||
)
|
||||
);
|
||||
break;
|
||||
case GMUpdateEvent.UpdateCountdowns:
|
||||
await game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Countdowns, data.update);
|
||||
Hooks.callAll(socketEvent.Refresh, { refreshType: RefreshType.Countdown });
|
||||
break;
|
||||
case GMUpdateEvent.UpdateSaveMessage:
|
||||
const action = await fromUuid(data.update.action),
|
||||
message = game.messages.get(data.update.message);
|
||||
|
|
@ -84,14 +89,15 @@ export const registerUserQueries = () => {
|
|||
CONFIG.queries.reactionRoll = game.system.api.fields.ActionFields.SaveField.rollSaveQuery;
|
||||
};
|
||||
|
||||
export const emitAsGM = async (eventName, callback, update, uuid = null) => {
|
||||
export const emitAsGM = async (eventName, callback, update, uuid = null, refresh = null) => {
|
||||
if (!game.user.isGM) {
|
||||
return await game.socket.emit(`system.${CONFIG.DH.id}`, {
|
||||
action: socketEvent.GMUpdate,
|
||||
data: {
|
||||
action: eventName,
|
||||
uuid,
|
||||
update
|
||||
update,
|
||||
refresh
|
||||
}
|
||||
});
|
||||
} else return callback(update);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue