Skip to content

Commit

Permalink
#2581 Speedrun required NPCs no longer show up on explore pages at all.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wotuu committed Oct 21, 2024
1 parent 6150728 commit 0d00227
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions resources/assets/js/custom/dungeonmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,12 @@ class DungeonMap extends Signalable {
mapControls.push(new DrawControls(this, editableLayers));
}

let state = getState();
let mapContext = state.getMapContext();

// Only when enemy forces are relevant in their display (not in a view)
if (!getState().isMapAdmin()) {
if (getState().getMapContext().isDungeonSpeedrunEnabled()) {
if (!state.isMapAdmin() && !(mapContext instanceof MapContextDungeonExplore)) {
if (mapContext.isDungeonSpeedrunEnabled()) {
mapControls.push(new DungeonSpeedrunRequiredNpcsControls(this));
} else if (this.options.showControls.enemyForces) {
mapControls.push(new EnemyForcesControls(this));
Expand All @@ -571,12 +574,12 @@ class DungeonMap extends Signalable {
}

if (this.options.edit &&
getState().getMapContext().getDungeon().key === DUNGEON_SIEGE_OF_BORALUS ||
getState().getMapContext().getDungeon().key === DUNGEON_THE_NEXUS) {
mapContext.getDungeon().key === DUNGEON_SIEGE_OF_BORALUS ||
mapContext.getDungeon().key === DUNGEON_THE_NEXUS) {
mapControls.push(new FactionDisplayControls(this));
}

if (getState().isEchoEnabled()) {
if (state.isEchoEnabled()) {
mapControls.push(new EchoControls(this));
}

Expand Down

0 comments on commit 0d00227

Please sign in to comment.