Allow changing unit attack ID through Lua

This commit is contained in:
Celtic Minstrel 2016-08-27 10:47:23 -04:00
parent 945fea0c0e
commit f1978b13f1
2 changed files with 2 additions and 4 deletions

View file

@ -195,7 +195,7 @@ static int impl_unit_attack_set(lua_State *L)
attack_type& attack = *atk_ref.attack;
char const *m = luaL_checkstring(L, 2);
modify_tstring_attrib("description", attack.set_name(value));
// modify_string_attrib("name", attack.set_id(value));
modify_string_attrib("name", attack.set_id(value));
modify_string_attrib("type", attack.set_type(value));
modify_string_attrib("icon", attack.set_icon(value));
modify_string_attrib("range", attack.set_range(value));

View file

@ -49,12 +49,10 @@ public:
const config specials() const { return specials_; }
void set_name(const t_string& value) { description_ = value; }
// void set_id(const std::string& value) { return id = value; }
void set_id(const std::string& value) { id_ = value; }
void set_type(const std::string& value) { type_ = value; }
void set_icon(const std::string& value) { icon_ = value; }
void set_range(const std::string& value) { range_ = value; }
// void set_min_range(int value) { min_range_ = value; }
// void set_max_range(int value) { max_range_ = value; }
void set_accuracy(int value) { accuracy_ = value; }
void set_parry(int value) { parry_ = value; }
void set_damage(int value) { damage_ = value; }