Version MFF.
0
LICENSE.md
Normal file → Executable file
42
aliases.lua
Normal file → Executable file
@ -10,6 +10,37 @@ minetest.register_alias("sweeper", "moreblocks:sweeper")
|
||||
minetest.register_alias("circular_saw", "moreblocks:circular_saw")
|
||||
minetest.register_alias("jungle_stick", "moreblocks:jungle_stick")
|
||||
|
||||
-- Wrong drops
|
||||
|
||||
-- //MFF(Mg|10/11/15)
|
||||
|
||||
-- Microblocks
|
||||
for _,i in pairs({"", "_1", "_2", "_4", "_12", "_14", "_15"}) do
|
||||
minetest.register_alias("moreblocks:micro_clay_brick" .. i, "moreblocks:micro_brick" .. i)
|
||||
end
|
||||
|
||||
-- Panels
|
||||
for _,i in pairs({"", "_1", "_2", "_4", "_12", "_14", "_15"}) do
|
||||
minetest.register_alias("moreblocks:panel_clay_brick" .. i, "moreblocks:panel_brick" .. i)
|
||||
end
|
||||
|
||||
-- Slabs
|
||||
for _,i in pairs({"", "_1", "_2", "_quarter", "_three_quarter", "_14", "_15"}) do
|
||||
minetest.register_alias("moreblocks:slab_clay_brick" .. i, "moreblocks:slab_brick" .. i)
|
||||
end
|
||||
|
||||
-- Stairs
|
||||
for _,i in pairs({"", "_outer", "_inner", "_alt", "_alt_1", "_alt_2", "_alt_4", "_half"}) do
|
||||
minetest.register_alias("moreblocks:stair_clay_brick" .. i, "moreblocks:stair_brick" .. i)
|
||||
end
|
||||
|
||||
-- Slopes
|
||||
for _,i in pairs({"", "_half", "_half_raised", "_outer", "_outer_cut", "_outer_cut_half", "_outer_half", "_outer_half_raised", "_inner", "_inner_half", "_inner_half_raised"}) do
|
||||
minetest.register_alias("moreblocks:slope_clay_brick" .. i, "moreblocks:slope_brick" .. i)
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- Old block/item replacement:
|
||||
minetest.register_alias("moreblocks:oerkkiblock", "default:mossycobble")
|
||||
minetest.register_alias("moreblocks:screwdriver", "screwdriver:screwdriver")
|
||||
@ -59,20 +90,17 @@ minetest.register_alias("moreblocks:allfacestree","moreblocks:all_faces_tree")
|
||||
local horizontal_tree_convert_facedir = {7, 12, 9, 18}
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"moreblocks:horizontal_tree","moreblocks:horizontal_jungle_tree"},
|
||||
nodenames = {"moreblocks:horizontal_tree"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
if node.name == "moreblocks:horizontal_tree" then
|
||||
node.name = "default:tree"
|
||||
else
|
||||
node.name = "default:jungletree"
|
||||
end
|
||||
node.param2 = node.param2 < 3 and node.param2 or 0
|
||||
minetest.set_node(pos, {
|
||||
name = node.name,
|
||||
name = "default:tree",
|
||||
param2 = horizontal_tree_convert_facedir[node.param2 + 1]
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_alias("moreblocks:jungle_stick", "default:stick")
|
||||
minetest.register_alias("moreblocks:fence_jungle_wood", "default:fence_junglewood")
|
||||
|
43
circular_saw.lua
Normal file → Executable file
@ -31,36 +31,33 @@ circular_saw.cost_in_microblocks = {
|
||||
6, 2, 1, 3, 4,
|
||||
}
|
||||
|
||||
-- This parameter is legacy node
|
||||
circular_saw.names = {
|
||||
{"micro", "_1"},
|
||||
{"panel", "_1"},
|
||||
{"micro", "_2"},
|
||||
{"panel", "_2"},
|
||||
{"micro", "_4"},
|
||||
{"panel", "_4"},
|
||||
{"micro", ""},
|
||||
{"panel", ""},
|
||||
|
||||
{"micro", "_12"},
|
||||
{"panel", "_12"},
|
||||
{"micro", "_14"},
|
||||
{"panel", "_14"},
|
||||
{"micro", "_15"},
|
||||
{"panel", "_15"},
|
||||
|
||||
{"stair", "_outer"},
|
||||
{"stair", ""},
|
||||
{"stair", "_inner"},
|
||||
|
||||
{"slab", "_1"},
|
||||
{"slab", "_2"},
|
||||
{"slab", "_quarter"},
|
||||
{"slab", ""},
|
||||
{"slab", "_three_quarter"},
|
||||
{"slab", "_14"},
|
||||
{"slab", "_15"},
|
||||
|
||||
{"stair", "_half"},
|
||||
{"stair", "_alt_1"},
|
||||
{"stair", "_alt_2"},
|
||||
{"stair", "_alt_4"},
|
||||
{"stair", "_alt"},
|
||||
|
||||
{"slope", ""},
|
||||
{"slope", "_half"},
|
||||
{"slope", "_half_raised"},
|
||||
@ -100,12 +97,14 @@ function circular_saw:get_output_inv(modname, material, amount, max)
|
||||
|
||||
for i = 1, #circular_saw.names do
|
||||
local t = circular_saw.names[i]
|
||||
local cost = circular_saw.cost_in_microblocks[i]
|
||||
local balance = math.min(math.floor(amount/cost), max)
|
||||
local nodename = modname .. ":" .. t[1] .. "_" .. material .. t[2]
|
||||
if minetest.registered_nodes[nodename] then
|
||||
pos = pos + 1
|
||||
list[pos] = nodename .. " " .. balance
|
||||
if not t[3] then
|
||||
local cost = circular_saw.cost_in_microblocks[i]
|
||||
local balance = math.min(math.floor(amount/cost), max)
|
||||
local nodename = modname .. ":" .. t[1] .. "_" .. material .. t[2]
|
||||
if minetest.registered_nodes[nodename] then
|
||||
pos = pos + 1
|
||||
list[pos] = nodename .. " " .. balance
|
||||
end
|
||||
end
|
||||
end
|
||||
return list
|
||||
@ -145,7 +144,7 @@ function circular_saw:update_inventory(pos, amount)
|
||||
self:reset(pos)
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local stack = inv:get_stack("input", 1)
|
||||
-- At least one "normal" block is necessary to see what kind of stairs are requested.
|
||||
if stack:is_empty() then
|
||||
@ -371,14 +370,14 @@ function circular_saw.can_dig(pos,player)
|
||||
end
|
||||
|
||||
minetest.register_node("moreblocks:circular_saw", {
|
||||
description = S("Circular Saw"),
|
||||
drawtype = "nodebox",
|
||||
description = S("Circular Saw"),
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.4, -0.5, -0.4, -0.25, 0.25, -0.25}, -- Leg
|
||||
{0.25, -0.5, 0.25, 0.4, 0.25, 0.4}, -- Leg
|
||||
{-0.4, -0.5, 0.25, -0.25, 0.25, 0.4}, -- Leg
|
||||
{-0.4, -0.5, 0.25, -0.25, 0.25, 0.4}, -- Leg
|
||||
{0.25, -0.5, -0.4, 0.4, 0.25, -0.25}, -- Leg
|
||||
{-0.5, 0.25, -0.5, 0.5, 0.375, 0.5}, -- Tabletop
|
||||
{-0.01, 0.4375, -0.125, 0.01, 0.5, 0.125}, -- Saw blade (top)
|
||||
@ -389,9 +388,9 @@ minetest.register_node("moreblocks:circular_saw", {
|
||||
tiles = {"moreblocks_circular_saw_top.png",
|
||||
"moreblocks_circular_saw_bottom.png",
|
||||
"moreblocks_circular_saw_side.png"},
|
||||
paramtype = "light",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 2,oddly_breakable_by_hand = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_construct = circular_saw.on_construct,
|
||||
|
0
config.lua
Normal file → Executable file
64
crafting.lua
Normal file → Executable file
@ -23,16 +23,10 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "default:wood",
|
||||
recipe = {
|
||||
{"default:stick", "default:stick"},
|
||||
{"default:stick", "default:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:junglewood",
|
||||
recipe = {
|
||||
{"moreblocks:jungle_stick", "moreblocks:jungle_stick"},
|
||||
{"moreblocks:jungle_stick", "moreblocks:jungle_stick"},
|
||||
{"default:stick", "default:stick", "default:stick"},
|
||||
{"default:stick", "default:stick", "default:stick"},
|
||||
{"default:stick", "default:stick", "default:stick"}
|
||||
-- MODIFICATION MADE FOR MFF ^
|
||||
}
|
||||
})
|
||||
|
||||
@ -121,19 +115,6 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:junglestick 4",
|
||||
recipe = {{"default:junglewood"},}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:fence_jungle_wood 2",
|
||||
recipe = {
|
||||
{"moreblocks:jungle_stick", "moreblocks:jungle_stick", "moreblocks:jungle_stick"},
|
||||
{"moreblocks:jungle_stick", "moreblocks:jungle_stick", "moreblocks:jungle_stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:circle_stone_bricks 8",
|
||||
recipe = {
|
||||
@ -440,14 +421,14 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:cobble_compressed",
|
||||
recipe = {
|
||||
{"default:cobble", "default:cobble", "default:cobble"},
|
||||
{"default:cobble", "default:cobble", "default:cobble"},
|
||||
{"default:cobble", "default:cobble", "default:cobble"},
|
||||
{"default:cobble"},
|
||||
{"default:cobble"},
|
||||
-- MODIFICATION MADE FOR MFF
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:cobble 9",
|
||||
output = "default:cobble 2", -- MODIFICATION MADE FOR MFF
|
||||
recipe = {
|
||||
{"moreblocks:cobble_compressed"},
|
||||
}
|
||||
@ -459,7 +440,7 @@ minetest.register_craft({
|
||||
|
||||
if minetest.setting_getbool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:circular_saw",
|
||||
output = "moreblocks:circular_saw",
|
||||
recipe = {
|
||||
{ "", "default:steel_ingot", "" },
|
||||
{ "group:wood", "group:wood", "group:wood"},
|
||||
@ -467,3 +448,30 @@ if minetest.setting_getbool("moreblocks.circular_saw_crafting") ~= false then --
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- MODIFICATION MADE FOR MFF //MFF(Mg|08/09/15)
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:horizontal_jungle_tree 2",
|
||||
recipe = {
|
||||
{"default:jungletree", "", "default:jungletree"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:jungletree 2",
|
||||
recipe = {
|
||||
{"moreblocks:horizontal_jungle_tree"},
|
||||
{"moreblocks:horizontal_jungle_tree"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:junglewood 4",
|
||||
recipe = {
|
||||
{"moreblocks:horizontal_jungle_tree"},
|
||||
}
|
||||
})
|
||||
|
||||
-- END OF MODIFICATIONS
|
||||
|
0
depends.txt
Normal file → Executable file
0
locale/de.txt
Normal file → Executable file
0
locale/es.txt
Normal file → Executable file
0
locale/fr.txt
Normal file → Executable file
0
locale/template.txt
Normal file → Executable file
0
models/moreblocks_slope.obj
Normal file → Executable file
0
models/moreblocks_slope_cut.obj
Normal file → Executable file
0
models/moreblocks_slope_half.obj
Normal file → Executable file
0
models/moreblocks_slope_half_raised.obj
Normal file → Executable file
0
models/moreblocks_slope_inner.obj
Normal file → Executable file
0
models/moreblocks_slope_inner_cut.obj
Normal file → Executable file
0
models/moreblocks_slope_inner_cut_half.obj
Normal file → Executable file
0
models/moreblocks_slope_inner_cut_half_raised.obj
Normal file → Executable file
0
models/moreblocks_slope_inner_half.obj
Normal file → Executable file
0
models/moreblocks_slope_inner_half_raised.obj
Normal file → Executable file
0
models/moreblocks_slope_outer.obj
Normal file → Executable file
0
models/moreblocks_slope_outer_cut.obj
Normal file → Executable file
0
models/moreblocks_slope_outer_cut_half.obj
Normal file → Executable file
0
models/moreblocks_slope_outer_cut_half_raised.obj
Normal file → Executable file
0
models/moreblocks_slope_outer_half.obj
Normal file → Executable file
0
models/moreblocks_slope_outer_half_raised.obj
Normal file → Executable file
62
nodes.lua
Normal file → Executable file
@ -137,8 +137,7 @@ local nodes = {
|
||||
["iron_glass"] = {
|
||||
description = S("Iron Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
--tiles = {"moreblocks_iron_glass.png", "moreblocks_iron_glass_detail.png"},
|
||||
tiles = {"moreblocks_iron_glass.png"},
|
||||
tiles = {"moreblocks_iron_glass.png", "moreblocks_iron_glass_detail.png"}, --MFF connected glass
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
@ -147,8 +146,7 @@ local nodes = {
|
||||
["coal_glass"] = {
|
||||
description = S("Coal Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
--tiles = {"moreblocks_coal_glass.png", "moreblocks_coal_glass_detail.png"},
|
||||
tiles = {"moreblocks_coal_glass.png"},
|
||||
tiles = {"moreblocks_coal_glass.png", "moreblocks_coal_glass_detail.png"}, --MFF connected glass
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
@ -157,8 +155,7 @@ local nodes = {
|
||||
["clean_glass"] = {
|
||||
description = S("Clean Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
--tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"},
|
||||
tiles = {"moreblocks_clean_glass.png"},
|
||||
tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"}, --MFF connected glass
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
@ -230,8 +227,7 @@ local nodes = {
|
||||
["trap_glass"] = {
|
||||
description = S("Trap Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
--tiles = {"moreblocks_trap_glass.png", "default_glass_detail.png"},
|
||||
tiles = {"moreblocks_trap_glass.png"},
|
||||
tiles = {"moreblocks_trap_glass.png", "default_glass_detail.png"}, --MFF connected glass
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
@ -239,21 +235,6 @@ local nodes = {
|
||||
sounds = sound_glass,
|
||||
no_stairs = true,
|
||||
},
|
||||
["fence_jungle_wood"] = {
|
||||
description = S("Jungle Wood Fence"),
|
||||
drawtype = "fencelike",
|
||||
tiles = {"default_junglewood.png"},
|
||||
inventory_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
|
||||
},
|
||||
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = sound_wood,
|
||||
no_stairs = true,
|
||||
},
|
||||
["all_faces_tree"] = {
|
||||
description = S("All-faces Tree"),
|
||||
tiles = {"default_tree_top.png"},
|
||||
@ -268,11 +249,23 @@ local nodes = {
|
||||
sounds = sound_wood,
|
||||
furnace_burntime = 30,
|
||||
},
|
||||
["horizontal_jungle_tree"] = {
|
||||
description = S("Horizontal Jungle Tree"),
|
||||
tiles = {"default_jungletree.png",
|
||||
"default_jungletree.png",
|
||||
"default_jungletree.png^[transformR90",
|
||||
"default_jungletree.png^[transformR90",
|
||||
"default_jungletree_top.png",
|
||||
"default_jungletree_top.png"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
sounds = sound_wood,
|
||||
furnace_burntime = 30,
|
||||
},
|
||||
["glow_glass"] = {
|
||||
description = S("Glow Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
--tiles = {"moreblocks_glow_glass.png", "moreblocks_glow_glass_detail.png"},
|
||||
tiles = {"moreblocks_glow_glass.png"},
|
||||
tiles = {"moreblocks_glow_glass.png", "moreblocks_glow_glass_detail.png"}, --MFF connected glass
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 11,
|
||||
@ -282,8 +275,7 @@ local nodes = {
|
||||
["trap_glow_glass"] = {
|
||||
description = S("Trap Glow Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
--tiles = {"moreblocks_trap_glass.png", "moreblocks_glow_glass_detail.png"},
|
||||
tiles = {"moreblocks_trap_glass.png"},
|
||||
tiles = {"moreblocks_trap_glass.png", "moreblocks_glow_glass_detail.png"}, --MFF connected glass
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 11,
|
||||
@ -295,22 +287,20 @@ local nodes = {
|
||||
["super_glow_glass"] = {
|
||||
description = S("Super Glow Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
--tiles = {"moreblocks_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"},
|
||||
tiles = {"moreblocks_super_glow_glass.png"},
|
||||
tiles = {"moreblocks_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"}, --MFF connected glass
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 15,
|
||||
light_source = default.LIGHT_MAX,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
},
|
||||
["trap_super_glow_glass"] = {
|
||||
description = S("Trap Super Glow Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
--tiles = {"moreblocks_trap_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"},
|
||||
tiles = {"moreblocks_trap_super_glow_glass.png"},
|
||||
tiles = {"moreblocks_trap_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"}, --MFF connected glass
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 15,
|
||||
light_source = default.LIGHT_MAX,
|
||||
walkable = false,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
@ -359,12 +349,6 @@ minetest.register_craftitem("moreblocks:sweeper", {
|
||||
inventory_image = "moreblocks_sweeper.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("moreblocks:jungle_stick", {
|
||||
description = S("Jungle Stick"),
|
||||
inventory_image = "moreblocks_junglestick.png",
|
||||
groups = {stick= 1},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("moreblocks:nothing", {
|
||||
inventory_image = "invisible.png",
|
||||
on_use = function() end,
|
||||
|
0
ownership.lua
Normal file → Executable file
12
redefinitions.lua
Normal file → Executable file
@ -10,9 +10,9 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
||||
minetest.register_craft({
|
||||
output = "default:sign_wall 4",
|
||||
recipe = {
|
||||
{"default:wood", "default:wood", "default:wood"},
|
||||
{"default:wood", "default:wood", "default:wood"},
|
||||
{"", "default:stick", ""},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"", "group:stick", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@ -32,14 +32,14 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:rail 24",
|
||||
--[[minetest.register_craft({
|
||||
output = "default:rail 16", -- /MFF (Mg|06/10/15) => (Ombridride|26/07/15)
|
||||
recipe = {
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:stick", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
})--]]
|
||||
|
||||
minetest.register_craft({
|
||||
type = "toolrepair",
|
||||
|
0
stairsplus/API.md
Normal file → Executable file
0
stairsplus/aliases.lua
Normal file → Executable file
4
stairsplus/conversion.lua
Normal file → Executable file
@ -81,7 +81,7 @@ function stairsplus:register_6dfacedir_conversion(modname, material)
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local fdir = node.param2 or 0
|
||||
|
||||
if flip_upside_down and not flip_to_wall then
|
||||
if flip_upside_down and not flip_to_wall then
|
||||
nfdir = dirs1[fdir + 2]
|
||||
elseif flip_to_wall and not flip_upside_down then
|
||||
nfdir = dirs2[fdir + 1]
|
||||
@ -125,7 +125,7 @@ function stairsplus:register_6dfacedir_conversion(modname, material)
|
||||
local fdir = node.param2
|
||||
local nfdir = 20
|
||||
|
||||
if flip_upside_down and not flip_to_wall then
|
||||
if flip_upside_down and not flip_to_wall then
|
||||
nfdir = dirs1[fdir + 1]
|
||||
elseif flip_to_wall and not flip_upside_down then
|
||||
nfdir = dirs2[fdir + 2]
|
||||
|
0
stairsplus/init.lua
Normal file → Executable file
68
stairsplus/microblocks.lua
Normal file → Executable file
@ -34,30 +34,15 @@ function stairsplus:register_micro(modname, subname, recipeitem, fields)
|
||||
fixed = {-0.5, -0.5, 0, 0, -0.4375, 0.5},
|
||||
},
|
||||
},
|
||||
["_2"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0, -0.375, 0.5},
|
||||
},
|
||||
},
|
||||
["_4"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0, -0.25, 0.5},
|
||||
},
|
||||
},
|
||||
["_2"] = {legacy = "_1"},
|
||||
["_4"] = {legacy = ""},
|
||||
["_12"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0, 0.25, 0.5},
|
||||
},
|
||||
},
|
||||
["_14"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0, 0.375, 0.5},
|
||||
},
|
||||
},
|
||||
["_14"] = {legacy = "_15"},
|
||||
["_15"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -68,68 +53,73 @@ function stairsplus:register_micro(modname, subname, recipeitem, fields)
|
||||
|
||||
local desc = S("%s Microblock"):format(fields.description)
|
||||
for alternate, def in pairs(defs) do
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
if def.legacy then
|
||||
minetest.register_alias(modname .. ":micro_" .. subname .. alternate,
|
||||
modname .. ":micro_" .. subname .. def.legacy)
|
||||
else
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
def.description = desc
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":micro_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":micro_" ..subname..alternate, def)
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
def.description = desc
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":micro_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":micro_" ..subname..alternate, def)
|
||||
end
|
||||
minetest.register_alias(modname.. ":micro_" ..subname.. "_bottom", modname.. ":micro_" ..subname)
|
||||
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 7",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_inner"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":micro_" .. subname .. " 6",
|
||||
type = "shapeless",
|
||||
recipe = {modname .. ":stair_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 5",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_outer"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 4",
|
||||
recipe = {modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 4",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_alt"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 3",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_right_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 2",
|
||||
recipe = {modname .. ":panel_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
|
58
stairsplus/panels.lua
Normal file → Executable file
@ -34,30 +34,15 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||
fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5},
|
||||
},
|
||||
},
|
||||
["_2"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5},
|
||||
},
|
||||
},
|
||||
["_4"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5},
|
||||
},
|
||||
},
|
||||
["_2"] = {legacy = "_1"},
|
||||
["_4"] = {legacy = ""},
|
||||
["_12"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5},
|
||||
},
|
||||
},
|
||||
["_14"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5},
|
||||
},
|
||||
},
|
||||
["_14"] = {legacy = "_15"},
|
||||
["_15"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -68,22 +53,27 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||
|
||||
local desc = S("%s Panel"):format(fields.description)
|
||||
for alternate, def in pairs(defs) do
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
if def.legacy then
|
||||
minetest.register_alias(modname .. ":panel_" .. subname .. alternate,
|
||||
modname .. ":panel_" .. subname .. def.legacy)
|
||||
else
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.description = desc
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":panel_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":panel_" ..subname..alternate, def)
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.description = desc
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":panel_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":panel_" ..subname..alternate, def)
|
||||
end
|
||||
minetest.register_alias(modname.. ":panel_" ..subname.. "_bottom", modname.. ":panel_" ..subname)
|
||||
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
@ -95,7 +85,7 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||
{recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":panel_" .. subname .. " 12",
|
||||
recipe = {
|
||||
@ -103,13 +93,13 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||
{recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":panel_" .. subname,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
|
4
stairsplus/registrations.lua
Normal file → Executable file
@ -26,6 +26,8 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
||||
"junglewood",
|
||||
"pine_tree",
|
||||
"pine_wood",
|
||||
"cherry_tree",
|
||||
"cherry_plank",
|
||||
"acacia_tree",
|
||||
"acacia_wood",
|
||||
"obsidian",
|
||||
@ -42,7 +44,7 @@ for _, name in pairs(default_nodes) do
|
||||
if ndef then
|
||||
local drop
|
||||
if type(ndef.drop) == "string" then
|
||||
drop = ndef.drop:sub(9)
|
||||
drop = ndef.drop:split(" ")[1]:sub(9)
|
||||
end
|
||||
|
||||
local tiles = ndef.tiles
|
||||
|
87
stairsplus/slabs.lua
Normal file → Executable file
@ -26,32 +26,37 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
||||
["_quarter"] = 4,
|
||||
["_three_quarter"] = 12,
|
||||
["_1"] = 1,
|
||||
["_2"] = 2,
|
||||
["_14"] = 14,
|
||||
["_2"] = "_1",
|
||||
["_14"] = "_three_quarter",
|
||||
["_15"] = 15,
|
||||
}
|
||||
|
||||
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},
|
||||
if type(num) == type("moo") then
|
||||
minetest.register_alias(modname .. ":slab_" .. subname .. alternate,
|
||||
modname .. ":slab_" .. subname .. num)
|
||||
else
|
||||
local def = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, (num/16)-0.5, 0.5},
|
||||
}
|
||||
}
|
||||
}
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.description = ("%s (%d/16)"):format(desc_base, num)
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":slab_" .. fields.drop .. alternate
|
||||
end
|
||||
minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.description = ("%s (%d/16)"):format(desc_base, num)
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":slab_" .. fields.drop .. alternate
|
||||
end
|
||||
minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)
|
||||
end
|
||||
minetest.register_alias("stairs:slab_" .. subname, modname .. ":slab_" .. subname)
|
||||
|
||||
@ -63,13 +68,13 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
||||
output = modname .. ":slab_" .. subname .. " 6",
|
||||
recipe = {{recipeitem, recipeitem, recipeitem}},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
-- uncomment this rule when conflict is no longer likely to happen
|
||||
-- https://github.com/minetest/minetest/issues/2881
|
||||
-- minetest.register_craft({
|
||||
@ -77,13 +82,13 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
||||
-- output = modname .. ":slab_" .. subname,
|
||||
-- recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
-- })
|
||||
|
||||
|
||||
-- then remove these two
|
||||
minetest.register_craft({
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {{modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {
|
||||
@ -98,109 +103,109 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_15", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_2",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_three_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_three_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_three_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_14",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_14",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_15",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. " 3",
|
||||
|
46
stairsplus/slopes.lua
Normal file → Executable file
@ -129,7 +129,7 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
|
||||
mesh = "moreblocks_slope.obj",
|
||||
collision_box = box_slope,
|
||||
selection_box = box_slope,
|
||||
|
||||
|
||||
},
|
||||
["_half"] = {
|
||||
mesh = "moreblocks_slope_half.obj",
|
||||
@ -141,9 +141,9 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
|
||||
collision_box = box_slope_half_raised,
|
||||
selection_box = box_slope_half_raised,
|
||||
},
|
||||
|
||||
|
||||
--==============================================================
|
||||
|
||||
|
||||
["_inner"] = {
|
||||
mesh = "moreblocks_slope_inner.obj",
|
||||
collision_box = box_slope_inner,
|
||||
@ -159,9 +159,9 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
|
||||
collision_box = box_slope_inner_half_raised,
|
||||
selection_box = box_slope_inner_half_raised,
|
||||
},
|
||||
|
||||
|
||||
--==============================================================
|
||||
|
||||
|
||||
["_inner_cut"] = {
|
||||
mesh = "moreblocks_slope_inner_cut.obj",
|
||||
collision_box = box_slope_inner,
|
||||
@ -195,9 +195,9 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
|
||||
collision_box = box_slope_outer_half_raised,
|
||||
selection_box = box_slope_outer_half_raised,
|
||||
},
|
||||
|
||||
|
||||
--==============================================================
|
||||
|
||||
|
||||
["_outer_cut"] = {
|
||||
mesh = "moreblocks_slope_outer_cut.obj",
|
||||
collision_box = box_slope_outer,
|
||||
@ -246,99 +246,99 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half_raised"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
|
||||
modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer", modname .. ":slope_" .. subname .. "_inner"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half_raised"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised", modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_inner_cut"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half_raised"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_cut", modname .. ":slope_" .. subname .. "_cut"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_half_raised",
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
|
||||
modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_inner_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_outer_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_inner_cut_half_raised",
|
||||
|
69
stairsplus/stairs.lua
Normal file → Executable file
@ -86,15 +86,7 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
|
||||
},
|
||||
},
|
||||
},
|
||||
["_alt_2"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.125, -0.5, 0.5, 0, 0},
|
||||
{-0.5, 0.375, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_alt_2"] = {legacy = "_alt_1"},
|
||||
["_alt_4"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -108,28 +100,33 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
|
||||
|
||||
local desc = S("%s Stairs"):format(fields.description)
|
||||
for alternate, def in pairs(defs) do
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
if def.legacy then
|
||||
minetest.register_alias(modname .. ":stair_" .. subname .. alternate,
|
||||
modname .. ":stair_" .. subname .. def.legacy)
|
||||
else
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.description = desc
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop then
|
||||
def.drop = modname .. ":stair_" .. fields.drop .. alternate
|
||||
end
|
||||
minetest.register_node(":" .. modname .. ":stair_" .. subname .. alternate, def)
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.description = desc
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop then
|
||||
def.drop = modname .. ":stair_" .. fields.drop .. alternate
|
||||
end
|
||||
minetest.register_node(":" .. modname .. ":stair_" .. subname .. alternate, def)
|
||||
end
|
||||
minetest.register_alias("stairs:stair_" .. subname, modname .. ":stair_" .. subname)
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":stair_" .. subname .. " 8",
|
||||
output = modname .. ":stair_" .. subname .. " 6",
|
||||
recipe = {
|
||||
{recipeitem, "", ""},
|
||||
{recipeitem, recipeitem, ""},
|
||||
@ -138,74 +135,74 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":stair_" .. subname .. " 8",
|
||||
output = modname .. ":stair_" .. subname .. " 6",
|
||||
recipe = {
|
||||
{"", "", recipeitem},
|
||||
{"", recipeitem, recipeitem},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_outer",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_half",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_half",
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_right_half",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_inner",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_outer",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({ -- See mirrored variation of the recipe below.
|
||||
output = modname .. ":stair_" .. subname .. "_alt",
|
||||
recipe = {
|
||||
@ -213,7 +210,7 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
|
||||
{"" , modname .. ":panel_" .. subname},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({ -- Mirrored variation of the recipe above.
|
||||
output = modname .. ":stair_" .. subname .. "_alt",
|
||||
recipe = {
|
||||
|
Before Width: | Height: | Size: 716 B |
Before Width: | Height: | Size: 285 B |
0
textures/invisible.png
Normal file → Executable file
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
0
textures/moreblocks_cactus_brick.png
Normal file → Executable file
Before Width: | Height: | Size: 718 B After Width: | Height: | Size: 718 B |
0
textures/moreblocks_cactus_checker.png
Normal file → Executable file
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 693 B |
0
textures/moreblocks_circle_stone_bricks.png
Normal file → Executable file
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 448 B |
0
textures/moreblocks_circular_saw_bottom.png
Normal file → Executable file
Before Width: | Height: | Size: 579 B After Width: | Height: | Size: 579 B |
0
textures/moreblocks_circular_saw_side.png
Normal file → Executable file
Before Width: | Height: | Size: 478 B After Width: | Height: | Size: 478 B |
0
textures/moreblocks_circular_saw_top.png
Normal file → Executable file
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 441 B |
BIN
textures/moreblocks_clean_glass.png
Normal file → Executable file
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 170 B |
0
textures/moreblocks_clean_glass_detail.png
Normal file → Executable file
Before Width: | Height: | Size: 96 B After Width: | Height: | Size: 96 B |
0
textures/moreblocks_coal_checker.png
Normal file → Executable file
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 744 B |
0
textures/moreblocks_coal_glass.png
Normal file → Executable file
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 155 B |
0
textures/moreblocks_coal_glass_detail.png
Normal file → Executable file
Before Width: | Height: | Size: 159 B After Width: | Height: | Size: 159 B |
0
textures/moreblocks_coal_glass_stairsplus.png
Normal file → Executable file
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
0
textures/moreblocks_coal_stone.png
Normal file → Executable file
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 229 B |
0
textures/moreblocks_coal_stone_bricks.png
Normal file → Executable file
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 484 B |
0
textures/moreblocks_cobble_compressed.png
Normal file → Executable file
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 356 B |
BIN
textures/moreblocks_empty_bookshelf.png
Normal file → Executable file
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 210 B |
BIN
textures/moreblocks_fence_jungle_wood.png
Normal file → Executable file
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 187 B |
BIN
textures/moreblocks_fence_wood.png
Normal file → Executable file
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 478 B |
BIN
textures/moreblocks_glass.png
Normal file → Executable file
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 204 B |
BIN
textures/moreblocks_glass_stairsplus.png
Normal file → Executable file
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 213 B |
0
textures/moreblocks_glow_glass.png
Normal file → Executable file
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 157 B |
0
textures/moreblocks_glow_glass_detail.png
Normal file → Executable file
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 161 B |
0
textures/moreblocks_glow_glass_stairsplus.png
Normal file → Executable file
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 169 B |
0
textures/moreblocks_grey_bricks.png
Normal file → Executable file
Before Width: | Height: | Size: 725 B After Width: | Height: | Size: 725 B |
0
textures/moreblocks_iron_checker.png
Normal file → Executable file
Before Width: | Height: | Size: 850 B After Width: | Height: | Size: 850 B |
0
textures/moreblocks_iron_glass.png
Normal file → Executable file
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
0
textures/moreblocks_iron_glass_detail.png
Normal file → Executable file
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 163 B |
0
textures/moreblocks_iron_glass_stairsplus.png
Normal file → Executable file
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 169 B |
0
textures/moreblocks_iron_stone.png
Normal file → Executable file
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
0
textures/moreblocks_iron_stone_bricks.png
Normal file → Executable file
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 485 B |
BIN
textures/moreblocks_junglestick.png
Normal file → Executable file
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 115 B |
0
textures/moreblocks_obsidian_glass_stairsplus.png
Normal file → Executable file
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 144 B |
0
textures/moreblocks_plankstone.png
Normal file → Executable file
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 335 B |
0
textures/moreblocks_plankstone_2.png
Normal file → Executable file
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 354 B |
0
textures/moreblocks_rope.png
Normal file → Executable file
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 356 B |
0
textures/moreblocks_split_stone_tile.png
Normal file → Executable file
Before Width: | Height: | Size: 273 B After Width: | Height: | Size: 273 B |
0
textures/moreblocks_split_stone_tile_alt.png
Normal file → Executable file
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 306 B |
0
textures/moreblocks_split_stone_tile_top.png
Normal file → Executable file
Before Width: | Height: | Size: 279 B After Width: | Height: | Size: 279 B |
0
textures/moreblocks_stone_tile.png
Normal file → Executable file
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 271 B |
0
textures/moreblocks_super_glow_glass.png
Normal file → Executable file
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 154 B |
0
textures/moreblocks_super_glow_glass_detail.png
Normal file → Executable file
Before Width: | Height: | Size: 156 B After Width: | Height: | Size: 156 B |
BIN
textures/moreblocks_super_glow_glass_stairsplus.png
Normal file → Executable file
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 168 B |
0
textures/moreblocks_sweeper.png
Normal file → Executable file
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 310 B |
0
textures/moreblocks_tar.png
Normal file → Executable file
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 270 B |
BIN
textures/moreblocks_trap_glass.png
Normal file → Executable file
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 164 B |
BIN
textures/moreblocks_trap_glow_glass.png
Normal file → Executable file
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 164 B |
0
textures/moreblocks_trap_stone.png
Normal file → Executable file
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
BIN
textures/moreblocks_trap_super_glow_glass.png
Normal file → Executable file
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 164 B |
0
textures/moreblocks_tree_stairsplus.png
Normal file → Executable file
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |
0
textures/moreblocks_wood_tile.png
Normal file → Executable file
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 396 B |
0
textures/moreblocks_wood_tile_center.png
Normal file → Executable file
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 288 B |
0
textures/moreblocks_wood_tile_full.png
Normal file → Executable file
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 436 B |
0
textures/moreblocks_wood_tile_up.png
Normal file → Executable file
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 289 B |