When adding volatile script, return the script object.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2021-03-27 16:36:20 +01:00
parent d6858c2d44
commit bfe83ef271
5 changed files with 14 additions and 13 deletions

View File

@@ -92,8 +92,8 @@ namespace CreatureLib::Battling {
std::optional<ArbUt::BorrowedPtr<BattleScript>> GetVolatileScript(uint32_t keyHash) const noexcept {
return _volatile.Get(keyHash);
}
void AddVolatileScript(const ArbUt::StringView& key);
void AddVolatileScript(BattleScript* script);
BattleScript* AddVolatileScript(const ArbUt::StringView& key);
BattleScript* AddVolatileScript(BattleScript* script);
void RemoveVolatileScript(const ArbUt::BasicStringView& name) { _volatile.Remove(name); }
void RemoveVolatileScript(uint32_t keyHash) { _volatile.Remove(keyHash); }
void RemoveVolatileScript(BattleScript* script);