Automatically add craft for walls
This commit is contained in:
parent
beb8e50eb6
commit
e866c610cb
2 changed files with 22 additions and 20 deletions
|
@ -2,18 +2,25 @@
|
|||
|
||||
This API allows you to add more walls (like the cobblestone wall) to MineClone 2.
|
||||
|
||||
## `mcl_walls.register_wall(nodename, description, tiles, invtex, groups, sounds)`
|
||||
## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds)`
|
||||
|
||||
Adds a new wall type. This is optimized for stone-based walls, but other materials are theoretically possible, too.
|
||||
|
||||
The current implementation registers a couple of nodes for the different nodeboxes.
|
||||
All walls connect to solid nodes and all other wall nodes.
|
||||
|
||||
The crafting recipe is NOT registered, you have to add your own.
|
||||
If `craft_material` is not `nil` it also adds a crafting recipe of the following form:
|
||||
|
||||
CCC
|
||||
CCC
|
||||
|
||||
Yields 6 walls
|
||||
C = craft_material (can be group)
|
||||
|
||||
### Parameters
|
||||
* `nodename`: Full itemstring of the new wall node (base node only). ***Must not have an underscore!***
|
||||
* `description`: Item description of item (tooltip), visible to user
|
||||
* `craft_material`: Item to be used in the crafting recipe. If `nil`, no crafting recipe will be added
|
||||
* `tiles`: Wall textures table, same syntax as for `minetest.register_node`
|
||||
* `inventory_image`: Inventory image (optional, default is an ugly 3D image)
|
||||
* `groups`: Base group memberships (optional, default is `{cracky=3}`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue