1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix short_description fallback order (#10943)

This commit is contained in:
rubenwardy 2021-02-17 18:53:44 +00:00 committed by GitHub
parent 7832b6843e
commit a8f6befd39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 14 deletions

View file

@ -140,8 +140,10 @@ void push_item_definition_full(lua_State *L, const ItemDefinition &i)
lua_setfield(L, -2, "name");
lua_pushstring(L, i.description.c_str());
lua_setfield(L, -2, "description");
lua_pushstring(L, i.short_description.c_str());
lua_setfield(L, -2, "short_description");
if (!i.short_description.empty()) {
lua_pushstring(L, i.short_description.c_str());
lua_setfield(L, -2, "short_description");
}
lua_pushstring(L, type.c_str());
lua_setfield(L, -2, "type");
lua_pushstring(L, i.inventory_image.c_str());