Changed LoadScript to StringView.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
48639eeee5
commit
772619db0f
|
@ -44,6 +44,6 @@ const std::unique_ptr<const DamageLibrary>& BattleLibrary::GetDamageLibrary() co
|
|||
|
||||
const std::unique_ptr<const MiscLibrary>& BattleLibrary::GetMiscLibrary() const noexcept { return _miscLibrary; }
|
||||
|
||||
Script* BattleLibrary::LoadScript(ScriptCategory category, const ArbUt::BasicStringView& scriptName) const {
|
||||
Script* BattleLibrary::LoadScript(ScriptCategory category, const ArbUt::StringView& scriptName) const {
|
||||
return _scriptResolver->LoadScript(category, scriptName);
|
||||
}
|
|
@ -41,7 +41,7 @@ namespace CreatureLib::Battling {
|
|||
return _experienceLibrary;
|
||||
}
|
||||
|
||||
[[nodiscard]] Script* LoadScript(ScriptCategory category, const ArbUt::BasicStringView& scriptName) const;
|
||||
[[nodiscard]] Script* LoadScript(ScriptCategory category, const ArbUt::StringView& scriptName) const;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ void Battle::ValidateBattleState() {
|
|||
this->_battleResult = BattleResult::Conclusive(winningSide);
|
||||
this->_hasEnded = true;
|
||||
}
|
||||
void Battle::AddVolatileScript(const ArbUt::BasicStringView& key) {
|
||||
void Battle::AddVolatileScript(const ArbUt::StringView& key) {
|
||||
auto script = _volatile.Get(key);
|
||||
if (script != nullptr) {
|
||||
script->Stack();
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace CreatureLib::Battling {
|
|||
const ArbUt::UniquePtrList<BattleSide>& GetSides() const noexcept { return _sides; }
|
||||
ArbUt::BorrowedPtr<Script> GetVolatileScript(const ArbUt::StringView& key) const { return _volatile.Get(key); }
|
||||
ArbUt::BorrowedPtr<Script> GetVolatileScript(uint32_t keyHash) const noexcept { return _volatile.Get(keyHash); }
|
||||
void AddVolatileScript(const ArbUt::BasicStringView& key);
|
||||
void AddVolatileScript(const ArbUt::StringView& key);
|
||||
void AddVolatileScript(Script* script);
|
||||
void RemoveVolatileScript(const ArbUt::BasicStringView& name) { _volatile.Remove(name); }
|
||||
void RemoveVolatileScript(uint32_t keyHash) { _volatile.Remove(keyHash); }
|
||||
|
|
|
@ -239,7 +239,7 @@ void Battling::Creature::SetHeldItem(uint32_t itemNameHash) {
|
|||
_heldItem = item;
|
||||
}
|
||||
|
||||
void Battling::Creature::AddVolatileScript(const ArbUt::BasicStringView& name) {
|
||||
void Battling::Creature::AddVolatileScript(const ArbUt::StringView& name) {
|
||||
auto script = _volatile.Get(name);
|
||||
if (script != nullptr) {
|
||||
script->Stack();
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace CreatureLib::Battling {
|
|||
size_t ScriptCount() const override;
|
||||
void GetActiveScripts(ArbUt::List<ScriptWrapper>& scripts) override;
|
||||
void ClearVolatileScripts();
|
||||
void AddVolatileScript(const ArbUt::BasicStringView& name);
|
||||
void AddVolatileScript(const ArbUt::StringView& name);
|
||||
void AddVolatileScript(Script* script);
|
||||
void RemoveVolatileScript(const ArbUt::BasicStringView& name);
|
||||
void RemoveVolatileScript(Script* script);
|
||||
|
|
|
@ -14,9 +14,7 @@ namespace CreatureLib::Battling {
|
|||
virtual ~ScriptResolver() = default;
|
||||
|
||||
virtual void Initialize(BattleLibrary* library){};
|
||||
virtual Script* LoadScript(ScriptCategory category, const ArbUt::BasicStringView& scriptName) {
|
||||
return nullptr;
|
||||
};
|
||||
virtual Script* LoadScript(ScriptCategory category, const ArbUt::StringView& scriptName) { return nullptr; };
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue