diff options
author | Dániel Juhász <juhdanad@gmail.com> | 2017-08-25 11:20:53 +0000 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-25 13:20:53 +0200 |
commit | f6a33a1a7a298cb7d3fb18818bae97bd1b89d633 (patch) | |
tree | 7bc7689e33895e5a6084129484f679caaed1cfc0 /src/script/common | |
parent | 6761e213836e902359c5d0acff277623dc3e1588 (diff) | |
download | minetest-f6a33a1a7a298cb7d3fb18818bae97bd1b89d633.tar.gz minetest-f6a33a1a7a298cb7d3fb18818bae97bd1b89d633.tar.bz2 minetest-f6a33a1a7a298cb7d3fb18818bae97bd1b89d633.zip |
Overlays for wield and inventory images (#6107)
* Overlays for wield and inventory images
Diffstat (limited to 'src/script/common')
-rw-r--r-- | src/script/common/c_content.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 4360f63bb..f746ce766 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -56,7 +56,9 @@ void read_item_definition(lua_State* L, int index, getstringfield(L, index, "name", def.name); getstringfield(L, index, "description", def.description); getstringfield(L, index, "inventory_image", def.inventory_image); + getstringfield(L, index, "inventory_overlay", def.inventory_overlay); getstringfield(L, index, "wield_image", def.wield_image); + getstringfield(L, index, "wield_overlay", def.wield_overlay); getstringfield(L, index, "palette", def.palette_image); // Read item color. @@ -142,8 +144,12 @@ void push_item_definition_full(lua_State *L, const ItemDefinition &i) lua_setfield(L, -2, "type"); lua_pushstring(L, i.inventory_image.c_str()); lua_setfield(L, -2, "inventory_image"); + lua_pushstring(L, i.inventory_overlay.c_str()); + lua_setfield(L, -2, "inventory_overlay"); lua_pushstring(L, i.wield_image.c_str()); lua_setfield(L, -2, "wield_image"); + lua_pushstring(L, i.wield_overlay.c_str()); + lua_setfield(L, -2, "wield_overlay"); lua_pushstring(L, i.palette_image.c_str()); lua_setfield(L, -2, "palette_image"); push_ARGB8(L, i.color); |