Add support for saving and getting the owner of a script in script.
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2021-10-29 21:31:01 +02:00
parent 5fd8abb3a8
commit 949fc67831
4 changed files with 8 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ private:
ArbUt::StringView _name;
public:
explicit TestScript(const ArbUt::StringView& name) : _name(name){};
explicit TestScript(const ArbUt::StringView& name) : BattleScript(nullptr), _name(name){};
const ArbUt::StringView& GetName() const noexcept override { return _name; }

View File

@@ -12,7 +12,7 @@ private:
ArbUt::StringView _name;
public:
explicit TestScript(const ArbUt::StringView& name) : _name(name){};
explicit TestScript(const ArbUt::StringView& name) : BattleScript(nullptr), _name(name){};
const ArbUt::StringView& GetName() const noexcept override { return _name; }
BattleScript* Clone() override { return new TestScript(_name); }

View File

@@ -11,7 +11,7 @@ private:
ArbUt::StringView _name;
public:
explicit TestScript(const ArbUt::StringView& name) : _name(name){};
explicit TestScript(const ArbUt::StringView& name) : BattleScript(nullptr), _name(name){};
const ArbUt::StringView& GetName() const noexcept override { return _name; }
void TestMethod(int& runCount) { runCount++; }