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

This commit is contained in:
sigonasr2 2024-03-05 00:42:38 -06:00
parent 79d80e3e0d
commit dfa06b688d
4 changed files with 5 additions and 3 deletions

View File

@ -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"));
if(game->KEY_CONFIRM.Released()&&Menu::stack.size()==0){
if(m.npcData.function=="Blacksmith"){
Tutorial::CompleteTask(TutorialTaskName::BLACKSMITH);
Menu::OpenMenu(MenuType::BLACKSMITH);
//First reset all items displayed in the blacksmith's shop (showing only our equipment.)
Inventory::UpdateBlacksmithInventoryLists();

View File

@ -40,6 +40,7 @@ All rights reserved.
#include "MenuComponent.h"
#include "LoadingScreen.h"
#include "Key.h"
#include "Menu.h"
using A=Attribute;
@ -271,12 +272,14 @@ public:
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 I(A::ITEM_USE_COUNT)>=1;
return Menu::IsMenuOpen()&&Menu::stack.back()==Menu::menus[MenuType::BLACKSMITH];
}
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 #00FFD0\"Greg\" the Blacksmith#FFFFFF to browse craftable gear.";

View File

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