Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
00187d7ff6 | |||
6a6a22f699 | |||
9d953ccebf | |||
26f59baba0 | |||
0ace9fe493 | |||
ca45478761 | |||
1482a7810f | |||
01ec8290f6 | |||
723db44933 | |||
88726c5913 | |||
cd0d527c8f | |||
3cbc708742 | |||
5fc5fce74e | |||
846214993f | |||
10dd84a7f1 | |||
8ff1cb598f | |||
7d701da5b9 | |||
d5edcb2a10 | |||
c711946453 | |||
4d2a7ab6fe | |||
832b8f8817 | |||
f6e0db21b2 | |||
413054fd2f | |||
652d431664 | |||
cc7e1271be | |||
e6b5336bad | |||
3f7edb39a1 | |||
64eade096e | |||
2b76b077f0 | |||
d91da8b442 | |||
6f1ee946a0 | |||
9eb4926d8d | |||
281268e7bc | |||
350a5f49e7 | |||
0e2c30ec72 | |||
b7217dd1f7 | |||
a8a06d8deb | |||
4f9b05be4e | |||
da652c16cd | |||
1b78097ab7 | |||
dbba372137 | |||
4c767ad7ff | |||
780df105ea | |||
8f6176f68c | |||
6a996eb86a | |||
80d35c8215 | |||
65e3afdd8b | |||
1fa4669ae8 | |||
f2ede87a5a |
32
CHANGELOG.md
@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.2.0] - 2018-11-24
|
||||
|
||||
### Added
|
||||
|
||||
- Stairs+ nodes for `basic_materials`'s concrete, cement and brass blocks.
|
||||
- Listring add for circular saw.
|
||||
- **Stairs+:** New API function
|
||||
`stairsplus:register_custom_subset(subset, modname, subname, recipeitem, fields)`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- The papyrus crafting recipe override is now properly applied over the
|
||||
`default` mod's recipe.
|
||||
- Centered wooden tiles are now craftable.
|
||||
- Wool Stairs+ nodes can no longer be used in crafting.
|
||||
- The circular saw can no longer replace items from the player's inventory
|
||||
when it is full.
|
||||
|
||||
### Changed
|
||||
|
||||
- New craft for:
|
||||
- Stone Tile
|
||||
- Circle Stone Bricks
|
||||
- Stairs+:
|
||||
- Move definitions to `stairsplus.defs` table in a separate file
|
||||
- Move recipe definitions to `stairsplus.register_recipes` function in a separate file
|
||||
|
||||
## [1.1.0] - 2017-10-04
|
||||
|
||||
### Added
|
||||
@ -27,9 +54,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- Wool (all colors)
|
||||
- Other mods can now get a list of all the defined Stairs+ shapes
|
||||
|
||||
## [1.0.0] - 2017-02-19
|
||||
## 1.0.0 - 2017-02-19
|
||||
|
||||
- Initial versioned release.
|
||||
|
||||
[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v1.2.0...HEAD
|
||||
[1.2.0]: https://github.com/minetest-mods/moreblocks/compare/v1.1.0...v1.2.0
|
||||
[1.1.0]: https://github.com/minetest-mods/moreblocks/compare/v1.0.0...v1.1.0
|
||||
[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v1.0.0...HEAD
|
||||
|
@ -1,6 +1,6 @@
|
||||
# zlib license
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors
|
||||
|
||||
**This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.**
|
||||
|
||||
|
@ -65,7 +65,7 @@ versions than 0.4.16 will generally not be fixed.
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2011-2017 Hugo Locurcio and contributors
|
||||
Copyright © 2011-2018 Hugo Locurcio and contributors
|
||||
|
||||
- More Blocks code is licensed under the zlib license, see
|
||||
[`LICENSE.md`](LICENSE.md) for details.
|
||||
|
32
aliases.lua
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: alias definitions
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
@ -19,6 +19,7 @@ minetest.register_alias("moreblocks:stone_bricks", "default:stonebrick")
|
||||
minetest.register_alias("moreblocks:stonebrick", "default:stonebrick")
|
||||
minetest.register_alias("moreblocks:junglewood", "default:junglewood")
|
||||
minetest.register_alias("moreblocks:jungle_wood", "default:junglewood")
|
||||
minetest.register_alias("moreblocks:fence_junglewood", "default:fence_junglewood")
|
||||
minetest.register_alias("moreblocks:fence_jungle_wood", "default:fence_junglewood")
|
||||
minetest.register_alias("moreblocks:jungle_stick", "default:stick")
|
||||
|
||||
@ -31,13 +32,13 @@ minetest.register_alias("moreblocks:horizontaljungletree", "moreblocks:horizonta
|
||||
minetest.register_alias("moreblocks:stonesquare", "moreblocks:stone_tile")
|
||||
minetest.register_alias("moreblocks:circlestonebrick", "moreblocks:circle_stone_bricks")
|
||||
minetest.register_alias("moreblocks:ironstonebrick", "moreblocks:iron_stone_bricks")
|
||||
minetest.register_alias("moreblocks:fence_junglewood", "moreblocks:fence_jungle_wood")
|
||||
minetest.register_alias("moreblocks:coalstone", "moreblocks:coal_stone")
|
||||
minetest.register_alias("moreblocks:ironstone", "moreblocks:iron_stone")
|
||||
minetest.register_alias("moreblocks:woodtile", "moreblocks:wood_tile")
|
||||
minetest.register_alias("moreblocks:woodtile_full", "moreblocks:wood_tile_full")
|
||||
minetest.register_alias("moreblocks:woodtile_centered", "moreblocks:wood_tile_centered")
|
||||
minetest.register_alias("moreblocks:woodtile_up", "moreblocks:wood_tile_up")
|
||||
minetest.register_alias("moreblocks:woodtile_up", "moreblocks:wood_tile_offset")
|
||||
minetest.register_alias("moreblocks:wood_tile_up", "moreblocks:wood_tile_offset")
|
||||
minetest.register_alias("moreblocks:woodtile_down", "moreblocks:wood_tile_down")
|
||||
minetest.register_alias("moreblocks:woodtile_left", "moreblocks:wood_tile_left")
|
||||
minetest.register_alias("moreblocks:woodtile_right", "moreblocks:wood_tile_right")
|
||||
@ -56,6 +57,8 @@ minetest.register_alias("moreblocks:emptybookshelf", "moreblocks:empty_bookshelf
|
||||
minetest.register_alias("moreblocks:junglestick", "moreblocks:jungle_stick")
|
||||
minetest.register_alias("moreblocks:splitstonesquare","moreblocks:split_stone_tile")
|
||||
minetest.register_alias("moreblocks:allfacestree","moreblocks:all_faces_tree")
|
||||
minetest.register_alias("moreblocks:empty_bookshelf","moreblocks:empty_shelf")
|
||||
minetest.register_alias("moreblocks:split_stone_tile_alt","moreblocks:checker_stone_tile")
|
||||
|
||||
-- ABM for horizontal trees (fix facedir):
|
||||
local horizontal_tree_convert_facedir = {7, 12, 9, 18}
|
||||
@ -77,3 +80,26 @@ minetest.register_abm({
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "moreblocks:reduce_wood_tile_redundancy",
|
||||
nodenames = {
|
||||
"moreblocks:wood_tile_left",
|
||||
"moreblocks:wood_tile_down",
|
||||
"moreblocks:wood_tile_right",
|
||||
"moreblocks:wood_tile_flipped",
|
||||
},
|
||||
action = function(pos, node)
|
||||
if node.name:find("left") then
|
||||
minetest.set_node(pos, {name = "moreblocks:wood_tile_offset", param2=1})
|
||||
elseif node.name:find("down") then
|
||||
minetest.set_node(pos, {name = "moreblocks:wood_tile_offset", param2=2})
|
||||
elseif node.name:find("right") then
|
||||
minetest.set_node(pos, {name = "moreblocks:wood_tile_offset", param2=3})
|
||||
else -- wood_tile_flipped
|
||||
minetest.set_node(pos, {name = "moreblocks:wood_tile", param2=1})
|
||||
end
|
||||
minetest.log('action', "LBM replaced " .. node.name ..
|
||||
" at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: circular saw
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio, Sokomine and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio, Sokomine and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
@ -181,7 +181,7 @@ function circular_saw:update_inventory(pos, amount)
|
||||
|
||||
-- 0-7 microblocks may remain left-over:
|
||||
inv:set_list("micro", {
|
||||
modname .. ":micro_" .. material .. "_bottom " .. (amount % 8)
|
||||
modname .. ":micro_" .. material .. " " .. (amount % 8)
|
||||
})
|
||||
-- Display:
|
||||
inv:set_list("output",
|
||||
@ -242,6 +242,7 @@ function circular_saw.allow_metadata_inventory_put(
|
||||
local incost = (incount * 8) + microstack:get_count()
|
||||
local maxcost = (stackmax * 8) + 7
|
||||
local cost = circular_saw:get_cost(inv, stackname)
|
||||
if not cost then return 0 end -- NALC Fix crash if cost == nil
|
||||
if (incost + cost) > maxcost then
|
||||
return math.max((maxcost - incost) / cost, 0)
|
||||
end
|
||||
@ -299,6 +300,17 @@ function circular_saw.on_metadata_inventory_put(
|
||||
end
|
||||
end
|
||||
|
||||
function circular_saw.allow_metadata_inventory_take(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local input_stack = inv:get_stack(listname, index)
|
||||
local player_inv = player:get_inventory()
|
||||
if not player_inv:room_for_item("main", input_stack) then
|
||||
return 0
|
||||
else return stack:get_count()
|
||||
end
|
||||
end
|
||||
|
||||
function circular_saw.on_metadata_inventory_take(
|
||||
pos, listname, index, stack, player)
|
||||
|
||||
@ -338,17 +350,27 @@ end
|
||||
function circular_saw.on_construct(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots
|
||||
meta:set_string("formspec", "size[11,10]"..fancy_inv..
|
||||
"label[0,0;" ..S("Input\nmaterial").. "]" ..
|
||||
"list[current_name;input;1.5,0;1,1;]" ..
|
||||
"label[0,1;" ..S("Left-over").. "]" ..
|
||||
"list[current_name;micro;1.5,1;1,1;]" ..
|
||||
"label[0,2;" ..S("Recycle\noutput").. "]" ..
|
||||
"list[current_name;recycle;1.5,2;1,1;]" ..
|
||||
"field[0.3,3.5;1,1;max_offered;" ..S("Max").. ":;${max_offered}]" ..
|
||||
"button[1,3.2;1,1;Set;" ..S("Set").. "]" ..
|
||||
"list[current_name;output;2.8,0;8,6;]" ..
|
||||
"list[current_player;main;1.5,6.25;8,4;]")
|
||||
meta:set_string(
|
||||
"formspec", "size[11,10]"..fancy_inv..
|
||||
"label[0,0;" ..S("Input\nmaterial").. "]" ..
|
||||
"list[current_name;input;1.5,0;1,1;]" ..
|
||||
"label[0,1;" ..S("Left-over").. "]" ..
|
||||
"list[current_name;micro;1.5,1;1,1;]" ..
|
||||
"label[0,2;" ..S("Recycle\noutput").. "]" ..
|
||||
"list[current_name;recycle;1.5,2;1,1;]" ..
|
||||
"field[0.3,3.5;1,1;max_offered;" ..S("Max").. ":;${max_offered}]" ..
|
||||
"button[1,3.2;1,1;Set;" ..S("Set").. "]" ..
|
||||
"list[current_name;output;2.8,0;8,6;]" ..
|
||||
"list[current_player;main;1.5,6.25;8,4;]" ..
|
||||
"listring[current_name;output]" ..
|
||||
"listring[current_player;main]" ..
|
||||
"listring[current_name;input]" ..
|
||||
"listring[current_player;main]" ..
|
||||
"listring[current_name;micro]" ..
|
||||
"listring[current_player;main]" ..
|
||||
"listring[current_name;recycle]" ..
|
||||
"listring[current_player;main]"
|
||||
)
|
||||
|
||||
meta:set_int("anz", 0) -- No microblocks inside yet.
|
||||
meta:set_string("max_offered", 99) -- How many items of this kind are offered by default?
|
||||
@ -417,6 +439,7 @@ minetest.register_node("moreblocks:circular_saw", {
|
||||
allow_metadata_inventory_move = circular_saw.allow_metadata_inventory_move,
|
||||
-- Only input- and recycle-slot are intended as input slots:
|
||||
allow_metadata_inventory_put = circular_saw.allow_metadata_inventory_put,
|
||||
allow_metadata_inventory_take = circular_saw.allow_metadata_inventory_take,
|
||||
-- Taking is allowed from all slots (even the internal microblock slot). Moving is forbidden.
|
||||
-- Putting something in is slightly more complicated than taking anything because we have to make sure it is of a suitable material:
|
||||
on_metadata_inventory_put = circular_saw.on_metadata_inventory_put,
|
||||
|
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: configuration handling
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
|
198
crafting.lua
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: crafting recipes
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
@ -12,12 +12,7 @@ minetest.register_craft({
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:stick",
|
||||
recipe = {{"default:sapling"},}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:stick",
|
||||
recipe = {{"default:junglesapling"},}
|
||||
recipe = {{"group:sapling"},}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -34,12 +29,6 @@ minetest.register_craft({
|
||||
recipe = {"default:junglegrass", "default:dirt"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:dirt_with_grass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese", "default:dirt"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:mossycobble",
|
||||
type = "shapeless",
|
||||
@ -47,32 +36,27 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:mossycobble",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:cobble"},
|
||||
output = "moreblocks:wood_tile_center 9",
|
||||
recipe = {
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"group:wood", "moreblocks:wood_tile", "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile 9",
|
||||
recipe = {
|
||||
{"default:wood", "default:wood", "default:wood"},
|
||||
{"default:wood", "default:wood", "default:wood"},
|
||||
{"default:wood", "default:wood", "default:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_flipped",
|
||||
recipe = {{"moreblocks:wood_tile"},}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_center 9",
|
||||
recipe = {
|
||||
{"default:wood", "default:wood", "default:wood"},
|
||||
{"default:wood", "moreblocks:wood_tile", "default:wood"},
|
||||
{"default:wood", "default:wood", "default:wood"},
|
||||
}
|
||||
type = "shapeless",
|
||||
output = "moreblocks:wood_tile",
|
||||
recipe = {"moreblocks:wood_tile_flipped"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -84,7 +68,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_up",
|
||||
output = "moreblocks:wood_tile_offset",
|
||||
recipe = {
|
||||
{"default:stick"},
|
||||
{"moreblocks:wood_tile_center"},
|
||||
@ -92,33 +76,29 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_down",
|
||||
recipe = {
|
||||
{"moreblocks:wood_tile_center"},
|
||||
{"default:stick"},
|
||||
}
|
||||
type = "shapeless",
|
||||
output = "moreblocks:wood_tile_offset",
|
||||
recipe = {"moreblocks:wood_tile_down"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_left",
|
||||
recipe = {
|
||||
{"default:stick", "moreblocks:wood_tile_center"},
|
||||
}
|
||||
type = "shapeless",
|
||||
output = "moreblocks:wood_tile_offset",
|
||||
recipe = {"moreblocks:wood_tile_left"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_right",
|
||||
recipe = {
|
||||
{"moreblocks:wood_tile_center", "default:stick"},
|
||||
}
|
||||
type = "shapeless",
|
||||
output = "moreblocks:wood_tile_offset",
|
||||
recipe = {"moreblocks:wood_tile_right"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:circle_stone_bricks 8",
|
||||
output = "moreblocks:circle_stone_bricks 5",
|
||||
recipe = {
|
||||
{"default:stone", "default:stone", "default:stone"},
|
||||
{"default:stone", "", "default:stone"},
|
||||
{"default:stone", "default:stone", "default:stone"},
|
||||
{"", "default:stone", ""},
|
||||
{"default:stone", "default:coal_lump", "default:stone"},
|
||||
{"", "default:stone", ""},
|
||||
}
|
||||
})
|
||||
|
||||
@ -140,6 +120,33 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:all_faces_pine_tree 8",
|
||||
recipe = {
|
||||
{"default:pine_tree", "default:pine_tree", "default:pine_tree"},
|
||||
{"default:pine_tree", "", "default:pine_tree"},
|
||||
{"default:pine_tree", "default:pine_tree", "default:pine_tree"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:all_faces_acacia_tree 8",
|
||||
recipe = {
|
||||
{"default:acacia_tree", "default:acacia_tree", "default:acacia_tree"},
|
||||
{"default:acacia_tree", "", "default:acacia_tree"},
|
||||
{"default:acacia_tree", "default:acacia_tree", "default:acacia_tree"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:all_faces_aspen_tree 8",
|
||||
recipe = {
|
||||
{"default:aspen_tree", "default:aspen_tree", "default:aspen_tree"},
|
||||
{"default:aspen_tree", "", "default:aspen_tree"},
|
||||
{"default:aspen_tree", "default:aspen_tree", "default:aspen_tree"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:sweeper 4",
|
||||
recipe = {
|
||||
@ -149,10 +156,11 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:stone_tile 4",
|
||||
output = "moreblocks:stone_tile 9",
|
||||
recipe = {
|
||||
{"default:cobble", "default:cobble"},
|
||||
{"default:cobble", "default:cobble"},
|
||||
{"default:cobble", "default:cobble", "default:cobble"},
|
||||
{"default:cobble", "default:stone", "default:cobble"},
|
||||
{"default:cobble", "default:cobble", "default:cobble"},
|
||||
}
|
||||
})
|
||||
|
||||
@ -164,12 +172,20 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:split_stone_tile_alt",
|
||||
output = "moreblocks:checker_stone_tile",
|
||||
recipe = {
|
||||
{"moreblocks:split_stone_tile"},
|
||||
}
|
||||
})
|
||||
|
||||
-- When approaching the below craft, loop back to cobblestone, which can then be used to craft stone tiles again
|
||||
minetest.register_craft({
|
||||
output = "default:cobble",
|
||||
recipe = {
|
||||
{"moreblocks:checker_stone_tile"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:grey_bricks 2",
|
||||
type = "shapeless",
|
||||
@ -183,11 +199,33 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:empty_bookshelf",
|
||||
output = "moreblocks:empty_shelf",
|
||||
type = "shapeless",
|
||||
recipe = {"moreblocks:sweeper", "default:bookshelf"},
|
||||
replacements = {{"default:bookshelf", "default:book 3"}},
|
||||
-- When obtaining an empty bookshelf, return the books used in it as well
|
||||
-- When obtaining an empty shelf, return the books used in it as well
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:empty_shelf",
|
||||
type = "shapeless",
|
||||
recipe = {"moreblocks:sweeper", "vessels:shelf"},
|
||||
replacements = {{"vessels:shelf", "vessels:glass_bottle 3"}},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:bookshelf",
|
||||
recipe = {"moreblocks:empty_shelf", "default:book", "default:book", "default:book"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:empty_shelf",
|
||||
recipe = {
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"", "", ""},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -209,16 +247,16 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:plankstone 4",
|
||||
recipe = {
|
||||
{"default:stone", "default:wood"},
|
||||
{"default:wood", "default:stone"},
|
||||
{"group:stone", "group:wood"},
|
||||
{"group:wood", "group:stone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:plankstone 4",
|
||||
recipe = {
|
||||
{"default:wood", "default:stone"},
|
||||
{"default:stone", "default:wood"},
|
||||
{"group:wood", "group:stone"},
|
||||
{"group:stone", "group:wood"},
|
||||
}
|
||||
})
|
||||
|
||||
@ -381,12 +419,36 @@ minetest.register_craft({
|
||||
recipe = {"default:mese_crystal_fragment", "default:stone"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_desert_stone",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:desert_stone"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_obsidian_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:obsidian_glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_obsidian",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:obsidian"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_sandstone",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:sandstone"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:cactus_brick",
|
||||
type = "shapeless",
|
||||
@ -418,6 +480,20 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:dirt_compressed",
|
||||
recipe = {
|
||||
{'default:dirt', 'default:dirt', 'default:dirt'},
|
||||
{'default:dirt', 'default:dirt', 'default:dirt'},
|
||||
{'default:dirt', 'default:dirt', 'default:dirt'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:dirt 9",
|
||||
recipe = {{"moreblocks:dirt_compressed"}},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:cobble_compressed",
|
||||
recipe = {
|
||||
@ -435,15 +511,15 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking", output = "moreblocks:tar", recipe = "default:gravel",
|
||||
type = "cooking", output = "moreblocks:tar", recipe = "default:pine_tree",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "moreblocks:copperpatina",
|
||||
recipe = {"bucket:bucket_water", "default:copperblock"},
|
||||
recipe = {"group:water_bucket", "default:copperblock"},
|
||||
replacements = {
|
||||
{"bucket:bucket_water", "bucket:bucket_empty"}
|
||||
{"group:water_bucket", "bucket:bucket_empty"}
|
||||
}
|
||||
})
|
||||
|
||||
|
10
depends.txt
@ -1,4 +1,6 @@
|
||||
default
|
||||
intllib?
|
||||
farming?
|
||||
wool?
|
||||
default
|
||||
intllib?
|
||||
stairs?
|
||||
farming?
|
||||
wool?
|
||||
basic_materials?
|
||||
|
2
init.lua
@ -3,7 +3,7 @@
|
||||
** More Blocks **
|
||||
By Calinou, with the help of ShadowNinja and VanessaE.
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
=====================================================================
|
||||
--]]
|
||||
|
275
nodes.lua
@ -1,12 +1,13 @@
|
||||
--[[
|
||||
More Blocks: node definitions
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local S = moreblocks.intllib
|
||||
|
||||
local sound_dirt = default.node_sound_dirt_defaults()
|
||||
local sound_wood = default.node_sound_wood_defaults()
|
||||
local sound_stone = default.node_sound_stone_defaults()
|
||||
local sound_glass = default.node_sound_glass_defaults()
|
||||
@ -21,10 +22,27 @@ local function tile_tiles(name)
|
||||
return {tex, tex, tex, tex, tex.. "^[transformR90", tex.. "^[transformR90"}
|
||||
end
|
||||
|
||||
local function wood_tile_replace(itemstack, placer, pointed_thing)
|
||||
local substack
|
||||
if itemstack:get_name() == "moreblocks:wood_tile_flipped" then
|
||||
substack = ItemStack("moreblocks:wood_tile")
|
||||
else -- right, left, and down variants
|
||||
substack = ItemStack("moreblocks:wood_tile_offset")
|
||||
end
|
||||
local _, success = minetest.item_place(substack, placer, pointed_thing)
|
||||
if success then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
|
||||
local nodes = {
|
||||
["wood_tile"] = {
|
||||
description = S("Wooden Tile"),
|
||||
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
is_ground_content = false,
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"default_wood.png^moreblocks_wood_tile.png",
|
||||
"default_wood.png^moreblocks_wood_tile.png",
|
||||
"default_wood.png^moreblocks_wood_tile.png",
|
||||
@ -34,148 +52,179 @@ local nodes = {
|
||||
sounds = sound_wood,
|
||||
},
|
||||
["wood_tile_flipped"] = {
|
||||
description = S("Wooden Tile"),
|
||||
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
description = S("Wooden Tile (Deprecated)"),
|
||||
tiles = {"default_wood.png^moreblocks_wood_tile.png^[transformR90",
|
||||
"default_wood.png^moreblocks_wood_tile.png^[transformR90",
|
||||
"default_wood.png^moreblocks_wood_tile.png^[transformR90",
|
||||
"default_wood.png^moreblocks_wood_tile.png^[transformR90",
|
||||
"default_wood.png^moreblocks_wood_tile.png^[transformR180",
|
||||
"default_wood.png^moreblocks_wood_tile.png^[transformR180"},
|
||||
sounds = sound_wood,
|
||||
no_stairs = true,
|
||||
on_place = wood_tile_replace
|
||||
},
|
||||
["wood_tile_center"] = {
|
||||
description = S("Centered Wooden Tile"),
|
||||
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
is_ground_content = false,
|
||||
tiles = {"default_wood.png^moreblocks_wood_tile_center.png"},
|
||||
sounds = sound_wood,
|
||||
},
|
||||
["wood_tile_full"] = {
|
||||
description = S("Full Wooden Tile"),
|
||||
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
is_ground_content = false,
|
||||
tiles = tile_tiles("wood_tile_full"),
|
||||
sounds = sound_wood,
|
||||
},
|
||||
["wood_tile_up"] = {
|
||||
description = S("Upwards Wooden Tile"),
|
||||
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
tiles = {"default_wood.png^moreblocks_wood_tile_up.png"},
|
||||
["wood_tile_offset"] = {
|
||||
description = S("Offset Wooden Tile"),
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
is_ground_content = false,
|
||||
tiles = {"default_wood.png^moreblocks_wood_tile_offset.png"},
|
||||
sounds = sound_wood,
|
||||
no_stairs = true,
|
||||
},
|
||||
["wood_tile_down"] = {
|
||||
description = S("Downwards Wooden Tile"),
|
||||
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
tiles = {"default_wood.png^[transformR180^moreblocks_wood_tile_up.png^[transformR180"},
|
||||
sounds = sound_wood,
|
||||
description = S("Downwards Wooden Tile (Deprecated)"),
|
||||
tiles = {"default_wood.png^[transformR180^moreblocks_wood_tile_offset.png^[transformR180"},
|
||||
no_stairs = true,
|
||||
on_place = wood_tile_replace
|
||||
},
|
||||
["wood_tile_left"] = {
|
||||
description = S("Leftwards Wooden Tile"),
|
||||
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
tiles = {"default_wood.png^[transformR270^moreblocks_wood_tile_up.png^[transformR270"},
|
||||
sounds = sound_wood,
|
||||
description = S("Leftwards Wooden Tile (Deprecated)"),
|
||||
tiles = {"default_wood.png^[transformR270^moreblocks_wood_tile_offset.png^[transformR270"},
|
||||
no_stairs = true,
|
||||
on_place = wood_tile_replace
|
||||
},
|
||||
["wood_tile_right"] = {
|
||||
description = S("Rightwards Wooden Tile"),
|
||||
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
tiles = {"default_wood.png^[transformR90^moreblocks_wood_tile_up.png^[transformR90"},
|
||||
sounds = sound_wood,
|
||||
description = S("Rightwards Wooden Tile (Deprecated)"),
|
||||
tiles = {"default_wood.png^[transformR90^moreblocks_wood_tile_offset.png^[transformR90"},
|
||||
no_stairs = true,
|
||||
on_place = wood_tile_replace
|
||||
},
|
||||
["circle_stone_bricks"] = {
|
||||
description = S("Circle Stone Bricks"),
|
||||
groups = {cracky = 3},
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["grey_bricks"] = {
|
||||
description = S("Stone Bricks"),
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
groups = {cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["coal_stone_bricks"] = {
|
||||
description = S("Coal Stone Bricks"),
|
||||
groups = {cracky = 3},
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["iron_stone_bricks"] = {
|
||||
description = S("Iron Stone Bricks"),
|
||||
groups = {cracky = 3},
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["stone_tile"] = {
|
||||
description = S("Stone Tile"),
|
||||
groups = {cracky = 3},
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["split_stone_tile"] = {
|
||||
description = S("Split Stone Tile"),
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"moreblocks_split_stone_tile_top.png",
|
||||
"moreblocks_split_stone_tile.png"},
|
||||
groups = {cracky = 3},
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["split_stone_tile_alt"] = {
|
||||
description = S("Checkered Stone Tile"),
|
||||
groups = {cracky = 3},
|
||||
["checker_stone_tile"] = {
|
||||
description = S("Checker Stone Tile"),
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["tar"] = {
|
||||
description = S("Tar"),
|
||||
groups = {cracky = 2, tar_block = 1},
|
||||
groups = {cracky=2, tar_block=1},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["dirt_compressed"] = {
|
||||
description = S("Compressed Dirt"),
|
||||
groups = {crumbly=2},
|
||||
is_ground_content = false,
|
||||
sounds = sound_dirt,
|
||||
},
|
||||
["cobble_compressed"] = {
|
||||
description = S("Compressed Cobblestone"),
|
||||
groups = {cracky = 1},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["plankstone"] = {
|
||||
description = S("Plankstone"),
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
groups = {cracky = 3},
|
||||
is_ground_content = false,
|
||||
tiles = tile_tiles("plankstone"),
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["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 = {"default_glass.png^[colorize:#DEDEDE", "default_glass_detail.png^[colorize:#DEDEDE"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
},
|
||||
["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 = {"default_glass.png^[colorize:#828282", "default_glass_detail.png^[colorize:#828282"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
},
|
||||
["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"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
},
|
||||
["cactus_brick"] = {
|
||||
description = S("Cactus Brick"),
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
groups = {cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["cactus_checker"] = {
|
||||
description = S("Cactus Checker"),
|
||||
groups = {cracky = 3},
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
tiles = {"default_stone.png^moreblocks_cactus_checker.png",
|
||||
"default_stone.png^moreblocks_cactus_checker.png",
|
||||
"default_stone.png^moreblocks_cactus_checker.png",
|
||||
@ -184,23 +233,27 @@ local nodes = {
|
||||
"default_stone.png^moreblocks_cactus_checker.png^[transformR90"},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["empty_bookshelf"] = {
|
||||
description = S("Empty Bookshelf"),
|
||||
tiles = {"default_wood.png", "default_wood.png",
|
||||
"moreblocks_empty_bookshelf.png"},
|
||||
groups = {snappy = 2, choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
["empty_shelf"] = {
|
||||
description = S("Empty Shelf"),
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
|
||||
"default_wood.png", "moreblocks_empty_shelf.png", "moreblocks_empty_shelf.png"},
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_wood,
|
||||
furnace_burntime = 15,
|
||||
no_stairs = true,
|
||||
},
|
||||
["coal_stone"] = {
|
||||
description = S("Coal Stone"),
|
||||
groups = {cracky = 3},
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["iron_stone"] = {
|
||||
description = S("Iron Stone"),
|
||||
groups = {cracky = 3},
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["coal_checker"] = {
|
||||
@ -211,7 +264,8 @@ local nodes = {
|
||||
"default_stone.png^moreblocks_coal_checker.png",
|
||||
"default_stone.png^moreblocks_coal_checker.png^[transformR90",
|
||||
"default_stone.png^moreblocks_coal_checker.png^[transformR90"},
|
||||
groups = {cracky = 3},
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["iron_checker"] = {
|
||||
@ -222,87 +276,158 @@ local nodes = {
|
||||
"default_stone.png^moreblocks_iron_checker.png",
|
||||
"default_stone.png^moreblocks_iron_checker.png^[transformR90",
|
||||
"default_stone.png^moreblocks_iron_checker.png^[transformR90"},
|
||||
groups = {cracky = 3},
|
||||
groups = {stone = 1, cracky = 3},
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["trap_stone"] = {
|
||||
description = S("Trap Stone"),
|
||||
drawtype = "glasslike_framed",
|
||||
tiles = {"default_stone.png^moreblocks_trap_box.png"},
|
||||
walkable = false,
|
||||
groups = {cracky = 3},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
no_stairs = true,
|
||||
},
|
||||
["trap_desert_stone"] = {
|
||||
description = S("Trap Desert Stone"),
|
||||
drawtype = "glasslike_framed",
|
||||
tiles = {"default_desert_stone.png^moreblocks_trap_box.png"},
|
||||
walkable = false,
|
||||
groups = {cracky = 3},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
no_stairs = true,
|
||||
},
|
||||
["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 = {"default_glass.png^moreblocks_trap_box_glass.png", "default_glass_detail.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
no_stairs = true,
|
||||
},
|
||||
["trap_obsidian_glass"] = {
|
||||
description = S("Trap Obsidian Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"default_obsidian_glass.png^moreblocks_trap_box_glass.png", "default_obsidian_glass_detail.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
no_stairs = true,
|
||||
},
|
||||
["trap_obsidian"] = {
|
||||
description = S("Trap Obsidian"),
|
||||
drawtype = "glasslike_framed",
|
||||
tiles = {"default_obsidian.png^moreblocks_trap_box.png"},
|
||||
walkable = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
no_stairs = true,
|
||||
},
|
||||
["trap_sandstone"] = {
|
||||
description = S("Trap Sandstone"),
|
||||
drawtype = "glasslike_framed",
|
||||
tiles = {"default_sandstone.png^moreblocks_trap_box.png"},
|
||||
walkable = false,
|
||||
groups = {crumbly = 1, cracky = 3},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
sounds = sound_stone,
|
||||
no_stairs = true,
|
||||
},
|
||||
["all_faces_tree"] = {
|
||||
description = S("All-faces Tree"),
|
||||
tiles = {"default_tree_top.png"},
|
||||
groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = sound_wood,
|
||||
furnace_burntime = 30,
|
||||
},
|
||||
["all_faces_jungle_tree"] = {
|
||||
description = S("All-faces Jungle Tree"),
|
||||
tiles = {"default_jungletree_top.png"},
|
||||
groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = sound_wood,
|
||||
furnace_burntime = 30,
|
||||
furnace_burntime = 38,
|
||||
},
|
||||
["all_faces_pine_tree"] = {
|
||||
description = S("All-faces Pine Tree"),
|
||||
tiles = {"default_pine_tree_top.png"},
|
||||
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = sound_wood,
|
||||
furnace_burntime = 26,
|
||||
},
|
||||
["all_faces_acacia_tree"] = {
|
||||
description = S("All-faces Acacia Tree"),
|
||||
tiles = {"default_acacia_tree_top.png"},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = sound_wood,
|
||||
furnace_burntime = 34,
|
||||
},
|
||||
["all_faces_aspen_tree"] = {
|
||||
description = S("All-faces Aspen Tree"),
|
||||
tiles = {"default_aspen_tree_top.png"},
|
||||
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = sound_wood,
|
||||
furnace_burntime = 22,
|
||||
},
|
||||
["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 = {"default_glass.png^[colorize:#E9CD61", "default_glass_detail.png^[colorize:#E9CD61"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
light_source = 11,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
},
|
||||
["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 = {"default_glass.png^[colorize:#E9CD61^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#E9CD61"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
light_source = 11,
|
||||
walkable = false,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
no_stairs = true,
|
||||
},
|
||||
["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 = {"default_glass.png^[colorize:#FFFF78", "default_glass_detail.png^[colorize:#FFFF78"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 14,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
is_ground_content = false,
|
||||
light_source = default.LIGHT_MAX,
|
||||
groups = {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 = {"default_glass.png^[colorize:#FFFF78^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#FFFF78"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 14,
|
||||
is_ground_content = false,
|
||||
light_source = default.LIGHT_MAX,
|
||||
walkable = false,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
no_stairs = true,
|
||||
},
|
||||
@ -313,6 +438,7 @@ local nodes = {
|
||||
wield_image = "moreblocks_rope.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
paramtype2 = "wallmounted",
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
@ -324,6 +450,7 @@ local nodes = {
|
||||
["copperpatina"] = {
|
||||
description = S("Copper Patina Block"),
|
||||
groups = {cracky = 1, level = 2},
|
||||
is_ground_content = false,
|
||||
sounds = sound_metal,
|
||||
},
|
||||
}
|
||||
@ -346,15 +473,9 @@ for name, def in pairs(nodes) do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Items
|
||||
|
||||
minetest.register_craftitem("moreblocks:sweeper", {
|
||||
description = S("Sweeper"),
|
||||
inventory_image = "moreblocks_sweeper.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("moreblocks:nothing", {
|
||||
inventory_image = "invisible.png",
|
||||
on_use = function() end,
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: ownership handling
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: redefinitions of default stuff
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
@ -25,6 +25,11 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.clear_craft({
|
||||
recipe = {
|
||||
{"default:papyrus", "default:papyrus", "default:papyrus"}
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "default:paper 4",
|
||||
recipe = {
|
||||
|
@ -20,4 +20,63 @@ You will probably never want to use them directly:
|
||||
* `stairsplus:register_slab(modname, subname, recipeitem, fields)`
|
||||
* `stairsplus:register_panel(modname, subname, recipeitem, fields)`
|
||||
* `stairsplus:register_micro(modname, subname, recipeitem, fields)`
|
||||
* `stairsplus:register_slope(modname, subname, recipeitem, fields)`
|
||||
|
||||
If you only want to register a subset of stairsplus nodes,
|
||||
you can use the `stairsplus:register_custom_subset(subset, modname, subname, recipeitem, fields)` function.
|
||||
The subset table should have the following format:
|
||||
|
||||
```lua
|
||||
local subset = {
|
||||
{ "micro", "" },
|
||||
{ "micro", "_1" },
|
||||
{ "micro", "_2" },
|
||||
{ "micro", "_4" },
|
||||
{ "micro", "_12" },
|
||||
{ "micro", "_14" },
|
||||
{ "micro", "_15" },
|
||||
{ "panel", "" },
|
||||
{ "panel", "_1" },
|
||||
{ "panel", "_2" },
|
||||
{ "panel", "_4" },
|
||||
{ "panel", "_12" },
|
||||
{ "panel", "_14" },
|
||||
{ "panel", "_15" },
|
||||
{ "slab", "" },
|
||||
{ "slab", "_quarter" },
|
||||
{ "slab", "_three_quarter" },
|
||||
{ "slab", "_1" },
|
||||
{ "slab", "_2" },
|
||||
{ "slab", "_14" },
|
||||
{ "slab", "_15" },
|
||||
{ "slab", "_two_sides" },
|
||||
{ "slab", "_three_sides" },
|
||||
{ "slab", "_three_sides_u" },
|
||||
{ "slope", "" },
|
||||
{ "slope", "_half" },
|
||||
{ "slope", "_half_raised" },
|
||||
{ "slope", "_inner" },
|
||||
{ "slope", "_inner_half" },
|
||||
{ "slope", "_inner_half_raised" },
|
||||
{ "slope", "_inner_cut" },
|
||||
{ "slope", "_inner_cut_half" },
|
||||
{ "slope", "_inner_cut_half_raised" },
|
||||
{ "slope", "_outer" },
|
||||
{ "slope", "_outer_half" },
|
||||
{ "slope", "_outer_half_raised" },
|
||||
{ "slope", "_outer_cut" },
|
||||
{ "slope", "_outer_cut_half" },
|
||||
{ "slope", "_outer_cut_half_raised" },
|
||||
{ "slope", "_cut" },
|
||||
{ "stair", "" },
|
||||
{ "stair", "_half" },
|
||||
{ "stair", "_right_half" },
|
||||
{ "stair", "_inner" },
|
||||
{ "stair", "_outer" },
|
||||
{ "stair", "_alt" },
|
||||
{ "stair", "_alt_1" },
|
||||
{ "stair", "_alt_2" },
|
||||
{ "stair", "_alt_4" },
|
||||
}
|
||||
```
|
||||
You can remove entries as needed.
|
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: alias definitions
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
|
61
stairsplus/common.lua
Normal file
@ -0,0 +1,61 @@
|
||||
--[[
|
||||
More Blocks: registrations
|
||||
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
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)
|
||||
local descriptions = {
|
||||
["micro"] = "Microblock",
|
||||
["slab"] = "Slab",
|
||||
["slope"] = "Slope",
|
||||
["panel"] = "Panel",
|
||||
["stair"] = "Stairs",
|
||||
}
|
||||
local def = {}
|
||||
if category ~= "slab" then
|
||||
def = table.copy(info)
|
||||
end
|
||||
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
if category == "slope" then
|
||||
def.drawtype = "mesh"
|
||||
end
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = def.paramtype2 or "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
if category ~= "slab" then
|
||||
def.description = S("%s " .. descriptions[category]):format(fields.description)
|
||||
else
|
||||
local desc_base = S("%s " .. descriptions[category]):format(fields.description)
|
||||
if type(info) ~= "table" then
|
||||
def.node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, (info/16)-0.5, 0.5},
|
||||
}
|
||||
def.description = ("%s (%d/16)"):format(desc_base, info)
|
||||
else
|
||||
def.node_box = {
|
||||
type = "fixed",
|
||||
fixed = info,
|
||||
}
|
||||
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)
|
||||
if category == "stair" and alternate == "" then
|
||||
def.groups.stair = 1
|
||||
end
|
||||
if fields.drop and not (type(fields.drop) == "table") then
|
||||
def.drop = modname.. ":" .. category .. "_" .. fields.drop .. alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":" .. category .. "_" .. subname .. alternate, def)
|
||||
stairsplus.register_recipes(category, alternate, modname, subname, recipeitem)
|
||||
end
|
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: conversion
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
|
98
stairsplus/custom.lua
Normal file
@ -0,0 +1,98 @@
|
||||
--[[
|
||||
More Blocks: microblock definitions
|
||||
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local S = moreblocks.intllib
|
||||
|
||||
--[[
|
||||
Subset table should have the following format: (You can remove entries as needed.)
|
||||
|
||||
local subset = {
|
||||
{ "micro", "" },
|
||||
{ "micro", "_1" },
|
||||
{ "micro", "_2" },
|
||||
{ "micro", "_4" },
|
||||
{ "micro", "_12" },
|
||||
{ "micro", "_14" },
|
||||
{ "micro", "_15" },
|
||||
{ "panel", "" },
|
||||
{ "panel", "_1" },
|
||||
{ "panel", "_2" },
|
||||
{ "panel", "_4" },
|
||||
{ "panel", "_12" },
|
||||
{ "panel", "_14" },
|
||||
{ "panel", "_15" },
|
||||
{ "slab", "" },
|
||||
{ "slab", "_quarter" },
|
||||
{ "slab", "_three_quarter" },
|
||||
{ "slab", "_1" },
|
||||
{ "slab", "_2" },
|
||||
{ "slab", "_14" },
|
||||
{ "slab", "_15" },
|
||||
{ "slab", "_two_sides" },
|
||||
{ "slab", "_three_sides" },
|
||||
{ "slab", "_three_sides_u" },
|
||||
{ "slope", "" },
|
||||
{ "slope", "_half" },
|
||||
{ "slope", "_half_raised" },
|
||||
{ "slope", "_inner" },
|
||||
{ "slope", "_inner_half" },
|
||||
{ "slope", "_inner_half_raised" },
|
||||
{ "slope", "_inner_cut" },
|
||||
{ "slope", "_inner_cut_half" },
|
||||
{ "slope", "_inner_cut_half_raised" },
|
||||
{ "slope", "_outer" },
|
||||
{ "slope", "_outer_half" },
|
||||
{ "slope", "_outer_half_raised" },
|
||||
{ "slope", "_outer_cut" },
|
||||
{ "slope", "_outer_cut_half" },
|
||||
{ "slope", "_outer_cut_half_raised" },
|
||||
{ "slope", "_cut" },
|
||||
{ "stair", "" },
|
||||
{ "stair", "_half" },
|
||||
{ "stair", "_right_half" },
|
||||
{ "stair", "_inner" },
|
||||
{ "stair", "_outer" },
|
||||
{ "stair", "_alt" },
|
||||
{ "stair", "_alt_1" },
|
||||
{ "stair", "_alt_2" },
|
||||
{ "stair", "_alt_4" },
|
||||
}
|
||||
--]]
|
||||
|
||||
function register_custom_subset(subset, modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
stairsplus:register_custom_subset(subset, modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
function stairsplus:register_custom_subset_alias(subset, modname_old, subname_old, modname_new, subname_new)
|
||||
local subset = table.copy(subset)
|
||||
for k, v in pairs(subset) do
|
||||
minetest.register_alias(modname_old .. ":" .. v[1] .. "_" .. subname_old .. v[2], modname_new .. ":" .. v[1] .. "_" .. subname_new .. v[2])
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_custom_subset_alias_force(subset, modname_old, subname_old, modname_new, subname_new)
|
||||
local subset = table.copy(subset)
|
||||
for k, v in pairs(subset) do
|
||||
minetest.register_alias_force(modname_old .. ":" .. v[1] .. "_" .. subname_old .. v[2], modname_new .. ":" .. v[1] .. "_" .. subname_new .. v[2])
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_custom_subset(subset, modname, subname, recipeitem, fields)
|
||||
local subset = table.copy(subset)
|
||||
for k, v in pairs(subset) do
|
||||
stairsplus.register_single(v[1], v[2], stairsplus.defs[v[1]][v[2]], modname, subname, recipeitem, fields)
|
||||
end
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
end
|
409
stairsplus/defs.lua
Normal file
@ -0,0 +1,409 @@
|
||||
--[[
|
||||
More Blocks: registrations
|
||||
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
|
||||
local box_slope = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_half = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
|
||||
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
|
||||
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_half_raised = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
|
||||
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
|
||||
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
--==============================================================
|
||||
|
||||
local box_slope_inner = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.5, -0.25, 0.5, 0, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.25, 0, 0.5},
|
||||
{-0.5, 0, -0.5, 0, 0.25, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5},
|
||||
{-0.5, 0.25, -0.5, -0.25, 0.5, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_inner_half = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
|
||||
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.375, -0.5, 0.25, -0.25, 0.5},
|
||||
{-0.5, -0.25, -0.5, 0, -0.125, 0.5},
|
||||
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
|
||||
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
|
||||
{-0.5, -0.125, -0.5, -0.25, 0, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_inner_half_raised = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
|
||||
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.125, -0.5, 0.25, 0.25, 0.5},
|
||||
{-0.5, 0.25, -0.5, 0, 0.375, 0.5},
|
||||
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
|
||||
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
|
||||
{-0.5, 0.375, -0.5, -0.25, 0.5, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
--==============================================================
|
||||
|
||||
local box_slope_outer = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.25, -0.25, 0.25, 0, 0.5},
|
||||
{-0.5, 0, 0, 0, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0.25, -0.25, 0.5, 0.5}
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_outer_half = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
|
||||
{-0.5, -0.375, -0.25, 0.25, -0.25, 0.5},
|
||||
{-0.5, -0.25, 0, 0, -0.125, 0.5},
|
||||
{-0.5, -0.125, 0.25, -0.25, 0, 0.5}
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_outer_half_raised = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
|
||||
{-0.5, 0.125, -0.25, 0.25, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0, 0, 0.375, 0.5},
|
||||
{-0.5, 0.375, 0.25, -0.25, 0.5, 0.5}
|
||||
}
|
||||
}
|
||||
|
||||
stairsplus.defs = {
|
||||
["micro"] = {
|
||||
[""] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0, 0, 0.5},
|
||||
},
|
||||
},
|
||||
["_1"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
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},
|
||||
},
|
||||
},
|
||||
["_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},
|
||||
},
|
||||
},
|
||||
["_15"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0, 0.4375, 0.5},
|
||||
},
|
||||
}
|
||||
},
|
||||
["panel"] = {
|
||||
[""] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
|
||||
},
|
||||
},
|
||||
["_1"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
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},
|
||||
},
|
||||
},
|
||||
["_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},
|
||||
},
|
||||
},
|
||||
["_15"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5},
|
||||
},
|
||||
}
|
||||
},
|
||||
["slab"] = {
|
||||
[""] = 8,
|
||||
["_quarter"] = 4,
|
||||
["_three_quarter"] = 12,
|
||||
["_1"] = 1,
|
||||
["_2"] = 2,
|
||||
["_14"] = 14,
|
||||
["_15"] = 15,
|
||||
["_two_sides"] = {
|
||||
{ -0.5, -0.5, -0.5, 0.5, -7/16, 7/16 },
|
||||
{ -0.5, -0.5, 7/16, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
["_three_sides"] = {
|
||||
{ -7/16, -0.5, -0.5, 0.5, -7/16, 7/16 },
|
||||
{ -7/16, -0.5, 7/16, 0.5, 0.5, 0.5 },
|
||||
{ -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }
|
||||
},
|
||||
["_three_sides_u"] = {
|
||||
{ -0.5, -0.5, -0.5, 0.5, 0.5, -7/16 },
|
||||
{ -0.5, -0.5, -7/16, 0.5, -7/16, 7/16 },
|
||||
{ -0.5, -0.5, 7/16, 0.5, 0.5, 0.5 }
|
||||
}
|
||||
},
|
||||
["slope"] = {
|
||||
[""] = {
|
||||
mesh = "moreblocks_slope.obj",
|
||||
collision_box = box_slope,
|
||||
selection_box = box_slope,
|
||||
|
||||
},
|
||||
["_half"] = {
|
||||
mesh = "moreblocks_slope_half.obj",
|
||||
collision_box = box_slope_half,
|
||||
selection_box = box_slope_half,
|
||||
},
|
||||
["_half_raised"] = {
|
||||
mesh = "moreblocks_slope_half_raised.obj",
|
||||
collision_box = box_slope_half_raised,
|
||||
selection_box = box_slope_half_raised,
|
||||
},
|
||||
|
||||
--==============================================================
|
||||
|
||||
["_inner"] = {
|
||||
mesh = "moreblocks_slope_inner.obj",
|
||||
collision_box = box_slope_inner,
|
||||
selection_box = box_slope_inner,
|
||||
},
|
||||
["_inner_half"] = {
|
||||
mesh = "moreblocks_slope_inner_half.obj",
|
||||
collision_box = box_slope_inner_half,
|
||||
selection_box = box_slope_inner_half,
|
||||
},
|
||||
["_inner_half_raised"] = {
|
||||
mesh = "moreblocks_slope_inner_half_raised.obj",
|
||||
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,
|
||||
selection_box = box_slope_inner,
|
||||
},
|
||||
["_inner_cut_half"] = {
|
||||
mesh = "moreblocks_slope_inner_cut_half.obj",
|
||||
collision_box = box_slope_inner_half,
|
||||
selection_box = box_slope_inner_half,
|
||||
},
|
||||
["_inner_cut_half_raised"] = {
|
||||
mesh = "moreblocks_slope_inner_cut_half_raised.obj",
|
||||
collision_box = box_slope_inner_half_raised,
|
||||
selection_box = box_slope_inner_half_raised,
|
||||
},
|
||||
|
||||
--==============================================================
|
||||
|
||||
["_outer"] = {
|
||||
mesh = "moreblocks_slope_outer.obj",
|
||||
collision_box = box_slope_outer,
|
||||
selection_box = box_slope_outer,
|
||||
},
|
||||
["_outer_half"] = {
|
||||
mesh = "moreblocks_slope_outer_half.obj",
|
||||
collision_box = box_slope_outer_half,
|
||||
selection_box = box_slope_outer_half,
|
||||
},
|
||||
["_outer_half_raised"] = {
|
||||
mesh = "moreblocks_slope_outer_half_raised.obj",
|
||||
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,
|
||||
selection_box = box_slope_outer,
|
||||
},
|
||||
["_outer_cut_half"] = {
|
||||
mesh = "moreblocks_slope_outer_cut_half.obj",
|
||||
collision_box = box_slope_outer_half,
|
||||
selection_box = box_slope_outer_half,
|
||||
},
|
||||
["_outer_cut_half_raised"] = {
|
||||
mesh = "moreblocks_slope_outer_cut_half_raised.obj",
|
||||
collision_box = box_slope_outer_half_raised,
|
||||
selection_box = box_slope_outer_half_raised,
|
||||
},
|
||||
["_cut"] = {
|
||||
mesh = "moreblocks_slope_cut.obj",
|
||||
collision_box = box_slope_outer,
|
||||
selection_box = box_slope_outer,
|
||||
},
|
||||
},
|
||||
["stair"] = {
|
||||
[""] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_half"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0, 0, 0.5},
|
||||
{-0.5, 0, 0, 0, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_right_half"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{0, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_inner"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
{-0.5, 0, -0.5, 0, 0.5, 0},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_outer"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_alt"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_alt_1"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.0625, -0.5, 0.5, 0, 0},
|
||||
{-0.5, 0.4375, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_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_4"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.25, -0.5, 0.5, 0, 0},
|
||||
{-0.5, 0.25, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for type,a in pairs(stairsplus.defs) do
|
||||
for name,b in pairs(stairsplus.defs[type]) do
|
||||
table.insert(stairsplus.shapes_list, { type .. "_", name })
|
||||
end
|
||||
end
|
@ -1,11 +1,11 @@
|
||||
--[[
|
||||
More Blocks: Stairs+
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
-- Nodes will be called <modname>:{stair,slab,panel,micro}_<subname>
|
||||
-- Nodes will be called <modname>:{stair,slab,panel,micro,slope}_<subname>
|
||||
|
||||
local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"
|
||||
|
||||
@ -19,21 +19,6 @@ and minetest.settings:get_bool("creative_mode") then
|
||||
stairsplus.expect_infinite_stacks = true
|
||||
end
|
||||
|
||||
function stairsplus.copytable(orig)
|
||||
local orig_type = type(orig)
|
||||
local copy
|
||||
if orig_type == 'table' then
|
||||
copy = {}
|
||||
for orig_key, orig_value in next, orig, nil do
|
||||
copy[stairsplus.copytable(orig_key)] = stairsplus.copytable(orig_value)
|
||||
end
|
||||
setmetatable(copy, stairsplus.copytable(getmetatable(orig)))
|
||||
else
|
||||
copy = orig
|
||||
end
|
||||
return copy
|
||||
end
|
||||
|
||||
function stairsplus:prepare_groups(groups)
|
||||
local result = {}
|
||||
if groups then
|
||||
@ -85,9 +70,13 @@ end
|
||||
|
||||
-- dofile(modpath.. "/aliases.lua") -- Not needed as of Q2 2013, uncomment to fix old maps.
|
||||
-- dofile(modpath.. "/conversion.lua") -- Not needed as of Q2 2013, uncomment to fix old maps.
|
||||
dofile(modpath .. "/defs.lua")
|
||||
dofile(modpath .. "/recipes.lua")
|
||||
dofile(modpath .. "/common.lua")
|
||||
dofile(modpath .. "/stairs.lua")
|
||||
dofile(modpath .. "/slabs.lua")
|
||||
dofile(modpath .. "/slopes.lua")
|
||||
dofile(modpath .. "/panels.lua")
|
||||
dofile(modpath .. "/microblocks.lua")
|
||||
dofile(modpath .. "/custom.lua")
|
||||
dofile(modpath .. "/registrations.lua")
|
||||
|
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: microblock definitions
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
@ -20,138 +20,25 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
|
||||
})
|
||||
end
|
||||
|
||||
local microblocks_defs = {
|
||||
[""] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0, 0, 0.5},
|
||||
},
|
||||
},
|
||||
["_1"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
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},
|
||||
},
|
||||
},
|
||||
["_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},
|
||||
},
|
||||
},
|
||||
["_15"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0, 0.4375, 0.5},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
for k,v in pairs(microblocks_defs) do
|
||||
table.insert(stairsplus.shapes_list, { "micro_", k })
|
||||
end
|
||||
|
||||
function stairsplus:register_micro_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(microblocks_defs)
|
||||
local defs = table.copy(stairsplus.defs["micro"])
|
||||
for alternate, def in pairs(defs) do
|
||||
minetest.register_alias(modname_old .. ":micro_" .. subname_old .. alternate, modname_new .. ":micro_" .. subname_new .. alternate)
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(microblocks_defs)
|
||||
local defs = table.copy(stairsplus.defs["micro"])
|
||||
for alternate, def in pairs(defs) do
|
||||
minetest.register_alias_force(modname_old .. ":micro_" .. subname_old .. alternate, modname_new .. ":micro_" .. subname_new .. alternate)
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_micro(modname, subname, recipeitem, fields)
|
||||
local defs = stairsplus.copytable(microblocks_defs)
|
||||
local desc = S("%s Microblock"):format(fields.description)
|
||||
local defs = table.copy(stairsplus.defs["micro"])
|
||||
for alternate, def in pairs(defs) do
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = def.paramtype2 or "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
def.description = desc
|
||||
if fields.drop and not (type(fields.drop) == "table") then
|
||||
def.drop = modname.. ":micro_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":micro_" ..subname..alternate, def)
|
||||
stairsplus.register_single("micro", alternate, def, modname, subname, recipeitem, fields)
|
||||
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,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
end
|
||||
|
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: panel definitions
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
@ -20,118 +20,25 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
|
||||
})
|
||||
end
|
||||
|
||||
local panels_defs = {
|
||||
[""] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
|
||||
},
|
||||
},
|
||||
["_1"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
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},
|
||||
},
|
||||
},
|
||||
["_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},
|
||||
},
|
||||
},
|
||||
["_15"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
for k,v in pairs(panels_defs) do
|
||||
table.insert(stairsplus.shapes_list, { "panel_", k })
|
||||
end
|
||||
|
||||
function stairsplus:register_panel_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(panels_defs)
|
||||
local defs = table.copy(stairsplus.defs["panel"])
|
||||
for alternate, def in pairs(defs) do
|
||||
minetest.register_alias(modname_old .. ":panel_" .. subname_old .. alternate, modname_new .. ":panel_" .. subname_new .. alternate)
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_panel_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(panels_defs)
|
||||
local defs = table.copy(stairsplus.defs["panel"])
|
||||
for alternate, def in pairs(defs) do
|
||||
minetest.register_alias_force(modname_old .. ":panel_" .. subname_old .. alternate, modname_new .. ":panel_" .. subname_new .. alternate)
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||
local defs = stairsplus.copytable(panels_defs)
|
||||
local desc = S("%s Panel"):format(fields.description)
|
||||
local defs = table.copy(stairsplus.defs["panel"])
|
||||
for alternate, def in pairs(defs) do
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = def.paramtype2 or "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.description = desc
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop and not (type(fields.drop) == "table") then
|
||||
def.drop = modname.. ":panel_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":panel_" ..subname..alternate, def)
|
||||
stairsplus.register_single("panel", alternate, def, modname, subname, recipeitem, fields)
|
||||
end
|
||||
minetest.register_alias(modname.. ":panel_" ..subname.. "_bottom", modname.. ":panel_" ..subname)
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":panel_" .. subname .. " 12",
|
||||
recipe = {
|
||||
{recipeitem, ""},
|
||||
{recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":panel_" .. subname .. " 12",
|
||||
recipe = {
|
||||
{"", recipeitem},
|
||||
{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,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
end
|
||||
|
443
stairsplus/recipes.lua
Normal file
@ -0,0 +1,443 @@
|
||||
--[[
|
||||
More Blocks: Stairs+
|
||||
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
|
||||
stairsplus.register_recipes = function(category, alternate, modname, subname, recipeitem)
|
||||
if category == "micro" and alternate == "" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 7",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_inner"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 6",
|
||||
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,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_alias(modname .. ":micro_" .. subname .. "_bottom", modname .. ":micro_" .. subname)
|
||||
elseif category == "panel" and alternate == "" then
|
||||
minetest.register_craft({
|
||||
output = modname .. ":panel_" .. subname .. " 12",
|
||||
recipe = {
|
||||
{recipeitem, ""},
|
||||
{recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":panel_" .. subname .. " 12",
|
||||
recipe = {
|
||||
{"", recipeitem},
|
||||
{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,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_alias(modname.. ":panel_" ..subname.. "_bottom", modname.. ":panel_" ..subname)
|
||||
elseif category == "slab" then
|
||||
if alternate == "" then
|
||||
minetest.register_craft({
|
||||
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({
|
||||
-- type = "shapeless",
|
||||
-- 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 = {
|
||||
{modname .. ":panel_" .. subname},
|
||||
{modname .. ":panel_" .. subname},
|
||||
},
|
||||
})
|
||||
------------------------------
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. " 3",
|
||||
recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname},
|
||||
})
|
||||
|
||||
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,
|
||||
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"},
|
||||
})
|
||||
elseif alternate == "_quarter" then
|
||||
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 .. "_three_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
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"},
|
||||
})
|
||||
elseif alternate == "_three_quarter" then
|
||||
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"},
|
||||
})
|
||||
elseif alternate == "_2" then
|
||||
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 .. "_14", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_2",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
elseif alternate == "_14" then
|
||||
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"},
|
||||
})
|
||||
elseif alternate == "_15" then
|
||||
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 .. "_15",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
end
|
||||
elseif category == "slope" then
|
||||
if alternate == "" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname},
|
||||
})
|
||||
elseif alternate == "_half" then
|
||||
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"},
|
||||
})
|
||||
elseif alternate == "_outer" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer", modname .. ":slope_" .. subname .. "_inner"},
|
||||
})
|
||||
elseif alternate == "_outer_half" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half_raised"},
|
||||
})
|
||||
elseif alternate == "_inner_half" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised", modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
elseif alternate == "_outer_cut" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_inner_cut"},
|
||||
})
|
||||
elseif alternate == "_outer_cut_half" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half_raised"},
|
||||
})
|
||||
elseif alternate == "_cut" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_cut", modname .. ":slope_" .. subname .. "_cut"},
|
||||
})
|
||||
elseif alternate == "_half_raised" then
|
||||
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"},
|
||||
})
|
||||
elseif alternate == "_inner_half_raised" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_inner_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
elseif alternate == "_outer_half_raised" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_outer_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"},
|
||||
})
|
||||
elseif alternate == "_inner_cut_half_raised" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_inner_cut_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_cut_half"},
|
||||
})
|
||||
end
|
||||
elseif category == "stair" then
|
||||
if alternate == "" then
|
||||
minetest.register_craft({
|
||||
output = modname .. ":stair_" .. subname .. " 8",
|
||||
recipe = {
|
||||
{recipeitem, "", ""},
|
||||
{recipeitem, recipeitem, ""},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":stair_" .. subname .. " 8",
|
||||
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,
|
||||
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,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
elseif alternate == "_inner" then
|
||||
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},
|
||||
})
|
||||
elseif alternate == "_outer" then
|
||||
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 .. "_outer",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
elseif alternate == "_half" then
|
||||
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},
|
||||
})
|
||||
elseif alternate == "_right_half" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_right_half",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_half"},
|
||||
})
|
||||
elseif alternate == "_alt" then
|
||||
minetest.register_craft({ -- See mirrored variation of the recipe below.
|
||||
output = modname .. ":stair_" .. subname .. "_alt",
|
||||
recipe = {
|
||||
{modname .. ":panel_" .. subname, ""},
|
||||
{"" , modname .. ":panel_" .. subname},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({ -- Mirrored variation of the recipe above.
|
||||
output = modname .. ":stair_" .. subname .. "_alt",
|
||||
recipe = {
|
||||
{"" , modname .. ":panel_" .. subname},
|
||||
{modname .. ":panel_" .. subname, ""},
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
@ -1,10 +1,11 @@
|
||||
--[[
|
||||
More Blocks: registrations
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
-- default registrations
|
||||
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
||||
"stone",
|
||||
"stone_block",
|
||||
@ -48,73 +49,122 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
||||
"desert_sandstone_block",
|
||||
"sandstone_block",
|
||||
"coral_skeleton",
|
||||
"farming:straw"
|
||||
"ice",
|
||||
"snowblock",
|
||||
}
|
||||
|
||||
for _, name in pairs(default_nodes) do
|
||||
local nodename = "default:"..name
|
||||
local a,b = string.find(name, ":")
|
||||
if b then
|
||||
nodename = name
|
||||
name = string.sub(name, b+1)
|
||||
local mod = "default"
|
||||
local nodename = mod .. ":" .. name
|
||||
local ndef = table.copy(minetest.registered_nodes[nodename])
|
||||
ndef.sunlight_propagates = true
|
||||
|
||||
-- Workaround to fix node orientation (minetest >= 0.4.17.1)
|
||||
if ndef.place_param2 == 0 then
|
||||
ndef.place_param2 = nil
|
||||
end
|
||||
local ndef = minetest.registered_nodes[nodename]
|
||||
if ndef then
|
||||
local drop
|
||||
if type(ndef.drop) == "string" then
|
||||
drop = ndef.drop:sub((b or 8)+1)
|
||||
end
|
||||
|
||||
local tiles = ndef.tiles
|
||||
if #ndef.tiles > 1 and ndef.drawtype:find("glass") then
|
||||
tiles = { ndef.tiles[1] }
|
||||
end
|
||||
-- Stone and desert_stone drop cobble and desert_cobble respectively.
|
||||
if type(ndef.drop) == "string" then
|
||||
ndef.drop = ndef.drop:gsub(".+:", "")
|
||||
end
|
||||
|
||||
stairsplus:register_all("moreblocks", name, nodename, {
|
||||
description = ndef.description,
|
||||
drop = drop,
|
||||
groups = ndef.groups,
|
||||
sounds = ndef.sounds,
|
||||
tiles = tiles,
|
||||
sunlight_propagates = true,
|
||||
light_source = ndef.light_source
|
||||
})
|
||||
-- Use the primary tile for all sides of cut glasslike nodes and disregard paramtype2.
|
||||
if #ndef.tiles > 1 and ndef.drawtype and ndef.drawtype:find("glass") then
|
||||
ndef.tiles = {ndef.tiles[1]}
|
||||
ndef.paramtype2 = nil
|
||||
end
|
||||
|
||||
mod = "moreblocks"
|
||||
stairsplus:register_all(mod, name, nodename, ndef)
|
||||
minetest.register_alias_force("stairs:stair_" .. name, mod .. ":stair_" .. name)
|
||||
minetest.register_alias_force("stairs:stair_outer_" .. name, mod .. ":stair_" .. name .. "_outer")
|
||||
minetest.register_alias_force("stairs:stair_inner_" .. name, mod .. ":stair_" .. name .. "_inner")
|
||||
minetest.register_alias_force("stairs:slab_" .. name, mod .. ":slab_" .. name)
|
||||
end
|
||||
|
||||
-- farming registrations
|
||||
if minetest.get_modpath("farming") then
|
||||
local farming_nodes = {"straw"}
|
||||
for _, name in pairs(farming_nodes) do
|
||||
local mod = "farming"
|
||||
local nodename = mod .. ":" .. name
|
||||
local ndef = table.copy(minetest.registered_nodes[nodename])
|
||||
ndef.sunlight_propagates = true
|
||||
|
||||
mod = "moreblocks"
|
||||
stairsplus:register_all(mod, name, nodename, ndef)
|
||||
minetest.register_alias_force("stairs:stair_" .. name, mod .. ":stair_" .. name)
|
||||
minetest.register_alias_force("stairs:stair_outer_" .. name, mod .. ":stair_" .. name .. "_outer")
|
||||
minetest.register_alias_force("stairs:stair_inner_" .. name, mod .. ":stair_" .. name .. "_inner")
|
||||
minetest.register_alias_force("stairs:slab_" .. name, mod .. ":slab_" .. name)
|
||||
end
|
||||
end
|
||||
|
||||
-- wool registrations
|
||||
|
||||
if minetest.get_modpath("wool") then
|
||||
local dyes = {"white", "grey", "black", "red", "yellow", "green", "cyan",
|
||||
"blue", "magenta", "orange", "violet", "brown", "pink",
|
||||
"dark_grey", "dark_green"}
|
||||
for _, name in pairs(dyes) do
|
||||
local mod = "wool"
|
||||
local nodename = mod .. ":" .. name
|
||||
local ndef = table.copy(minetest.registered_nodes[nodename])
|
||||
ndef.sunlight_propagates = true
|
||||
|
||||
local colorlist = {
|
||||
{"white", "White Wool"},
|
||||
{"grey", "Grey Wool"},
|
||||
{"black", "Black Wool"},
|
||||
{"red", "Red Wool"},
|
||||
{"yellow", "Yellow Wool"},
|
||||
{"green", "Green Wool"},
|
||||
{"cyan", "Cyan Wool"},
|
||||
{"blue", "Blue Wool"},
|
||||
{"magenta", "Magenta Wool"},
|
||||
{"orange", "Orange Wool"},
|
||||
{"violet", "Violet Wool"},
|
||||
{"brown", "Brown Wool"},
|
||||
{"pink", "Pink Wool"},
|
||||
{"dark_grey", "Dark Grey Wool"},
|
||||
{"dark_green", "Dark Green Wool"},
|
||||
}
|
||||
-- Prevent dye+cut wool recipy from creating a full wool block.
|
||||
ndef.groups.wool = nil
|
||||
|
||||
for i in ipairs(colorlist) do
|
||||
local color = colorlist[i][1]
|
||||
local colordesc = colorlist[i][2]
|
||||
|
||||
stairsplus:register_all("wool", color, "wool:"..color, {
|
||||
description = colordesc,
|
||||
tiles = {"wool_"..color..".png"},
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,
|
||||
flammable=3,wool=1,not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_defaults(),
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
stairsplus:register_all(mod, name, nodename, ndef)
|
||||
end
|
||||
end
|
||||
|
||||
-- basic_materials, keeping the original other-mod-oriented names
|
||||
-- for backwards compatibility
|
||||
|
||||
if minetest.get_modpath("basic_materials") then
|
||||
stairsplus:register_all("technic","concrete","basic_materials:concrete_block",{
|
||||
description = "Concrete",
|
||||
tiles = {"basic_materials_concrete_block.png",},
|
||||
groups = {cracky=1, level=2, concrete=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_alias("prefab:concrete_stair","technic:stair_concrete")
|
||||
minetest.register_alias("prefab:concrete_slab","technic:slab_concrete")
|
||||
|
||||
stairsplus:register_all("gloopblocks", "cement", "basic_materials:cement_block", {
|
||||
description = "Cement",
|
||||
tiles = {"basic_materials_cement_block.png"},
|
||||
groups = {cracky=2, not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
stairsplus:register_all("technic", "brass_block", "basic_materials:brass_block", {
|
||||
description="Brass Block",
|
||||
groups={cracky=1, not_in_creative_inventory=1},
|
||||
tiles={"basic_materials_brass_block.png"},
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
-- Alias cuts of split_stone_tile_alt which was renamed checker_stone_tile.
|
||||
stairsplus:register_alias_all("moreblocks", "split_stone_tile_alt", "moreblocks", "checker_stone_tile")
|
||||
|
||||
-- The following LBM is necessary because the name stair_split_stone_tile_alt
|
||||
-- conflicts with another node and so the alias for that specific node gets
|
||||
-- ignored.
|
||||
minetest.register_lbm({
|
||||
name = "moreblocks:fix_split_stone_tile_alt_name_collision",
|
||||
nodenames = {"moreblocks:stair_split_stone_tile_alt"},
|
||||
action = function(pos, node)
|
||||
minetest.set_node(pos, {
|
||||
name = "moreblocks:stair_checker_stone_tile",
|
||||
param2 = minetest.get_node(pos).param2
|
||||
|
||||
})
|
||||
minetest.log('action', "LBM replaced " .. node.name ..
|
||||
" at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: slab definitions
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
@ -20,238 +20,26 @@ function register_slab(modname, subname, recipeitem, groups, images, description
|
||||
})
|
||||
end
|
||||
|
||||
local slabs_defs = {
|
||||
[""] = 8,
|
||||
["_quarter"] = 4,
|
||||
["_three_quarter"] = 12,
|
||||
["_1"] = 1,
|
||||
["_2"] = 2,
|
||||
["_14"] = 14,
|
||||
["_15"] = 15,
|
||||
["_two_sides"] = {
|
||||
{ -0.5, -0.5, -0.5, 0.5, -7/16, 7/16 },
|
||||
{ -0.5, -0.5, 7/16, 0.5, 0.5, 0.5 }
|
||||
},
|
||||
["_three_sides"] = {
|
||||
{ -7/16, -0.5, -0.5, 0.5, -7/16, 7/16 },
|
||||
{ -7/16, -0.5, 7/16, 0.5, 0.5, 0.5 },
|
||||
{ -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }
|
||||
},
|
||||
["_three_sides_u"] = {
|
||||
{ -0.5, -0.5, -0.5, 0.5, 0.5, -7/16 },
|
||||
{ -0.5, -0.5, -7/16, 0.5, -7/16, 7/16 },
|
||||
{ -0.5, -0.5, 7/16, 0.5, 0.5, 0.5 }
|
||||
}
|
||||
}
|
||||
|
||||
for k,v in pairs(slabs_defs) do
|
||||
table.insert(stairsplus.shapes_list, { "slab_", k })
|
||||
end
|
||||
|
||||
function stairsplus:register_slab_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(slabs_defs)
|
||||
local defs = table.copy(stairsplus.defs["slab"])
|
||||
for alternate, def in pairs(defs) do
|
||||
minetest.register_alias(modname_old .. ":slab_" .. subname_old .. alternate, modname_new .. ":slab_" .. subname_new .. alternate)
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_slab_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(slabs_defs)
|
||||
local defs = table.copy(stairsplus.defs["slab"])
|
||||
for alternate, def in pairs(defs) do
|
||||
minetest.register_alias_force(modname_old .. ":slab_" .. subname_old .. alternate, modname_new .. ":slab_" .. subname_new .. alternate)
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
||||
local defs = stairsplus.copytable(slabs_defs)
|
||||
local defs = table.copy(stairsplus.defs["slab"])
|
||||
local desc_base = S("%s Slab"):format(fields.description)
|
||||
for alternate, shape in pairs(defs) do
|
||||
|
||||
local def = {}
|
||||
|
||||
if type(shape) ~= "table" then
|
||||
def = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, (shape/16)-0.5, 0.5},
|
||||
},
|
||||
description = ("%s (%d/16)"):format(desc_base, shape)
|
||||
}
|
||||
else
|
||||
def = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = shape,
|
||||
},
|
||||
description = desc_base
|
||||
}
|
||||
end
|
||||
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = def.paramtype2 or "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop and not (type(fields.drop) == "table") then
|
||||
def.drop = modname.. ":slab_" .. fields.drop .. alternate
|
||||
end
|
||||
minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)
|
||||
stairsplus.register_single("slab", alternate, shape, modname, subname, recipeitem, fields)
|
||||
end
|
||||
minetest.register_alias("stairs:slab_" .. subname, modname .. ":slab_" .. subname)
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
minetest.register_craft({
|
||||
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({
|
||||
-- type = "shapeless",
|
||||
-- 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 = {
|
||||
{modname .. ":panel_" .. subname},
|
||||
{modname .. ":panel_" .. subname},
|
||||
},
|
||||
})
|
||||
------------------------------
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
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",
|
||||
recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname},
|
||||
})
|
||||
end
|
||||
|
@ -1,115 +1,12 @@
|
||||
--[[
|
||||
More Blocks: slope definitions
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local S = moreblocks.intllib
|
||||
|
||||
local box_slope = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_half = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
|
||||
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
|
||||
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_half_raised = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
|
||||
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
|
||||
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
--==============================================================
|
||||
|
||||
local box_slope_inner = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.5, -0.25, 0.5, 0, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.25, 0, 0.5},
|
||||
{-0.5, 0, -0.5, 0, 0.25, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5},
|
||||
{-0.5, 0.25, -0.5, -0.25, 0.5, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_inner_half = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
|
||||
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.375, -0.5, 0.25, -0.25, 0.5},
|
||||
{-0.5, -0.25, -0.5, 0, -0.125, 0.5},
|
||||
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
|
||||
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
|
||||
{-0.5, -0.125, -0.5, -0.25, 0, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_inner_half_raised = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
|
||||
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.125, -0.5, 0.25, 0.25, 0.5},
|
||||
{-0.5, 0.25, -0.5, 0, 0.375, 0.5},
|
||||
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
|
||||
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
|
||||
{-0.5, 0.375, -0.5, -0.25, 0.5, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
--==============================================================
|
||||
|
||||
local box_slope_outer = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.25, -0.25, 0.25, 0, 0.5},
|
||||
{-0.5, 0, 0, 0, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0.25, -0.25, 0.5, 0.5}
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_outer_half = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
|
||||
{-0.5, -0.375, -0.25, 0.25, -0.25, 0.5},
|
||||
{-0.5, -0.25, 0, 0, -0.125, 0.5},
|
||||
{-0.5, -0.125, 0.25, -0.25, 0, 0.5}
|
||||
}
|
||||
}
|
||||
|
||||
local box_slope_outer_half_raised = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
|
||||
{-0.5, 0.125, -0.25, 0.25, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0, 0, 0.375, 0.5},
|
||||
{-0.5, 0.375, 0.25, -0.25, 0.5, 0.5}
|
||||
}
|
||||
}
|
||||
|
||||
-- Node will be called <modname>:slope_<subname>
|
||||
|
||||
function register_slope(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
@ -123,244 +20,25 @@ function register_slope(modname, subname, recipeitem, groups, images, descriptio
|
||||
})
|
||||
end
|
||||
|
||||
local slopes_defs = {
|
||||
[""] = {
|
||||
mesh = "moreblocks_slope.obj",
|
||||
collision_box = box_slope,
|
||||
selection_box = box_slope,
|
||||
|
||||
},
|
||||
["_half"] = {
|
||||
mesh = "moreblocks_slope_half.obj",
|
||||
collision_box = box_slope_half,
|
||||
selection_box = box_slope_half,
|
||||
},
|
||||
["_half_raised"] = {
|
||||
mesh = "moreblocks_slope_half_raised.obj",
|
||||
collision_box = box_slope_half_raised,
|
||||
selection_box = box_slope_half_raised,
|
||||
},
|
||||
|
||||
--==============================================================
|
||||
|
||||
["_inner"] = {
|
||||
mesh = "moreblocks_slope_inner.obj",
|
||||
collision_box = box_slope_inner,
|
||||
selection_box = box_slope_inner,
|
||||
},
|
||||
["_inner_half"] = {
|
||||
mesh = "moreblocks_slope_inner_half.obj",
|
||||
collision_box = box_slope_inner_half,
|
||||
selection_box = box_slope_inner_half,
|
||||
},
|
||||
["_inner_half_raised"] = {
|
||||
mesh = "moreblocks_slope_inner_half_raised.obj",
|
||||
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,
|
||||
selection_box = box_slope_inner,
|
||||
},
|
||||
["_inner_cut_half"] = {
|
||||
mesh = "moreblocks_slope_inner_cut_half.obj",
|
||||
collision_box = box_slope_inner_half,
|
||||
selection_box = box_slope_inner_half,
|
||||
},
|
||||
["_inner_cut_half_raised"] = {
|
||||
mesh = "moreblocks_slope_inner_cut_half_raised.obj",
|
||||
collision_box = box_slope_inner_half_raised,
|
||||
selection_box = box_slope_inner_half_raised,
|
||||
},
|
||||
|
||||
--==============================================================
|
||||
|
||||
["_outer"] = {
|
||||
mesh = "moreblocks_slope_outer.obj",
|
||||
collision_box = box_slope_outer,
|
||||
selection_box = box_slope_outer,
|
||||
},
|
||||
["_outer_half"] = {
|
||||
mesh = "moreblocks_slope_outer_half.obj",
|
||||
collision_box = box_slope_outer_half,
|
||||
selection_box = box_slope_outer_half,
|
||||
},
|
||||
["_outer_half_raised"] = {
|
||||
mesh = "moreblocks_slope_outer_half_raised.obj",
|
||||
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,
|
||||
selection_box = box_slope_outer,
|
||||
},
|
||||
["_outer_cut_half"] = {
|
||||
mesh = "moreblocks_slope_outer_cut_half.obj",
|
||||
collision_box = box_slope_outer_half,
|
||||
selection_box = box_slope_outer_half,
|
||||
},
|
||||
["_outer_cut_half_raised"] = {
|
||||
mesh = "moreblocks_slope_outer_cut_half_raised.obj",
|
||||
collision_box = box_slope_outer_half_raised,
|
||||
selection_box = box_slope_outer_half_raised,
|
||||
},
|
||||
["_cut"] = {
|
||||
mesh = "moreblocks_slope_cut.obj",
|
||||
collision_box = box_slope_outer,
|
||||
selection_box = box_slope_outer,
|
||||
},
|
||||
}
|
||||
|
||||
for k,v in pairs(slopes_defs) do
|
||||
table.insert(stairsplus.shapes_list, { "slope_", k })
|
||||
end
|
||||
|
||||
function stairsplus:register_slope_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(slopes_defs)
|
||||
local defs = table.copy(stairsplus.defs["slope"])
|
||||
for alternate, def in pairs(defs) do
|
||||
minetest.register_alias(modname_old .. ":slope_" .. subname_old .. alternate, modname_new .. ":slope_" .. subname_new .. alternate)
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_slope_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(slopes_defs)
|
||||
local defs = table.copy(stairsplus.defs["slope"])
|
||||
for alternate, def in pairs(defs) do
|
||||
minetest.register_alias_force(modname_old .. ":slope_" .. subname_old .. alternate, modname_new .. ":slope_" .. subname_new .. alternate)
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_slope(modname, subname, recipeitem, fields)
|
||||
local defs = stairsplus.copytable(slopes_defs)
|
||||
local desc = S("%s Slope"):format(fields.description)
|
||||
local defs = table.copy(stairsplus.defs["slope"])
|
||||
for alternate, def in pairs(defs) do
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "mesh"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = def.paramtype2 or "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.description = desc
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop and not (type(fields.drop) == "table") then
|
||||
def.drop = modname.. ":slope_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def)
|
||||
stairsplus.register_single("slope", alternate, def, modname, subname, recipeitem, fields)
|
||||
end
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
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",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_cut_half"},
|
||||
})
|
||||
end
|
||||
|
@ -1,7 +1,7 @@
|
||||
--[[
|
||||
More Blocks: stair definitions
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
@ -20,224 +20,25 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
|
||||
})
|
||||
end
|
||||
|
||||
local stairs_defs = {
|
||||
[""] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_half"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0, 0, 0.5},
|
||||
{-0.5, 0, 0, 0, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_right_half" ]= {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{0, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_inner"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
{-0.5, 0, -0.5, 0, 0.5, 0},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_outer"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_alt"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_alt_1"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.0625, -0.5, 0.5, 0, 0},
|
||||
{-0.5, 0.4375, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
["_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_4"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.25, -0.5, 0.5, 0, 0},
|
||||
{-0.5, 0.25, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for k,v in pairs(stairs_defs) do
|
||||
table.insert(stairsplus.shapes_list, { "stair_", k })
|
||||
end
|
||||
|
||||
function stairsplus:register_stair_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(stairs_defs)
|
||||
local defs = table.copy(stairsplus.defs["stair"])
|
||||
for alternate, def in pairs(defs) do
|
||||
minetest.register_alias(modname_old .. ":stair_" .. subname_old .. alternate, modname_new .. ":stair_" .. subname_new .. alternate)
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_stair_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(stairs_defs)
|
||||
local defs = table.copy(stairsplus.defs["stair"])
|
||||
for alternate, def in pairs(defs) do
|
||||
minetest.register_alias_force(modname_old .. ":stair_" .. subname_old .. alternate, modname_new .. ":stair_" .. subname_new .. alternate)
|
||||
end
|
||||
end
|
||||
|
||||
function stairsplus:register_stair(modname, subname, recipeitem, fields)
|
||||
local defs = stairsplus.copytable(stairs_defs)
|
||||
local desc = S("%s Stairs"):format(fields.description)
|
||||
local defs = table.copy(stairsplus.defs["stair"])
|
||||
for alternate, def in pairs(defs) do
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = def.paramtype2 or "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.description = desc
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop and not (type(fields.drop) == "table") then
|
||||
def.drop = modname .. ":stair_" .. fields.drop .. alternate
|
||||
end
|
||||
minetest.register_node(":" .. modname .. ":stair_" .. subname .. alternate, def)
|
||||
stairsplus.register_single("stair", alternate, def, modname, subname, recipeitem, fields)
|
||||
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",
|
||||
recipe = {
|
||||
{recipeitem, "", ""},
|
||||
{recipeitem, recipeitem, ""},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":stair_" .. subname .. " 8",
|
||||
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 = {
|
||||
{modname .. ":panel_" .. subname, ""},
|
||||
{"" , modname .. ":panel_" .. subname},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({ -- Mirrored variation of the recipe above.
|
||||
output = modname .. ":stair_" .. subname .. "_alt",
|
||||
recipe = {
|
||||
{"" , modname .. ":panel_" .. subname},
|
||||
{modname .. ":panel_" .. subname, ""},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
Before Width: | Height: | Size: 716 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 306 B |
Before Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 159 B |
BIN
textures/moreblocks_dirt_compressed.png
Normal file
After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 210 B |
Before Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 156 B |
BIN
textures/moreblocks_trap_box.png
Normal file
After Width: | Height: | Size: 135 B |
BIN
textures/moreblocks_trap_box_glass.png
Normal file
After Width: | Height: | Size: 160 B |
Before Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 289 B |