Skip to content

Commit

Permalink
Lua_api.txt: Document 'wielditem' visual in object properties
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Feb 5, 2018
1 parent 520293b commit b7ff40e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/lua_api.txt
Expand Up @@ -4448,6 +4448,16 @@ Definition tables
-- ^ "sprite" is a flat texture always facing the player.
-- ^ "upright_sprite" is a vertical flat texture.
-- ^ "mesh" uses the defined mesh model.
-- ^ "wielditem" is used for dropped items (see builtin/game/item_entity.lua).
-- For this use 'textures = {itemname}'.
-- If the item has a 'wield_image' the object will be an extrusion of that,
-- otherwise:
-- If 'itemname' is a cubic node or nodebox the object will appear identical
-- to 'itemname'.
-- If 'itemname' is a plantlike node the object will be an extrusion of its
-- texture.
-- Otherwise for non-node items, the object will be an extrusion of
-- 'inventory_image'.
visual_size = {x = 1, y = 1},
-- ^ `x` multiplies horizontal (X and Z) visual size.
-- ^ `y` multiplies vertical (Y) visual size.
Expand All @@ -4456,6 +4466,7 @@ Definition tables
-- ^ "cube" uses 6 textures in the way a node does.
-- ^ "sprite" uses 1 texture.
-- ^ "upright_sprite" uses 2 textures: {front, back}.
-- ^ "wielditem" expects 'textures = {itemname}' (see 'visual' above).
colors = {}, -- number of required colors depends on visual
spritediv = {x = 1, y = 1},
-- ^ Used with spritesheet textures for animation and/or frame selection according
Expand Down

0 comments on commit b7ff40e

Please sign in to comment.