Fix #9651 Error in u:extract()
This logic seems inverted, this probably happened while the lua attributes were converted to use the LATTR_SETTER macros.
This commit is contained in:
parent
e64283534f
commit
f113b2b7a7
1 changed files with 1 additions and 1 deletions
|
@ -390,7 +390,7 @@ UNIT_GETTER("id", std::string) {
|
|||
|
||||
LATTR_SETTER("id", std::string, lua_unit*, lu) {
|
||||
if(!lu->get()) return;
|
||||
if(!lu->on_map()) luaL_argerror(L, 3, "can't modify id of on-map unit");
|
||||
if(lu->on_map()) luaL_argerror(L, 3, "can't modify id of on-map unit");
|
||||
(*lu)->set_id(value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue