From 2c2910c4e99dcea37582585353794d14df194c27 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 22 Oct 2023 00:32:46 +1100 Subject: [PATCH] Added comments --- src/ui/interface.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/interface.js b/src/ui/interface.js index ca838832d..6d0d1c124 100644 --- a/src/ui/interface.js +++ b/src/ui/interface.js @@ -949,7 +949,9 @@ export class UI { if (activeCreature.player.getNbrOfCreatures() > game.creaLimitNbr) { $j('#materialize_button p').text(game.msg.ui.dash.materializeOverload); - } else if ( + } + // Check if the player is viewing the wrong tab + else if ( activeCreature.player.id !== player && activeCreature.isDarkPriest() && activeCreature.abilities[3].testRequirements() && @@ -957,6 +959,7 @@ export class UI { ) { $j('#materialize_button p').text(game.msg.ui.dash.wrongPlayer); + // Switch to turn player's dark priest this.materializeButton.click = () => { this.showCreature("--", activeCreature.player.id); };