Move ScriptCategory enum outside of class scope of ScriptResolver.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -77,7 +77,7 @@ namespace CreatureLib::Battling {
|
||||
const std::vector<BattleSide*>& GetSides() const { return _sides; }
|
||||
Script* GetVolatileScript(const std::string& key) const { return _volatile.Get(key); }
|
||||
void AddVolatileScript(const std::string& key) {
|
||||
auto script = _library->LoadScript(ScriptResolver::ScriptCategory::Battle, key);
|
||||
auto script = _library->LoadScript(ScriptCategory::Battle, key);
|
||||
return _volatile.Add(script);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Battling::Creature::Creature(const BattleLibrary* library, const Library::Creatu
|
||||
: _library(library), _species(species), _variant(variant), _level(level), _experience(experience),
|
||||
_uniqueIdentifier(uid), _gender(gender), _coloring(coloring), _heldItem(heldItem), _nickname(std::move(nickname)),
|
||||
_talentIndex(talent), _hasOverridenTalent(false), _attacks(std::move(attacks)) {
|
||||
_activeTalent = _library->LoadScript(ScriptResolver::ScriptCategory::Talent, GetActiveTalent());
|
||||
_activeTalent = _library->LoadScript(ScriptCategory::Talent, GetActiveTalent());
|
||||
}
|
||||
|
||||
void Battling::Creature::ChangeLevel(int8_t amount) {
|
||||
@@ -131,7 +131,7 @@ void Battling::Creature::OverrideActiveTalent(const std::string& talent) {
|
||||
_activeTalent->OnRemove();
|
||||
delete _activeTalent;
|
||||
_overridenTalentName = talent;
|
||||
_activeTalent = this->_library->LoadScript(ScriptResolver::ScriptCategory::Talent, talent);
|
||||
_activeTalent = this->_library->LoadScript(ScriptCategory::Talent, talent);
|
||||
}
|
||||
|
||||
const std::vector<uint8_t>& Battling::Creature::GetTypes() const {
|
||||
|
||||
Reference in New Issue
Block a user