Skip to content

Commit

Permalink
Stair and Slab groups.
Browse files Browse the repository at this point in the history
Organizing these in groups will allow mods to do several things
easier:

- create craft recipes using them as ingredients
- manipulate map nodes based on group properties

There are quite a few slab and stair blocks already, so automatically
add these groups at registration time for all of those. Since most
mods I've seen use the registration code in this submod, they will
also benefit.
  • Loading branch information
sofar authored and paramat committed Jan 26, 2016
1 parent 4b8410a commit a5d40e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mods/stairs/init.lua
Expand Up @@ -22,6 +22,7 @@ local replace = minetest.setting_getbool("enable_stairs_replace_abm")
-- Node will be called stairs:stair_<subname>

function stairs.register_stair(subname, recipeitem, groups, images, description, sounds)
groups.stair = 1
minetest.register_node(":stairs:stair_" .. subname, {
description = description,
drawtype = "mesh",
Expand Down Expand Up @@ -111,6 +112,7 @@ end
-- Node will be called stairs:slab_<subname>

function stairs.register_slab(subname, recipeitem, groups, images, description, sounds)
groups.slab = 1
minetest.register_node(":stairs:slab_" .. subname, {
description = description,
drawtype = "nodebox",
Expand Down

0 comments on commit a5d40e1

Please sign in to comment.