mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-06-28 06:11:47 +02:00
Updated moreblocks mod
- Removed copies of license, merge conflicts' garbage - Added warnings about modifications made by us
This commit is contained in:
@ -35,24 +35,26 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
||||
for _, name in pairs(default_nodes) do
|
||||
local nodename = "default:" .. name
|
||||
local ndef = minetest.registered_nodes[nodename]
|
||||
local groups = {}
|
||||
for k, v in pairs(ndef.groups)
|
||||
-- Ignore wood and stone groups to not make them usable in crafting:
|
||||
do if k ~= "wood" and k ~= "stone" then
|
||||
groups[k] = v
|
||||
if ndef then
|
||||
local groups = {}
|
||||
for k, v in pairs(ndef.groups)
|
||||
-- Ignore wood and stone groups to not make them usable in crafting:
|
||||
do if k ~= "wood" and k ~= "stone" then
|
||||
groups[k] = v
|
||||
end
|
||||
end
|
||||
local drop
|
||||
if type(ndef.drop) == "string" then
|
||||
drop = ndef.drop:sub(9)
|
||||
end
|
||||
stairsplus:register_all("moreblocks", name, nodename, {
|
||||
description = ndef.description,
|
||||
drop = drop,
|
||||
groups = groups,
|
||||
sounds = ndef.sounds,
|
||||
tiles = ndef.tiles,
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
end
|
||||
local drop
|
||||
if type(ndef.drop) == "string" then
|
||||
drop = ndef.drop:sub(9)
|
||||
end
|
||||
stairsplus:register_all("moreblocks", name, nodename, {
|
||||
description = ndef.description,
|
||||
drop = drop,
|
||||
groups = groups,
|
||||
sounds = ndef.sounds,
|
||||
tiles = ndef.tiles,
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -22,51 +22,22 @@ end
|
||||
|
||||
function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
||||
local defs = {
|
||||
[""] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
},
|
||||
["_quarter"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
},
|
||||
},
|
||||
["_three_quarter"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5},
|
||||
},
|
||||
},
|
||||
["_1"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
||||
},
|
||||
},
|
||||
["_2"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
|
||||
},
|
||||
},
|
||||
["_14"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.375, 0.5},
|
||||
},
|
||||
},
|
||||
["_15"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
|
||||
},
|
||||
},
|
||||
[""] = 8,
|
||||
["_quarter"] = 4,
|
||||
["_three_quarter"] = 12,
|
||||
["_1"] = 1,
|
||||
["_2"] = 2,
|
||||
["_14"] = 14,
|
||||
["_15"] = 15,
|
||||
}
|
||||
local desc = S("%s Slab"):format(fields.description)
|
||||
for alternate, def in pairs(defs) do
|
||||
local desc_base = S("%s Slab"):format(fields.description)
|
||||
for alternate, num in pairs(defs) do
|
||||
local def = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, (num/16)-0.5, 0.5},
|
||||
}
|
||||
}
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
@ -74,7 +45,7 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.description = desc
|
||||
def.description = ("%s (%d/16)"):format(desc_base, num)
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":slab_" .. fields.drop .. alternate
|
||||
end
|
||||
|
Reference in New Issue
Block a user