Skip to content

Commit

Permalink
Fixup 601c67d
Browse files Browse the repository at this point in the history
Turns out that commit broke TC on unit images in messages since it broke the equality
check in lua_unit.cpp. Added the XBRZ IPF as part of the Lua unit portrait attribute
instead.

I *think* this is the proper place to do it.
  • Loading branch information
Vultraz committed Apr 16, 2018
1 parent 77b9bc3 commit fab229b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/scripting/lua_unit.cpp
Expand Up @@ -364,7 +364,9 @@ static int impl_unit_get(lua_State *L)
return_string_attrib("variation", u.variation());
return_bool_attrib("zoc", u.get_emit_zoc());
return_string_attrib("facing", map_location::write_direction(u.facing()));
return_string_attrib("portrait", u.big_profile() == u.absolute_image() ? u.absolute_image() + u.image_mods() : u.big_profile());
return_string_attrib("portrait", u.big_profile() == u.absolute_image()
? u.absolute_image() + u.image_mods() + "~XBRZ(2)"
: u.big_profile());
return_cfg_attrib("__cfg", u.write(cfg); u.get_location().write(cfg));

if(luaW_getmetafield(L, 1, m)) {
Expand Down
2 changes: 1 addition & 1 deletion src/units/unit.cpp
Expand Up @@ -1015,7 +1015,7 @@ std::string unit::big_profile() const
return profile_;
}

return absolute_image() + "~XBRZ(2)";
return absolute_image();
}

std::string unit::small_profile() const
Expand Down

0 comments on commit fab229b

Please sign in to comment.