Synced "Gm Monitor" with actor updates
This commit is contained in:
@@ -186,7 +186,18 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
if (formData["data.description"]) {
|
||||
formData["data.description"] = game.l5r5e.HelpersL5r5e.convertSymbols(formData["data.description"], true);
|
||||
}
|
||||
return super._updateObject(event, formData);
|
||||
|
||||
return super._updateObject(event, formData).then(() => {
|
||||
// Notify the "Gm Monitor" if this actor is watched
|
||||
if (game.settings.get("l5r5e", "gm-monitor-actors").find((e) => e === this.actor.id)) {
|
||||
game.l5r5e.sockets.refreshAppId("l5r5e-gm-monitor");
|
||||
if (game.user.isGM) {
|
||||
Object.values(ui.windows)
|
||||
.find((e) => e.id === "l5r5e-gm-monitor")
|
||||
?.refresh();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user