mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
* Added prettier with automatic useage on pre-commit to avoid style breakage * Ran Prettier on the project
20 lines
561 B
JavaScript
20 lines
561 B
JavaScript
export function handleSocketEvent({ action = null, data = {} } = {}) {
|
|
switch (action) {
|
|
case socketEvent.GMUpdate:
|
|
Hooks.callAll(socketEvent.GMUpdate, data.action, data.uuid, data.update);
|
|
break;
|
|
case socketEvent.DhpFearUpdate:
|
|
Hooks.callAll(socketEvent.DhpFearUpdate);
|
|
break;
|
|
}
|
|
}
|
|
|
|
export const socketEvent = {
|
|
GMUpdate: 'DhpGMUpdate',
|
|
DhpFearUpdate: 'DhpFearUpdate'
|
|
};
|
|
|
|
export const GMUpdateEvent = {
|
|
UpdateDocument: 'DhpGMUpdateDocument',
|
|
UpdateFear: 'DhpUpdateFear'
|
|
};
|