mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
.
This commit is contained in:
parent
0cb7ede933
commit
e920f00957
1 changed files with 15 additions and 32 deletions
|
|
@ -259,39 +259,22 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
||||||
selectedArea = this.system.action.area[0];
|
selectedArea = this.system.action.area[0];
|
||||||
else if(this.system.action.area.length > 1) {
|
else if(this.system.action.area.length > 1) {
|
||||||
/* Pop a selection. Possibly a context menu? */
|
/* Pop a selection. Possibly a context menu? */
|
||||||
new foundry.applications.ux.ContextMenu.implementation(
|
// new foundry.applications.ux.ContextMenu.implementation(
|
||||||
event.target,
|
// event.target,
|
||||||
'.scene-environment',
|
// '.scene-environment',
|
||||||
this.system.action.area.map((area, index) => ({
|
// this.system.action.area.map((area, index) => ({
|
||||||
name: index,
|
// name: index,
|
||||||
callback: () => {
|
// callback: () => {
|
||||||
if (scene.flags.daggerheart.sceneEnvironments[0] !== environment.uuid) {
|
|
||||||
const newEnvironments = scene.flags.daggerheart.sceneEnvironments;
|
// }
|
||||||
const newFirst = newEnvironments.splice(
|
// })),
|
||||||
newEnvironments.findIndex(x => x === environment.uuid),
|
// {
|
||||||
1
|
// jQuery: false,
|
||||||
)[0];
|
// fixed: true
|
||||||
newEnvironments.unshift(newFirst);
|
// }
|
||||||
emitAsGM(
|
// );
|
||||||
GMUpdateEvent.UpdateDocument,
|
|
||||||
scene.update.bind(scene),
|
|
||||||
{ 'flags.daggerheart.sceneEnvironments': newEnvironments },
|
|
||||||
scene.uuid
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
environment.sheet.render({ force: true });
|
|
||||||
}
|
|
||||||
})),
|
|
||||||
{
|
|
||||||
jQuery: false,
|
|
||||||
fixed: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
CONFIG.ux.ContextMenu.triggerContextMenu(event, '.scene-environment');
|
|
||||||
|
|
||||||
|
|
||||||
|
// CONFIG.ux.ContextMenu.triggerContextMenu(event, '.scene-environment');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!selectedArea) return;
|
if(!selectedArea) return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue