Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
gfgtdf
746d374da0
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.
2024-12-16 23:22:38 +01:00

View file

@ -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);
}