Added functions for battle to manipulate volatile scripts.
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:
@@ -75,6 +75,11 @@ namespace CreatureLib::Battling {
|
||||
inline const BattleResult& GetResult() const { return _battleResult; }
|
||||
|
||||
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);
|
||||
return _volatile.Add(script);
|
||||
}
|
||||
|
||||
void RegisterEventListener(EVENT_HOOK_FUNC(listener)) { this->_eventHook.RegisterListener(listener); }
|
||||
void TriggerEventListener(EventData* data) { this->_eventHook.TriggerEvent(data); }
|
||||
|
||||
Reference in New Issue
Block a user