Skip to content

Commit

Permalink
[qa] fix autoplay expedition (small old code fixes)
Browse files Browse the repository at this point in the history
  • Loading branch information
nroutasuo committed Aug 9, 2022
1 parent 34700ed commit a2f386b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/game/systems/AutoPlaySystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ define(['ash',
var nearestCampLevel = GameGlobals.playerActionFunctions.nearestCampNodes.head ? GameGlobals.playerActionFunctions.nearestCampNodes.head.entity.get(PositionComponent).level : -100;
if (wasExploring && nearestCampLevel > -100) {
// this.logStep("enter camp " + nearestCampLevel);
let nearestCampOrdinal = GameGlobals.gameState.getCampOrdinal(nearestCampLevel);
autoPlayComponent.setExploreObjective(null, null, null);
GameGlobals.playerActionFunctions.moveToCamp(nearestCampLevel);
GameGlobals.playerActionFunctions.moveToCamp(nearestCampOrdinal);
GameGlobals.uiFunctions.showTab(GameGlobals.uiFunctions.elementIDs.tabs.in);
} else {
// this.logStep("leave camp");
Expand Down Expand Up @@ -429,7 +430,8 @@ define(['ash',
}

if (nextCamp) {
GameGlobals.playerActionFunctions.moveToCamp(nextCamp.position.level);
let campLevel = nextCamp.position.level;
GameGlobals.playerActionFunctions.moveToCamp(GameGlobals.gameState.getCampOrdinal(campLevel));
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/game/systems/CheatSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ define(['ash',
if (isExpedition) {
component.isPendingExploring = true;
component.isExpedition = true;
component.autoExploratioVO.limitToCurrentLevel = true;
component.explorationVO.limitToCurrentLevel = true;
}
this.playerStatsNodes.head.entity.add(component);
}
Expand Down

0 comments on commit a2f386b

Please sign in to comment.