diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2017-10-16 18:43:06 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2017-10-16 18:43:06 -0400 |
commit | 2bd1eaef1b9ec848933a40049ec8866e2b83a47d (patch) | |
tree | 714a018bdc4b42aa1e9bcac5270190d068cf177b /include | |
parent | 07b3ae994d0e68b5c266f5aa212024d5064847c2 (diff) |
do not touch birb
Diffstat (limited to 'include')
-rw-r--r-- | include/components/aggro.hpp | 11 | ||||
-rw-r--r-- | include/systems/lua.hpp | 12 |
2 files changed, 12 insertions, 11 deletions
diff --git a/include/components/aggro.hpp b/include/components/aggro.hpp index 17d646c..f559e6f 100644 --- a/include/components/aggro.hpp +++ b/include/components/aggro.hpp @@ -7,18 +7,17 @@ * Causes the entity to get mad at the player, charge and fight. */ struct Aggro : public Component { - Aggro(const std::string& a) - : arena(a) {} + Aggro(bool y = false) + : yes(y) {} Aggro(XMLElement* imp, XMLElement* def) { fromXML(imp, def); } - std::string arena; + bool yes; void fromXML(XMLElement* imp, XMLElement* def) final { - (void)imp; - // TODO null check..?, imp given - arena = def->StrAttribute("arena"); + (void)imp, (void)def; + // TODO } }; diff --git a/include/systems/lua.hpp b/include/systems/lua.hpp index 1137308..cb859ad 100644 --- a/include/systems/lua.hpp +++ b/include/systems/lua.hpp @@ -7,6 +7,8 @@ #include <vector> using LuaVariable = std::tuple<std::string, float&>; +using LuaList = std::vector<LuaVariable>; +using LuaRetList = std::vector<double>; class LuaScript { private: @@ -14,7 +16,7 @@ private: std::string script; void setGlobal(const LuaVariable&) const; - void getReturns(std::vector<double>& rets) const; + void getReturns(LuaRetList& rets) const; static void replace(std::string& s, const std::string& rid, const std::string& put) { for (unsigned int i = 0; i < s.size(); i++) { @@ -45,10 +47,10 @@ public: } void operator()(const std::string& func = "update") const; - void operator()(const std::string& func, std::vector<LuaVariable> vars) const; - void operator()(const std::string& func, std::vector<double>& rets, std::vector<LuaVariable> vars) const; - void operator()(std::vector<LuaVariable> vars) const; - void operator()(std::vector<double>& rets, std::vector<LuaVariable> vars) const; + void operator()(const std::string& func, LuaList vars) const; + void operator()(const std::string& func, LuaRetList& rets, LuaList vars) const; + void operator()(LuaList vars) const; + void operator()(LuaRetList& rets, LuaList vars) const; }; class LuaSystem { |