mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-05 20:34:15 +02:00
Fixed linting
This commit is contained in:
parent
091c8527d6
commit
d40ee35f92
2 changed files with 23 additions and 25 deletions
|
|
@ -267,39 +267,37 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
|||
levels: level ? [level.id] : [],
|
||||
shapes: [shapeData],
|
||||
restriction: { enabled: false, type: 'move', priority: 0 },
|
||||
behaviors: effects.length > 0 ? [
|
||||
{
|
||||
name: game.i18n.localize('TYPES.RegionBehavior.applyActiveEffect'),
|
||||
type: 'applyActiveEffect',
|
||||
system: {
|
||||
effects: effects
|
||||
}
|
||||
}] : [],
|
||||
behaviors:
|
||||
effects.length > 0
|
||||
? [
|
||||
{
|
||||
name: game.i18n.localize('TYPES.RegionBehavior.applyActiveEffect'),
|
||||
type: 'applyActiveEffect',
|
||||
system: {
|
||||
effects: effects
|
||||
}
|
||||
}
|
||||
]
|
||||
: [],
|
||||
displayMeasurements: true,
|
||||
locked: false,
|
||||
ownership: { default: CONST.DOCUMENT_OWNERSHIP_LEVELS.NONE },
|
||||
visibility: CONST.REGION_VISIBILITY.ALWAYS
|
||||
};
|
||||
const placeRegion = (data) => {
|
||||
canvas.regions.placeRegion(
|
||||
data,
|
||||
{ create: true }
|
||||
);
|
||||
const placeRegion = data => {
|
||||
canvas.regions.placeRegion(data, { create: true });
|
||||
};
|
||||
|
||||
const needsGMExecution = effects.length > 0;
|
||||
|
||||
if (needsGMExecution && !game.user.isGM) {
|
||||
if (!game.users.activeGM)
|
||||
return ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.behaviorRegionRequiresGM'));
|
||||
return ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.UI.Notifications.behaviorRegionRequiresGM')
|
||||
);
|
||||
|
||||
const region = await canvas.regions.placeRegion(regionData, { create: false });
|
||||
emitGMCreate(
|
||||
'Region',
|
||||
placeRegion,
|
||||
region,
|
||||
scene.id,
|
||||
);
|
||||
emitGMCreate('Region', placeRegion, region, scene.id);
|
||||
} else {
|
||||
placeRegion(regionData);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const GMUpdateEvent = {
|
|||
UpdateSetting: 'DhGMUpdateSetting',
|
||||
UpdateFear: 'DhGMUpdateFear',
|
||||
UpdateCountdowns: 'DhGMUpdateCountdowns',
|
||||
UpdateSaveMessage: 'DhGMUpdateSaveMessage',
|
||||
UpdateSaveMessage: 'DhGMUpdateSaveMessage'
|
||||
};
|
||||
|
||||
export const RefreshType = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue