Fixes BattleSide AddVolatile using the wrong script category.
continuous-integration/drone/push Build is passing Details

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
Deukhoofd 2021-10-29 18:12:35 +02:00
parent b4ef1ea98e
commit 0b9028ea97
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 2 additions and 2 deletions

View File

@ -139,9 +139,9 @@ BattleScript* BattleSide::AddVolatileScript(const ArbUt::StringView& key) {
script.GetValue()->Stack();
return script.GetValue();
}
script = _battle->GetLibrary()->LoadScript(ScriptCategory::Battle, key);
script = _battle->GetLibrary()->LoadScript(ScriptCategory::Side, key);
if (!script.HasValue()) {
THROW("Invalid volatile script requested for battle: '" << key.c_str() << "'.");
THROW("Invalid volatile script requested for battleside: '" << key.c_str() << "'.");
}
return _volatile.Add(script.GetValue());
}