From 2bd1eaef1b9ec848933a40049ec8866e2b83a47d Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 16 Oct 2017 18:43:06 -0400 Subject: do not touch birb --- include/components/aggro.hpp | 11 +++++------ include/systems/lua.hpp | 12 +++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'include') 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 using LuaVariable = std::tuple; +using LuaList = std::vector; +using LuaRetList = std::vector; class LuaScript { private: @@ -14,7 +16,7 @@ private: std::string script; void setGlobal(const LuaVariable&) const; - void getReturns(std::vector& 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 vars) const; - void operator()(const std::string& func, std::vector& rets, std::vector vars) const; - void operator()(std::vector vars) const; - void operator()(std::vector& rets, std::vector 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 { -- cgit v1.2.3