ItemEnchant::AbilitySlot renamed to ItemEnchant::EnchantAbilitySlot. Release Build 12246.
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 7m13s

This commit is contained in:
sigonasr2 2025-08-01 14:13:47 -05:00
parent 9b252334e5
commit 4d2eb86efe
10 changed files with 33 additions and 33 deletions

View File

@ -56,7 +56,7 @@ struct PrecastData{
PrecastData(float castTime,float range,float size);
};
enum class AbilitySlot{
enum class EnchantAbilitySlot{
ABILITY1,
ABILITY2,
ABILITY3,

View File

@ -349,11 +349,11 @@ void Menu::InitializeCharacterMenuWindow(){
#pragma region Skill Selection Boxes
const std::array abilityBoxes{
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility1(),AbilitySlot::ABILITY1},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility2(),AbilitySlot::ABILITY2},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility3(),AbilitySlot::ABILITY3},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility4(),AbilitySlot::ABILITY4},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetRightClickAbility(),AbilitySlot::DEFENSIVE},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility1(),EnchantAbilitySlot::ABILITY1},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility2(),EnchantAbilitySlot::ABILITY2},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility3(),EnchantAbilitySlot::ABILITY3},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility4(),EnchantAbilitySlot::ABILITY4},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetRightClickAbility(),EnchantAbilitySlot::DEFENSIVE},
};
for(size_t i{0};auto&[ability,slot]:abilityBoxes){
float x=8;
@ -401,11 +401,11 @@ void Menu::InitializeCharacterMenuWindow(){
else slot->Disable();
}
const std::array abilityBoxes{
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility1(),AbilitySlot::ABILITY1},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility2(),AbilitySlot::ABILITY2},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility3(),AbilitySlot::ABILITY3},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility4(),AbilitySlot::ABILITY4},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetRightClickAbility(),AbilitySlot::DEFENSIVE},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility1(),EnchantAbilitySlot::ABILITY1},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility2(),EnchantAbilitySlot::ABILITY2},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility3(),EnchantAbilitySlot::ABILITY3},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility4(),EnchantAbilitySlot::ABILITY4},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetRightClickAbility(),EnchantAbilitySlot::DEFENSIVE},
};
for(int i=0;i<abilityBoxes.size();i++){
auto&[ability,slot]{abilityBoxes[i]};

View File

@ -61,11 +61,11 @@ void Menu::InitializeHubPauseWindow(){
Component<CharacterRotatingDisplay>(CHARACTER_MENU,"Character Rotating Display")->SetIcon(GFX[classutils::GetClassInfo(game->GetPlayer()->GetClassName()).classFullImgName].Decal());
Component<MenuComponent>(CHARACTER_MENU,"Equip Selection Select Button")->Click();
std::array abilityBoxes{
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility1(),AbilitySlot::ABILITY1},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility2(),AbilitySlot::ABILITY2},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility3(),AbilitySlot::ABILITY3},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility4(),AbilitySlot::ABILITY4},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetRightClickAbility(),AbilitySlot::DEFENSIVE},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility1(),EnchantAbilitySlot::ABILITY1},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility2(),EnchantAbilitySlot::ABILITY2},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility3(),EnchantAbilitySlot::ABILITY3},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility4(),EnchantAbilitySlot::ABILITY4},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetRightClickAbility(),EnchantAbilitySlot::DEFENSIVE},
};
for(size_t i{0};auto&[ability,slot]:abilityBoxes){
//Attempt to update icons in case the abilities have changed at some point.

View File

@ -102,8 +102,8 @@ void ItemEnchantInfo::Initialize(){
newEnchant.category=enchantCategory;
newEnchant.name=keyName;
std::string enchantDescription{enchant["Description"].GetString()};
using enum AbilitySlot;
const std::unordered_map<std::string,AbilitySlot>affectSlots{
using enum EnchantAbilitySlot;
const std::unordered_map<std::string,EnchantAbilitySlot>affectSlots{
{"Auto Attack",AUTO_ATTACK},
{"Right Click Ability",RIGHT_CLICK},
{"Ability 1",ABILITY_1},
@ -236,7 +236,7 @@ const std::string_view ItemEnchant::Description()const{
const ItemEnchantInfo::ItemEnchantCategory&ItemEnchant::Category()const{
return GetEnchantInfo().Category();
}
const std::optional<ItemEnchantInfo::AbilitySlot>&ItemEnchant::AbilitySlot()const{
const std::optional<ItemEnchantInfo::EnchantAbilitySlot>&ItemEnchant::EnchantAbilitySlot()const{
return GetEnchantInfo().abilitySlot;
}
const std::unordered_map<std::string,ItemEnchantInfo>&ItemEnchantInfo::GetEnchants(){
@ -324,7 +324,7 @@ const Pixel&ItemEnchant::DisplayCol()const{
return ItemEnchantInfo::enchantTextDisplayCol.at(Category());
}
const std::optional<ItemEnchantInfo::AbilitySlot>&ItemEnchantInfo::GetAbilitySlot()const{
const std::optional<ItemEnchantInfo::EnchantAbilitySlot>&ItemEnchantInfo::GetAbilitySlot()const{
return abilitySlot;
}

View File

@ -56,7 +56,7 @@ public:
CLASS,
UNIQUE,
};
enum class AbilitySlot{
enum class EnchantAbilitySlot{
AUTO_ATTACK,
RIGHT_CLICK,
ABILITY_1,
@ -84,7 +84,7 @@ public:
const std::string_view Description()const;
const ItemEnchantCategory&Category()const;
const std::optional<Class>&GetClass()const;
const std::optional<AbilitySlot>&GetAbilitySlot()const;
const std::optional<EnchantAbilitySlot>&GetAbilitySlot()const;
const std::optional<Ability*>GetAbility()const; //Get the ability this enchant is tied to.
const Pixel&DisplayCol()const;
const float GetConfigValue(const std::string_view keyName)const;
@ -104,7 +104,7 @@ private:
std::string name;
std::string description;
std::optional<Class>abilityClass;
std::optional<AbilitySlot>abilitySlot;
std::optional<EnchantAbilitySlot>abilitySlot;
ItemAttributable minStatModifiers;
ItemAttributable maxStatModifiers;
std::unordered_map<std::string,float>config;
@ -121,7 +121,7 @@ public:
const std::string Name(ItemEnchantInfo::TextStyle style=ItemEnchantInfo::TextStyle::NORMAL)const;
const std::string_view Description()const;
const ItemEnchantInfo::ItemEnchantCategory&Category()const;
const std::optional<ItemEnchantInfo::AbilitySlot>&AbilitySlot()const;
const std::optional<ItemEnchantInfo::EnchantAbilitySlot>&EnchantAbilitySlot()const;
const static std::vector<ItemEnchantInfo>GetAvailableEnchants();
//Rolls a class-appropriate random enchant.
const static ItemEnchant RollRandomEnchant(const std::optional<ItemEnchant>previousEnchant={});

View File

@ -60,11 +60,11 @@ void Menu::InitializePauseWindow(){
Component<CharacterRotatingDisplay>(CHARACTER_MENU,"Character Rotating Display")->SetIcon(GFX[classutils::GetClassInfo(game->GetPlayer()->GetClassName()).classFullImgName].Decal());
Component<MenuComponent>(CHARACTER_MENU,"Equip Selection Select Button")->Click();
std::array abilityBoxes{
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility1(),AbilitySlot::ABILITY1},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility2(),AbilitySlot::ABILITY2},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility3(),AbilitySlot::ABILITY3},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetAbility4(),AbilitySlot::ABILITY4},
std::pair<std::reference_wrapper<Ability>,AbilitySlot>{game->GetPlayer()->GetRightClickAbility(),AbilitySlot::DEFENSIVE},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility1(),EnchantAbilitySlot::ABILITY1},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility2(),EnchantAbilitySlot::ABILITY2},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility3(),EnchantAbilitySlot::ABILITY3},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetAbility4(),EnchantAbilitySlot::ABILITY4},
std::pair<std::reference_wrapper<Ability>,EnchantAbilitySlot>{game->GetPlayer()->GetRightClickAbility(),EnchantAbilitySlot::DEFENSIVE},
};
for(size_t i{0};auto&[ability,slot]:abilityBoxes){
//Attempt to update icons in case the abilities have changed at some point.

View File

@ -2328,8 +2328,8 @@ const std::unordered_set<std::string>&Player::GetEnchants()const{
return enchantList;
}
const Ability&Player::GetAbility(AbilitySlot slot){
using enum AbilitySlot;
const Ability&Player::GetAbility(EnchantAbilitySlot slot){
using enum EnchantAbilitySlot;
switch(slot){
case ABILITY1:return GetAbility1();
case ABILITY2:return GetAbility2();

View File

@ -230,7 +230,7 @@ public:
virtual Ability&GetAbility2()=0;
virtual Ability&GetAbility3()=0;
virtual Ability&GetAbility4()=0;
const Ability&GetAbility(AbilitySlot slot);
const Ability&GetAbility(EnchantAbilitySlot slot);
virtual void SetAbility4(const Ability&originalAbility)=0; //NOTE: Make sure to provide the original ability and not a current ability!
virtual std::string&GetWalkNAnimation()=0;
virtual std::string&GetWalkEAnimation()=0;

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 12245
#define VERSION_BUILD 12246
#define stringify(a) stringify_(a)
#define stringify_(a) #a