upgrade
This commit is contained in:
parent
53ecd4c8ba
commit
7a8ae48dd4
|
@ -8,7 +8,7 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
|||
local S = moreblocks.intllib
|
||||
|
||||
|
||||
stairsplus.register_single = function(category, alternate, info, modname, subname, recipeitem, fields)
|
||||
stairsplus.register_single = function(category, alternate, info, modname, subname, recipeitem, fields, disabled_in_creative_inventory)
|
||||
local descriptions = {
|
||||
["micro"] = "Microblock",
|
||||
["slab"] = "Slab",
|
||||
|
@ -49,7 +49,7 @@ stairsplus.register_single = function(category, alternate, info, modname, subnam
|
|||
def.description = desc_base .. alternate:gsub("_", " "):gsub("(%a)(%S*)", function(a, b) return a:upper() .. b end)
|
||||
end
|
||||
end
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
def.groups = stairsplus:prepare_groups(fields.groups, disabled_in_creative_inventory)
|
||||
if category == "stair" and alternate == "" then
|
||||
def.groups.stair = 1
|
||||
end
|
||||
|
@ -58,4 +58,4 @@ stairsplus.register_single = function(category, alternate, info, modname, subnam
|
|||
end
|
||||
minetest.register_node(":" ..modname.. ":" .. category .. "_" .. subname .. alternate, def)
|
||||
stairsplus.register_recipes(category, alternate, modname, subname, recipeitem)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ end
|
|||
function stairsplus:register_micro(modname, subname, recipeitem, fields)
|
||||
local defs = table.copy(stairsplus.defs["micro"])
|
||||
for alternate, def in pairs(defs) do
|
||||
stairsplus.register_single("micro", alternate, def, modname, subname, recipeitem, fields)
|
||||
stairsplus.register_single("micro", alternate, def, modname, subname, recipeitem, fields, moreblocks.config.stairsplus_microblocks_not_in_creative_inventory)
|
||||
end
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
|
|
@ -37,7 +37,7 @@ end
|
|||
function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||
local defs = table.copy(stairsplus.defs["panel"])
|
||||
for alternate, def in pairs(defs) do
|
||||
stairsplus.register_single("panel", alternate, def, modname, subname, recipeitem, fields)
|
||||
stairsplus.register_single("panel", alternate, def, modname, subname, recipeitem, fields, moreblocks.config.stairsplus_panels_not_in_creative_inventory)
|
||||
end
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
|
|
@ -38,7 +38,7 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
|||
local defs = table.copy(stairsplus.defs["slab"])
|
||||
local desc_base = S("%s Slab"):format(fields.description)
|
||||
for alternate, shape in pairs(defs) do
|
||||
stairsplus.register_single("slab", alternate, shape, modname, subname, recipeitem, fields)
|
||||
stairsplus.register_single("slab", alternate, shape, modname, subname, recipeitem, fields, moreblocks.config.stairsplus_slabs_not_in_creative_inventory)
|
||||
end
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
|
|
@ -37,7 +37,7 @@ end
|
|||
function stairsplus:register_slope(modname, subname, recipeitem, fields)
|
||||
local defs = table.copy(stairsplus.defs["slope"])
|
||||
for alternate, def in pairs(defs) do
|
||||
stairsplus.register_single("slope", alternate, def, modname, subname, recipeitem, fields)
|
||||
stairsplus.register_single("slope", alternate, def, modname, subname, recipeitem, fields, moreblocks.config.stairsplus_slopes_not_in_creative_inventory)
|
||||
end
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
|
|
@ -37,7 +37,7 @@ end
|
|||
function stairsplus:register_stair(modname, subname, recipeitem, fields)
|
||||
local defs = table.copy(stairsplus.defs["stair"])
|
||||
for alternate, def in pairs(defs) do
|
||||
stairsplus.register_single("stair", alternate, def, modname, subname, recipeitem, fields)
|
||||
stairsplus.register_single("stair", alternate, def, modname, subname, recipeitem, fields, moreblocks.config.stairsplus_stairs_not_in_creative_inventory)
|
||||
end
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
|
Loading…
Reference in New Issue