Script item_entities.lua
adds 3d items for guns and magazines
Functions
Guns4d.register_item (itemstring, def) | replaces the item entity of the provided item with a 3d entity based on the definition |
Tables
guns4d_itemdef | table defining the new 3d entity for a dropped item |
Functions
- Guns4d.register_item (itemstring, def)
-
replaces the item entity of the provided item with a 3d entity based on the definition
Parameters:
- itemstring
- def , a guns4d_itemdef
Tables
- guns4d_itemdef
-
table defining the new 3d entity for a dropped item
Fields:
- light_source int, equivelant to minetest itemdef version
- size int, the size of the collision box
- mesh string, the mesh to use for the item
- textures table, a list of textures (see minetest entity documentation)
- collisionbox_size , the size of collisionbox in tenths of meters.
- selectionbox vector, xyz scale of the selectionbox
- offset vector, xyz offset of the visual object from the collision and selectionbox. (so that magazines's origin can match their bone.)