Skip to content

Commit b7ff40e

Browse files
committedFeb 5, 2018
Lua_api.txt: Document 'wielditem' visual in object properties
1 parent 520293b commit b7ff40e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

Diff for: ‎doc/lua_api.txt

+11
Original file line numberDiff line numberDiff line change
@@ -4448,6 +4448,16 @@ Definition tables
44484448
-- ^ "sprite" is a flat texture always facing the player.
44494449
-- ^ "upright_sprite" is a vertical flat texture.
44504450
-- ^ "mesh" uses the defined mesh model.
4451+
-- ^ "wielditem" is used for dropped items (see builtin/game/item_entity.lua).
4452+
-- For this use 'textures = {itemname}'.
4453+
-- If the item has a 'wield_image' the object will be an extrusion of that,
4454+
-- otherwise:
4455+
-- If 'itemname' is a cubic node or nodebox the object will appear identical
4456+
-- to 'itemname'.
4457+
-- If 'itemname' is a plantlike node the object will be an extrusion of its
4458+
-- texture.
4459+
-- Otherwise for non-node items, the object will be an extrusion of
4460+
-- 'inventory_image'.
44514461
visual_size = {x = 1, y = 1},
44524462
-- ^ `x` multiplies horizontal (X and Z) visual size.
44534463
-- ^ `y` multiplies vertical (Y) visual size.
@@ -4456,6 +4466,7 @@ Definition tables
44564466
-- ^ "cube" uses 6 textures in the way a node does.
44574467
-- ^ "sprite" uses 1 texture.
44584468
-- ^ "upright_sprite" uses 2 textures: {front, back}.
4469+
-- ^ "wielditem" expects 'textures = {itemname}' (see 'visual' above).
44594470
colors = {}, -- number of required colors depends on visual
44604471
spritediv = {x = 1, y = 1},
44614472
-- ^ Used with spritesheet textures for animation and/or frame selection according

0 commit comments

Comments
 (0)
Please sign in to comment.