Add tutorial task for Artificer introduction in camp. Release Build 11362.

pull/65/head
sigonasr2 4 months ago
parent 517f81c03f
commit ef5239657d
  1. 12
      Adventures in Lestoria/NPC.cpp
  2. 2
      Adventures in Lestoria/SaveFile.cpp
  3. 4
      Adventures in Lestoria/State_GameHub.cpp
  4. 14
      Adventures in Lestoria/Tutorial.h
  5. 2
      Adventures in Lestoria/Version.h
  6. BIN
      x64/Release/Adventures in Lestoria.exe

@ -86,17 +86,17 @@ void Monster::STRATEGY::NPC(Monster&m,float fElapsedTime,std::string strategy){
Menu::OpenMenu(MenuType::MERCHANT);
}else
if(m.npcData.function=="Artificer"){
bool locked=!Unlock::IsUnlocked("NPCs.Artificer.Enchant Crafting Unlock Condition"_S);
std::string enchantButtonLabel="Enchant";
if(locked)enchantButtonLabel="???";
Component<MenuComponent>(ARTIFICER,"Enchant Button")->SetGrayedOut(locked);
Component<MenuComponent>(ARTIFICER,"Enchant Button")->SetLabel(enchantButtonLabel);
if(!Tutorial::TaskIsComplete(TutorialTaskName::ARTIFICER_INTRO)){
Tutorial::CompleteTask(TutorialTaskName::ARTIFICER_INTRO);
VisualNovel::LoadDialog("ARTIFICER_INTRO",[](){Menu::OpenMenu(MenuType::ARTIFICER);});
}else{
Menu::OpenMenu(MenuType::ARTIFICER);
bool locked=!Unlock::IsUnlocked("NPCs.Artificer.Enchant Crafting Unlock Condition"_S);
std::string enchantButtonLabel="Enchant";
if(locked)enchantButtonLabel="???";
Component<MenuComponent>(ARTIFICER,"Enchant Button")->SetGrayedOut(locked);
Component<MenuComponent>(ARTIFICER,"Enchant Button")->SetLabel(enchantButtonLabel);
}
}
}

@ -332,7 +332,7 @@ void SaveFile::LoadFile(){
if(std::filesystem::exists(loadFilename)){
utils::datafile::Read(loadFile,"save_file_path"_S+std::format("save.{:04}",saveFileID));
if(HASH_VERIFICATION_REQUIRED){
if(!ADMIN_MODE&&HASH_VERIFICATION_REQUIRED){
if(!loadFile.HasProperty("Hash")){
LOG(std::format("WARNING! Filehash for file {} does not exist!","save_file_path"_S+std::format("save.{:04}",saveFileID)));
return;

@ -59,6 +59,10 @@ void State_GameHub::OnStateChange(GameState*prevState){
if(Unlock::IsUnlocked("STORY_1_2")&&!Tutorial::TaskIsComplete(TutorialTaskName::BLACKSMITH)){
Tutorial::SetNextTask(TutorialTaskName::BLACKSMITH);
}
else
if(Unlock::IsUnlocked("BOSS_2_B")&&!Tutorial::TaskIsComplete(TutorialTaskName::ARTIFICER_INTRO)){
Tutorial::SetNextTask(TutorialTaskName::ARTIFICER_INTRO);
}
SaveFile::SaveGame();

@ -362,8 +362,20 @@ class ArtificerIntroductionTask:public TutorialTask{
public:
inline ArtificerIntroductionTask():TutorialTask(){};
private:
virtual inline void OnActivate()override final{
Component<MenuComponent>(SHERMAN,"Leave Button")->SetGrayedOut(true);
Component<MenuComponent>(MenuType::PAUSE,"Return to Camp Button")->SetGrayedOut(true);
}
virtual inline bool CompleteCondition()override final{
return false;
}
virtual inline void OnComplete()override final{}
virtual inline void OnComplete()override final{
Component<MenuComponent>(SHERMAN,"Leave Button")->SetGrayedOut(false);
Component<MenuComponent>(MenuType::PAUSE,"Return to Camp Button")->SetGrayedOut(false);
}
virtual inline void Draw()const override final{
std::string helpText="Visit the #00FFD0Artificer#FFFFFF to unlock new accessory upgrades!";
float textWidth=game->GetTextSizeProp(helpText).x;
game->DrawShadowStringPropDecal({game->ScreenWidth()/2.f-textWidth/2.f,48.f},helpText);
}
};

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_PATCH 5
#define VERSION_BUILD 11361
#define VERSION_BUILD 11362
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save