Add disabling of return to camp button when already at the camp or the camp has yet to be unlocked. Release Build 7644.

This commit is contained in:
2024-02-27 04:01:05 -06:00
parent 53b5c1f967
commit e8ac5a957f
7 changed files with 27 additions and 28 deletions
+7 -1
View File
@@ -43,6 +43,8 @@ All rights reserved.
#include "VisualNovel.h"
#include "State_OverworldMap.h"
#include "GameEvent.h"
#include "MenuComponent.h"
#include "Unlock.h"
INCLUDE_MONSTER_LIST
INCLUDE_game
@@ -73,7 +75,11 @@ void State_GameRun::OnStateChange(GameState*prevState){
game->LoadLevel(State_OverworldMap::GetCurrentConnectionPoint().map);
}
void State_GameRun::OnLevelLoad(){}
void State_GameRun::OnLevelLoad(){
Component<MenuComponent>(MenuType::PAUSE,"Return to Camp Button")->SetGrayedOut(
!Unlock::IsUnlocked("HUB")||game->GetCurrentMapName()=="HUB"
);
}
void State_GameRun::OnUserUpdate(AiL*game){
game->bossDisplayTimer=std::max(0.f,game->bossDisplayTimer-game->GetElapsedTime());
if(game->encounterStarted&&game->totalBossEncounterMobs>0){