Add a tutorial task that requires the player to equip a crafted piece of gear. Release Build 8467.
This commit is contained in:
parent
a63f5f9b6c
commit
d00fb5aa46
@ -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
|
||||
|
@ -1,5 +1,3 @@
|
||||
Equip Gear using Start menu tutorial
|
||||
|
||||
============================================
|
||||
|
||||
Make another actions config file for the main build (The app # is different)
|
@ -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();
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ enum class TutorialTaskName{
|
||||
USE_DEFENSIVE,
|
||||
USE_RECOVERY_ITEMS,
|
||||
BLACKSMITH,
|
||||
EQUIP_GEAR,
|
||||
NONE,
|
||||
};
|
||||
|
||||
@ -317,3 +318,40 @@ private:
|
||||
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<MenuComponent>(SHERMAN,"Leave Button")->SetGrayedOut(true);
|
||||
Component<MenuComponent>(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<MenuComponent>(SHERMAN,"Leave Button")->SetGrayedOut(false);
|
||||
Component<MenuComponent>(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);
|
||||
}
|
||||
}
|
||||
};
|
@ -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
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user