fix: leave restored city shops safely
This commit is contained in:
@@ -327,8 +327,8 @@ export class CityStayScene extends Phaser.Scene {
|
||||
this.dialogueState = undefined;
|
||||
this.campaignObjectiveJournal?.destroy();
|
||||
this.campaignObjectiveJournal = undefined;
|
||||
this.closeChoicePanel(false);
|
||||
this.closeShop(false);
|
||||
this.closeChoicePanel(false, false);
|
||||
this.closeShop(false, false);
|
||||
releaseExplorationCharacterTextureKeys(
|
||||
this,
|
||||
this.characterTextureKeys()
|
||||
@@ -2593,8 +2593,13 @@ export class CityStayScene extends Phaser.Scene {
|
||||
this.time.now + inputCarryoverGuardMs;
|
||||
}
|
||||
|
||||
private closeChoicePanel(persistCheckpoint = true) {
|
||||
this.restoreActorDirection(this.choiceSourceNpcId);
|
||||
private closeChoicePanel(
|
||||
persistCheckpoint = true,
|
||||
updateInteractionPresentation = true
|
||||
) {
|
||||
if (updateInteractionPresentation) {
|
||||
this.restoreActorDirection(this.choiceSourceNpcId);
|
||||
}
|
||||
this.choicePanel?.destroy();
|
||||
this.choicePanel = undefined;
|
||||
this.choiceViews = [];
|
||||
@@ -2602,7 +2607,9 @@ export class CityStayScene extends Phaser.Scene {
|
||||
if (persistCheckpoint) {
|
||||
this.persistExplorationCheckpoint(true);
|
||||
}
|
||||
this.refreshInteractionPrompt();
|
||||
if (updateInteractionPresentation) {
|
||||
this.refreshInteractionPrompt();
|
||||
}
|
||||
}
|
||||
|
||||
private openShop(
|
||||
@@ -2955,8 +2962,13 @@ export class CityStayScene extends Phaser.Scene {
|
||||
return [graphics];
|
||||
}
|
||||
|
||||
private closeShop(persistCheckpoint = true) {
|
||||
this.restoreActorDirection(this.shopSourceNpcId);
|
||||
private closeShop(
|
||||
persistCheckpoint = true,
|
||||
updateInteractionPresentation = true
|
||||
) {
|
||||
if (updateInteractionPresentation) {
|
||||
this.restoreActorDirection(this.shopSourceNpcId);
|
||||
}
|
||||
this.shopPanel?.destroy();
|
||||
this.shopPanel = undefined;
|
||||
this.shopOfferViews = [];
|
||||
@@ -2965,7 +2977,9 @@ export class CityStayScene extends Phaser.Scene {
|
||||
if (persistCheckpoint) {
|
||||
this.persistExplorationCheckpoint(true);
|
||||
}
|
||||
this.refreshInteractionPrompt();
|
||||
if (updateInteractionPresentation) {
|
||||
this.refreshInteractionPrompt();
|
||||
}
|
||||
}
|
||||
|
||||
private itemBonusText(item: ReturnType<typeof getItem>) {
|
||||
|
||||
Reference in New Issue
Block a user