diff --git a/Adventures in Lestoria/CraftItemWindow.cpp b/Adventures in Lestoria/CraftItemWindow.cpp index ae47865d..4932a196 100644 --- a/Adventures in Lestoria/CraftItemWindow.cpp +++ b/Adventures in Lestoria/CraftItemWindow.cpp @@ -40,6 +40,7 @@ All rights reserved. #include "EnhancementStatsLabel.h" #include "RequiredMaterialsList.h" #include "SoundEffect.h" +#include "Tutorial.h" void Menu::InitializeCraftItemWindow(){ Menu*craftItemWindow=CreateMenu(CRAFT_ITEM,CENTERED,{240,120}); @@ -76,6 +77,9 @@ void Menu::InitializeCraftItemWindow(){ }else{ //Since we already own this equipment, just enhance it. item.lock()->EnhanceItem(); } + if(!Tutorial::TaskIsComplete(TutorialTaskName::EQUIP_GEAR)){ + Tutorial::SetNextTask(TutorialTaskName::EQUIP_GEAR); + } } std::string label=""; if(item.lock()->EnhancementIsPossible()&&item.lock()->GetEnhancementInfo().size()>item.lock()->EnhancementLevel()+1 diff --git a/Adventures in Lestoria/TODO.txt b/Adventures in Lestoria/TODO.txt index 3dc25abf..2be30110 100644 --- a/Adventures in Lestoria/TODO.txt +++ b/Adventures in Lestoria/TODO.txt @@ -1,5 +1,3 @@ -Equip Gear using Start menu tutorial - ============================================ Make another actions config file for the main build (The app # is different) \ No newline at end of file diff --git a/Adventures in Lestoria/Tutorial.cpp b/Adventures in Lestoria/Tutorial.cpp index 2cfb04fe..cffe40b5 100644 --- a/Adventures in Lestoria/Tutorial.cpp +++ b/Adventures in Lestoria/Tutorial.cpp @@ -50,6 +50,7 @@ void Tutorial::Initialize(){ CREATETASK(TutorialTaskName::USE_DEFENSIVE,UseDefensiveTask); CREATETASK(TutorialTaskName::USE_RECOVERY_ITEMS,UseRecoveryItemsTask); CREATETASK(TutorialTaskName::BLACKSMITH,BlacksmithTask); + CREATETASK(TutorialTaskName::EQUIP_GEAR,EquipGearTask); currentTaskState=TutorialTaskName::SET_LOADOUT_ITEM; ResetTasks(); } diff --git a/Adventures in Lestoria/Tutorial.h b/Adventures in Lestoria/Tutorial.h index 86e5da6e..3c5728e3 100644 --- a/Adventures in Lestoria/Tutorial.h +++ b/Adventures in Lestoria/Tutorial.h @@ -61,6 +61,7 @@ enum class TutorialTaskName{ USE_DEFENSIVE, USE_RECOVERY_ITEMS, BLACKSMITH, + EQUIP_GEAR, NONE, }; @@ -316,4 +317,41 @@ private: float textWidth=game->GetTextSizeProp(helpText).x; game->DrawShadowStringPropDecal({game->ScreenWidth()/2.f-textWidth/2.f,48.f},helpText); } +}; + +class EquipGearTask:public TutorialTask{ +public: + inline EquipGearTask():TutorialTask(){}; +private: + InputGroup startGroup; + virtual inline void OnActivate()override final{ + startGroup.ClearAllKeybinds(); + ADDKEYBIND(startGroup,game->KEY_MENU,CONTROLLER); + ADDKEYBIND(startGroup,game->KEY_MENU,KEY); + ADDKEYBIND(startGroup,game->KEY_MENU,STEAM); + Component(SHERMAN,"Leave Button")->SetGrayedOut(true); + Component(MenuType::PAUSE,"Return to Camp Button")->SetGrayedOut(true); + } + virtual inline bool CompleteCondition()override final{ + for(int i=int(EquipSlot::HELMET);i<=int(EquipSlot::RING2);i<<=1){ + EquipSlot slot=EquipSlot(i); + if(!ISBLANK(Inventory::GetEquip(slot)))return true; + } + return false; + } + virtual inline void OnComplete()override final{ + Component(SHERMAN,"Leave Button")->SetGrayedOut(false); + Component(MenuType::PAUSE,"Return to Camp Button")->SetGrayedOut(false); + } + virtual inline void Draw()const override final{ + if(Input::UsingGamepad()){ + STEAMINPUT( + startGroup.DrawInput(game,{game->ScreenWidth()/2.f,48.f},"Open the #FFCF0CCharacter#FFFFFF menu and equip your new gear.",180,InputType::STEAM); + )else{ + startGroup.DrawInput(game,{game->ScreenWidth()/2.f,48.f},"Open the #FFCF0CCharacter#FFFFFF menu and equip your new gear.",180,InputType::CONTROLLER); + } + }else{ + startGroup.DrawInput(game,{game->ScreenWidth()/2.f,48.f},"Open the #FFCF0CCharacter#FFFFFF menu and equip your new gear.",180,InputType::KEY); + } + } }; \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index e08456b1..9e128a83 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 0 #define VERSION_PATCH 0 -#define VERSION_BUILD 8465 +#define VERSION_BUILD 8467 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 8917f01e..5e565f58 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ