Change how blacksmith TutorialTask is handled with the complete condition actually fulfilled instead of a randomly variable (copy-paste error)? Release Version 7906.

pull/35/head
sigonasr2 9 months ago
parent 3dcce251ef
commit 05e59f8ca4
  1. 1
      Adventures in Lestoria/NPC.cpp
  2. 5
      Adventures in Lestoria/Tutorial.h
  3. 2
      Adventures in Lestoria/Version.h
  4. BIN
      x64/Release/Adventures in Lestoria.exe

@ -68,7 +68,6 @@ void Monster::STRATEGY::NPC(Monster&m,float fElapsedTime,std::string strategy){
m.F(A::TARGET_TIMER)=std::min(m.F(A::TARGET_TIMER)+fElapsedTime,ConfigFloat("Interaction Display Ease in Timer")); m.F(A::TARGET_TIMER)=std::min(m.F(A::TARGET_TIMER)+fElapsedTime,ConfigFloat("Interaction Display Ease in Timer"));
if(game->KEY_CONFIRM.Released()&&Menu::stack.size()==0){ if(game->KEY_CONFIRM.Released()&&Menu::stack.size()==0){
if(m.npcData.function=="Blacksmith"){ if(m.npcData.function=="Blacksmith"){
Tutorial::CompleteTask(TutorialTaskName::BLACKSMITH);
Menu::OpenMenu(MenuType::BLACKSMITH); Menu::OpenMenu(MenuType::BLACKSMITH);
//First reset all items displayed in the blacksmith's shop (showing only our equipment.) //First reset all items displayed in the blacksmith's shop (showing only our equipment.)
Inventory::UpdateBlacksmithInventoryLists(); Inventory::UpdateBlacksmithInventoryLists();

@ -40,6 +40,7 @@ All rights reserved.
#include "MenuComponent.h" #include "MenuComponent.h"
#include "LoadingScreen.h" #include "LoadingScreen.h"
#include "Key.h" #include "Key.h"
#include "Menu.h"
using A=Attribute; using A=Attribute;
@ -271,12 +272,14 @@ public:
private: private:
virtual inline void OnActivate()override final{ virtual inline void OnActivate()override final{
Component<MenuComponent>(SHERMAN,"Leave Button")->SetGrayedOut(true); Component<MenuComponent>(SHERMAN,"Leave Button")->SetGrayedOut(true);
Component<MenuComponent>(MenuType::PAUSE,"Return to Camp Button")->SetGrayedOut(true);
} }
virtual inline bool CompleteCondition()override final{ virtual inline bool CompleteCondition()override final{
return I(A::ITEM_USE_COUNT)>=1; return Menu::IsMenuOpen()&&Menu::stack.back()==Menu::menus[MenuType::BLACKSMITH];
} }
virtual inline void OnComplete()override final{ virtual inline void OnComplete()override final{
Component<MenuComponent>(SHERMAN,"Leave Button")->SetGrayedOut(false); Component<MenuComponent>(SHERMAN,"Leave Button")->SetGrayedOut(false);
Component<MenuComponent>(MenuType::PAUSE,"Return to Camp Button")->SetGrayedOut(false);
} }
virtual inline void Draw()const override final{ virtual inline void Draw()const override final{
std::string helpText="Visit #00FFD0\"Greg\" the Blacksmith#FFFFFF to browse craftable gear."; std::string helpText="Visit #00FFD0\"Greg\" the Blacksmith#FFFFFF to browse craftable gear.";

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 4 #define VERSION_MINOR 4
#define VERSION_PATCH 4 #define VERSION_PATCH 4
#define VERSION_BUILD 7905 #define VERSION_BUILD 7906
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a

Loading…
Cancel
Save