Add moreblocks
14
mods/Blocks/moreblocks/LICENSE.md
Normal file
@ -0,0 +1,14 @@
|
||||
zlib license
|
||||
============
|
||||
|
||||
Copyright (c) 2011-2015 Calinou 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.**
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
13
mods/Blocks/moreblocks/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
More Blocks
|
||||
===========
|
||||
|
||||
More Blocks for Minetest <http://minetest.net>, a free/libre infinite
|
||||
world block sandbox game.
|
||||
|
||||
To install, just clone this repository into your "mods" directory.
|
||||
|
||||
More Blocks code is licensed under the zlib license, textures are by Calinou and are licensed under CC BY-SA 3.0 Unported.
|
||||
|
||||
moreblocks_copperpatina.png is by pithydon licensed under CC0 1.0
|
||||
|
||||
**Forum topic:** <https://forum.minetest.net/viewtopic.php?f=11&t=509>
|
80
mods/Blocks/moreblocks/aliases.lua
Normal file
@ -0,0 +1,80 @@
|
||||
--[[
|
||||
More Blocks: alias definitions
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
-- More Blocks aliases:
|
||||
minetest.register_alias("sweeper", "moreblocks:sweeper")
|
||||
minetest.register_alias("circular_saw", "moreblocks:circular_saw")
|
||||
minetest.register_alias("jungle_stick", "moreblocks:jungle_stick")
|
||||
|
||||
-- Old block/item replacement:
|
||||
minetest.register_alias("moreblocks:oerkkiblock", "default:mossycobble")
|
||||
minetest.register_alias("moreblocks:screwdriver", "screwdriver:screwdriver")
|
||||
|
||||
-- Node and item renaming:
|
||||
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_jungle_wood", "default:fence_junglewood")
|
||||
minetest.register_alias("moreblocks:jungle_stick", "default:stick")
|
||||
|
||||
for _, t in pairs(circular_saw.names) do
|
||||
minetest.register_alias("moreblocks:" .. t[1] .. "_jungle_wood" .. t[2],
|
||||
"moreblocks:" .. t[1] .. "_junglewood" .. t[2])
|
||||
end
|
||||
minetest.register_alias("moreblocks:horizontaltree", "moreblocks:horizontal_tree")
|
||||
minetest.register_alias("moreblocks:horizontaljungletree", "moreblocks:horizontal_jungle_tree")
|
||||
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_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")
|
||||
minetest.register_alias("moreblocks:coalglass", "moreblocks:coal_glass")
|
||||
minetest.register_alias("moreblocks:ironglass", "moreblocks:iron_glass")
|
||||
minetest.register_alias("moreblocks:glowglass", "moreblocks:glow_glass")
|
||||
minetest.register_alias("moreblocks:superglowglass", "moreblocks:super_glow_glass")
|
||||
minetest.register_alias("moreblocks:trapglass", "moreblocks:trap_glass")
|
||||
minetest.register_alias("moreblocks:trapstone", "moreblocks:trap_stone")
|
||||
minetest.register_alias("moreblocks:cactuschecker", "moreblocks:cactus_checker")
|
||||
minetest.register_alias("moreblocks:coalchecker", "moreblocks:coal_checker")
|
||||
minetest.register_alias("moreblocks:ironchecker", "moreblocks:iron_checker")
|
||||
minetest.register_alias("moreblocks:cactusbrick", "moreblocks:cactus_brick")
|
||||
minetest.register_alias("moreblocks:cleanglass", "moreblocks:clean_glass")
|
||||
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")
|
||||
|
||||
-- ABM for horizontal trees (fix facedir):
|
||||
local horizontal_tree_convert_facedir = {7, 12, 9, 18}
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"moreblocks:horizontal_tree","moreblocks:horizontal_jungle_tree"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
if node.name == "moreblocks:horizontal_tree" then
|
||||
node.name = "default:tree"
|
||||
else
|
||||
node.name = "default:jungletree"
|
||||
end
|
||||
node.param2 = node.param2 < 3 and node.param2 or 0
|
||||
minetest.set_node(pos, {
|
||||
name = node.name,
|
||||
param2 = horizontal_tree_convert_facedir[node.param2 + 1]
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
418
mods/Blocks/moreblocks/circular_saw.lua
Normal file
@ -0,0 +1,418 @@
|
||||
--[[
|
||||
More Blocks: circular saw
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local S = moreblocks.intllib
|
||||
|
||||
circular_saw = {}
|
||||
|
||||
circular_saw.known_stairs = setmetatable({}, {
|
||||
__newindex = function(k, v)
|
||||
local modname = minetest.get_current_modname()
|
||||
print(("WARNING: mod %s tried to add node %s to the circular saw"
|
||||
.. " manually."):format(modname, v))
|
||||
end,
|
||||
})
|
||||
|
||||
-- This is populated by stairsplus:register_all:
|
||||
circular_saw.known_nodes = {}
|
||||
|
||||
-- How many microblocks does this shape at the output inventory cost:
|
||||
-- It may cause slight loss, but no gain.
|
||||
circular_saw.cost_in_microblocks = {
|
||||
1, 1, 1, 1, 1, 1, 1, 2,
|
||||
2, 3, 2, 4, 2, 4, 5, 6,
|
||||
7, 1, 1, 2, 4, 6, 7, 8,
|
||||
3, 1, 1, 2, 4, 4, 2, 6,
|
||||
7, 3, 7, 7, 4, 8, 3, 2,
|
||||
6, 2, 1, 3, 4,
|
||||
}
|
||||
|
||||
circular_saw.names = {
|
||||
{"micro", "_1"},
|
||||
{"panel", "_1"},
|
||||
{"micro", "_2"},
|
||||
{"panel", "_2"},
|
||||
{"micro", "_4"},
|
||||
{"panel", "_4"},
|
||||
{"micro", ""},
|
||||
{"panel", ""},
|
||||
{"micro", "_12"},
|
||||
{"panel", "_12"},
|
||||
{"micro", "_14"},
|
||||
{"panel", "_14"},
|
||||
{"micro", "_15"},
|
||||
{"panel", "_15"},
|
||||
{"stair", "_outer"},
|
||||
{"stair", ""},
|
||||
{"stair", "_inner"},
|
||||
{"slab", "_1"},
|
||||
{"slab", "_2"},
|
||||
{"slab", "_quarter"},
|
||||
{"slab", ""},
|
||||
{"slab", "_three_quarter"},
|
||||
{"slab", "_14"},
|
||||
{"slab", "_15"},
|
||||
{"stair", "_half"},
|
||||
{"stair", "_alt_1"},
|
||||
{"stair", "_alt_2"},
|
||||
{"stair", "_alt_4"},
|
||||
{"stair", "_alt"},
|
||||
{"slope", ""},
|
||||
{"slope", "_half"},
|
||||
{"slope", "_half_raised"},
|
||||
{"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"},
|
||||
}
|
||||
|
||||
function circular_saw:get_cost(inv, stackname)
|
||||
for i, item in pairs(inv:get_list("output")) do
|
||||
if item:get_name() == stackname then
|
||||
return circular_saw.cost_in_microblocks[i]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function circular_saw:get_output_inv(modname, material, amount, max)
|
||||
if (not max or max < 1 or max > 99) then max = 99 end
|
||||
|
||||
local list = {}
|
||||
local pos = #list
|
||||
|
||||
-- If there is nothing inside, display empty inventory:
|
||||
if amount < 1 then
|
||||
return list
|
||||
end
|
||||
|
||||
for i = 1, #circular_saw.names do
|
||||
local t = circular_saw.names[i]
|
||||
local cost = circular_saw.cost_in_microblocks[i]
|
||||
local balance = math.min(math.floor(amount/cost), max)
|
||||
local nodename = modname .. ":" .. t[1] .. "_" .. material .. t[2]
|
||||
if minetest.registered_nodes[nodename] then
|
||||
pos = pos + 1
|
||||
list[pos] = nodename .. " " .. balance
|
||||
end
|
||||
end
|
||||
return list
|
||||
end
|
||||
|
||||
|
||||
-- Reset empty circular_saw after last full block has been taken out
|
||||
-- (or the circular_saw has been placed the first time)
|
||||
-- Note: max_offered is not reset:
|
||||
function circular_saw:reset(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
inv:set_list("input", {})
|
||||
inv:set_list("micro", {})
|
||||
inv:set_list("output", {})
|
||||
meta:set_int("anz", 0)
|
||||
|
||||
meta:set_string("infotext",
|
||||
S("Circular Saw is empty (owned by %s)")
|
||||
:format(meta:get_string("owner") or ""))
|
||||
end
|
||||
|
||||
|
||||
-- Player has taken something out of the box or placed something inside
|
||||
-- that amounts to count microblocks:
|
||||
function circular_saw:update_inventory(pos, amount)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
amount = meta:get_int("anz") + amount
|
||||
|
||||
-- The material is recycled automaticly.
|
||||
inv:set_list("recycle", {})
|
||||
|
||||
if amount < 1 then -- If the last block is taken out.
|
||||
self:reset(pos)
|
||||
return
|
||||
end
|
||||
|
||||
local stack = inv:get_stack("input", 1)
|
||||
-- At least one "normal" block is necessary to see what kind of stairs are requested.
|
||||
if stack:is_empty() then
|
||||
-- Any microblocks not taken out yet are now lost.
|
||||
-- (covers material loss in the machine)
|
||||
self:reset(pos)
|
||||
return
|
||||
|
||||
end
|
||||
local node_name = stack:get_name() or ""
|
||||
local name_parts = circular_saw.known_nodes[node_name] or ""
|
||||
local modname = name_parts[1] or ""
|
||||
local material = name_parts[2] or ""
|
||||
|
||||
inv:set_list("input", { -- Display as many full blocks as possible:
|
||||
node_name.. " " .. math.floor(amount / 8)
|
||||
})
|
||||
|
||||
-- The stairnodes made of default nodes use moreblocks namespace, other mods keep own:
|
||||
if modname == "default" then
|
||||
modname = "moreblocks"
|
||||
end
|
||||
-- print("circular_saw set to " .. modname .. " : "
|
||||
-- .. material .. " with " .. (amount) .. " microblocks.")
|
||||
|
||||
-- 0-7 microblocks may remain left-over:
|
||||
inv:set_list("micro", {
|
||||
modname .. ":micro_" .. material .. "_bottom " .. (amount % 8)
|
||||
})
|
||||
-- Display:
|
||||
inv:set_list("output",
|
||||
self:get_output_inv(modname, material, amount,
|
||||
meta:get_int("max_offered")))
|
||||
-- Store how many microblocks are available:
|
||||
meta:set_int("anz", amount)
|
||||
|
||||
meta:set_string("infotext",
|
||||
S("Circular Saw is working on %s (owned by %s)")
|
||||
:format(material, meta:get_string("owner") or ""))
|
||||
end
|
||||
|
||||
|
||||
-- The amount of items offered per shape can be configured:
|
||||
function circular_saw.on_receive_fields(pos, formname, fields, sender)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local max = tonumber(fields.max_offered)
|
||||
if max and max > 0 then
|
||||
meta:set_string("max_offered", max)
|
||||
-- Update to show the correct number of items:
|
||||
circular_saw:update_inventory(pos, 0)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Moving the inventory of the circular_saw around is not allowed because it
|
||||
-- is a fictional inventory. Moving inventory around would be rather
|
||||
-- impractical and make things more difficult to calculate:
|
||||
function circular_saw.allow_metadata_inventory_move(
|
||||
pos, from_list, from_index, to_list, to_index, count, player)
|
||||
return 0
|
||||
end
|
||||
|
||||
|
||||
-- Only input- and recycle-slot are intended as input slots:
|
||||
function circular_saw.allow_metadata_inventory_put(
|
||||
pos, listname, index, stack, player)
|
||||
-- The player is not allowed to put something in there:
|
||||
if listname == "output" or listname == "micro" then
|
||||
return 0
|
||||
end
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local stackname = stack:get_name()
|
||||
local count = stack:get_count()
|
||||
|
||||
-- Only alow those items that are offered in the output inventory to be recycled:
|
||||
if listname == "recycle" then
|
||||
if not inv:contains_item("output", stackname) then
|
||||
return 0
|
||||
end
|
||||
local stackmax = stack:get_stack_max()
|
||||
local instack = inv:get_stack("input", 1)
|
||||
local microstack = inv:get_stack("micro", 1)
|
||||
local incount = instack:get_count()
|
||||
local incost = (incount * 8) + microstack:get_count()
|
||||
local maxcost = (stackmax * 8) + 7
|
||||
local cost = circular_saw:get_cost(inv, stackname)
|
||||
if (incost + cost) > maxcost then
|
||||
return math.max((maxcost - incost) / cost, 0)
|
||||
end
|
||||
return count
|
||||
end
|
||||
|
||||
-- Only accept certain blocks as input which are known to be craftable into stairs:
|
||||
if listname == "input" then
|
||||
if not inv:is_empty("input") then
|
||||
if inv:get_stack("input", index):get_name() ~= stackname then
|
||||
return 0
|
||||
end
|
||||
end
|
||||
if not inv:is_empty("micro") then
|
||||
local microstackname = inv:get_stack("micro", 1):get_name():gsub("^.+:micro_", "", 1)
|
||||
local cutstackname = stackname:gsub("^.+:", "", 1)
|
||||
if microstackname ~= cutstackname then
|
||||
return 0
|
||||
end
|
||||
end
|
||||
for name, t in pairs(circular_saw.known_nodes) do
|
||||
if name == stackname and inv:room_for_item("input", stack) then
|
||||
return count
|
||||
end
|
||||
end
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
-- Taking is allowed from all slots (even the internal microblock slot).
|
||||
-- Putting something in is slightly more complicated than taking anything
|
||||
-- because we have to make sure it is of a suitable material:
|
||||
function circular_saw.on_metadata_inventory_put(
|
||||
pos, listname, index, stack, player)
|
||||
-- We need to find out if the circular_saw is already set to a
|
||||
-- specific material or not:
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local stackname = stack:get_name()
|
||||
local count = stack:get_count()
|
||||
|
||||
-- Putting something into the input slot is only possible if that had
|
||||
-- been empty before or did contain something of the same material:
|
||||
if listname == "input" then
|
||||
-- Each new block is worth 8 microblocks:
|
||||
circular_saw:update_inventory(pos, 8 * count)
|
||||
elseif listname == "recycle" then
|
||||
-- Lets look which shape this represents:
|
||||
local cost = circular_saw:get_cost(inv, stackname)
|
||||
local input_stack = inv:get_stack("input", 1)
|
||||
-- check if this would not exceed input itemstack max_stacks
|
||||
if input_stack:get_count() + ((cost * count) / 8) <= input_stack:get_stack_max() then
|
||||
circular_saw:update_inventory(pos, cost * count)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function circular_saw.on_metadata_inventory_take(
|
||||
pos, listname, index, stack, player)
|
||||
|
||||
-- Prevent (inbuilt) swapping between inventories with different blocks
|
||||
-- corrupting player inventory or Saw with 'unknown' items.
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local input_stack = inv:get_stack(listname, index)
|
||||
if not input_stack:is_empty() and input_stack:get_name()~=stack:get_name() then
|
||||
local player_inv = player:get_inventory()
|
||||
if player_inv:room_for_item("main", input_stack) then
|
||||
player_inv:add_item("main", input_stack)
|
||||
end
|
||||
|
||||
circular_saw:reset(pos)
|
||||
return
|
||||
end
|
||||
|
||||
-- If it is one of the offered stairs: find out how many
|
||||
-- microblocks have to be substracted:
|
||||
if listname == "output" then
|
||||
-- We do know how much each block at each position costs:
|
||||
local cost = circular_saw.cost_in_microblocks[index]
|
||||
* stack:get_count()
|
||||
|
||||
circular_saw:update_inventory(pos, -cost)
|
||||
elseif listname == "micro" then
|
||||
-- Each microblock costs 1 microblock:
|
||||
circular_saw:update_inventory(pos, -stack:get_count())
|
||||
elseif listname == "input" then
|
||||
-- Each normal (= full) block taken costs 8 microblocks:
|
||||
circular_saw:update_inventory(pos, 8 * -stack:get_count())
|
||||
end
|
||||
-- The recycle field plays no role here since it is processed immediately.
|
||||
end
|
||||
|
||||
gui_slots = "listcolors[#606060AA;#808080;#101010;#202020;#FFF]"
|
||||
|
||||
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_int("anz", 0) -- No microblocks inside yet.
|
||||
meta:set_string("max_offered", 99) -- How many items of this kind are offered by default?
|
||||
meta:set_string("infotext", S("Circular Saw is empty"))
|
||||
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("input", 1) -- Input slot for full blocks of material x.
|
||||
inv:set_size("micro", 1) -- Storage for 1-7 surplus microblocks.
|
||||
inv:set_size("recycle", 1) -- Surplus partial blocks can be placed here.
|
||||
inv:set_size("output", 6*8) -- 6x8 versions of stair-parts of material x.
|
||||
|
||||
circular_saw:reset(pos)
|
||||
end
|
||||
|
||||
|
||||
function circular_saw.can_dig(pos,player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
if not inv:is_empty("input") or
|
||||
not inv:is_empty("micro") or
|
||||
not inv:is_empty("recycle") then
|
||||
return false
|
||||
end
|
||||
-- Can be dug by anyone when empty, not only by the owner:
|
||||
return true
|
||||
end
|
||||
|
||||
minetest.register_node("moreblocks:circular_saw", {
|
||||
description = S("Circular Saw"),
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.4, -0.5, -0.4, -0.25, 0.25, -0.25}, -- Leg
|
||||
{0.25, -0.5, 0.25, 0.4, 0.25, 0.4}, -- Leg
|
||||
{-0.4, -0.5, 0.25, -0.25, 0.25, 0.4}, -- Leg
|
||||
{0.25, -0.5, -0.4, 0.4, 0.25, -0.25}, -- Leg
|
||||
{-0.5, 0.25, -0.5, 0.5, 0.375, 0.5}, -- Tabletop
|
||||
{-0.01, 0.4375, -0.125, 0.01, 0.5, 0.125}, -- Saw blade (top)
|
||||
{-0.01, 0.375, -0.1875, 0.01, 0.4375, 0.1875}, -- Saw blade (bottom)
|
||||
{-0.25, -0.0625, -0.25, 0.25, 0.25, 0.25}, -- Motor case
|
||||
},
|
||||
},
|
||||
tiles = {"moreblocks_circular_saw_top.png",
|
||||
"moreblocks_circular_saw_bottom.png",
|
||||
"moreblocks_circular_saw_side.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 2,oddly_breakable_by_hand = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_construct = circular_saw.on_construct,
|
||||
can_dig = circular_saw.can_dig,
|
||||
-- Set the owner of this circular saw.
|
||||
after_place_node = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = placer and placer:get_player_name() or ""
|
||||
meta:set_string("owner", owner)
|
||||
meta:set_string("infotext",
|
||||
S("Circular Saw is empty (owned by %s)")
|
||||
:format(owner))
|
||||
end,
|
||||
|
||||
-- The amount of items offered per shape can be configured:
|
||||
on_receive_fields = circular_saw.on_receive_fields,
|
||||
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,
|
||||
-- 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,
|
||||
on_metadata_inventory_take = circular_saw.on_metadata_inventory_take,
|
||||
})
|
29
mods/Blocks/moreblocks/config.lua
Normal file
@ -0,0 +1,29 @@
|
||||
--[[
|
||||
More Blocks: configuration handling
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
moreblocks.config = {}
|
||||
|
||||
local function getbool_default(setting, default)
|
||||
local value = minetest.setting_getbool(setting)
|
||||
if value == nil then
|
||||
value = default
|
||||
end
|
||||
return value
|
||||
end
|
||||
|
||||
local function setting(settingtype, name, default)
|
||||
if settingtype == "bool" then
|
||||
moreblocks.config[name] =
|
||||
getbool_default("moreblocks." .. name, default)
|
||||
else
|
||||
moreblocks.config[name] =
|
||||
minetest.setting_get("moreblocks." .. name) or default
|
||||
end
|
||||
end
|
||||
|
||||
-- Show stairs/slabs/panels/microblocks in creative inventory (true or false):
|
||||
setting("bool", "stairsplus_in_creative_inventory", false)
|
485
mods/Blocks/moreblocks/crafting.lua
Normal file
@ -0,0 +1,485 @@
|
||||
--[[
|
||||
More Blocks: crafting recipes
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:stick",
|
||||
recipe = {{"default:dry_shrub"},}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:stick",
|
||||
recipe = {{"default:sapling"},}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:stick",
|
||||
recipe = {{"default:junglesapling"},}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:wood",
|
||||
recipe = {
|
||||
{"default:stick", "default:stick"},
|
||||
{"default:stick", "default:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:junglewood",
|
||||
recipe = {
|
||||
{"moreblocks:jungle_stick", "moreblocks:jungle_stick"},
|
||||
{"moreblocks:jungle_stick", "moreblocks:jungle_stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:dirt_with_grass",
|
||||
type = "shapeless",
|
||||
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",
|
||||
recipe = {"default:junglegrass", "default:cobble"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:mossycobble",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:cobble"},
|
||||
})
|
||||
|
||||
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"},
|
||||
}
|
||||
})
|
||||
|
||||
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"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_full 4",
|
||||
recipe = {
|
||||
{"moreblocks:wood_tile", "moreblocks:wood_tile"},
|
||||
{"moreblocks:wood_tile", "moreblocks:wood_tile"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_up",
|
||||
recipe = {
|
||||
{"default:stick"},
|
||||
{"moreblocks:wood_tile_center"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_down",
|
||||
recipe = {
|
||||
{"moreblocks:wood_tile_center"},
|
||||
{"default:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_left",
|
||||
recipe = {
|
||||
{"default:stick", "moreblocks:wood_tile_center"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:wood_tile_right",
|
||||
recipe = {
|
||||
{"moreblocks:wood_tile_center", "default:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:junglestick 4",
|
||||
recipe = {{"default:junglewood"},}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:fence_jungle_wood 2",
|
||||
recipe = {
|
||||
{"moreblocks:jungle_stick", "moreblocks:jungle_stick", "moreblocks:jungle_stick"},
|
||||
{"moreblocks:jungle_stick", "moreblocks:jungle_stick", "moreblocks:jungle_stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:circle_stone_bricks 8",
|
||||
recipe = {
|
||||
{"default:stone", "default:stone", "default:stone"},
|
||||
{"default:stone", "", "default:stone"},
|
||||
{"default:stone", "default:stone", "default:stone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:all_faces_tree 8",
|
||||
recipe = {
|
||||
{"default:tree", "default:tree", "default:tree"},
|
||||
{"default:tree", "", "default:tree"},
|
||||
{"default:tree", "default:tree", "default:tree"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:all_faces_jungle_tree 8",
|
||||
recipe = {
|
||||
{"default:jungletree", "default:jungletree", "default:jungletree"},
|
||||
{"default:jungletree", "", "default:jungletree"},
|
||||
{"default:jungletree", "default:jungletree", "default:jungletree"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:sweeper 4",
|
||||
recipe = {
|
||||
{"default:junglegrass"},
|
||||
{"default:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:stone_tile 4",
|
||||
recipe = {
|
||||
{"default:cobble", "default:cobble"},
|
||||
{"default:cobble", "default:cobble"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:split_stone_tile",
|
||||
recipe = {
|
||||
{"moreblocks:stone_tile"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:split_stone_tile_alt",
|
||||
recipe = {
|
||||
{"moreblocks:split_stone_tile"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:grey_bricks 2",
|
||||
type = "shapeless",
|
||||
recipe = {"default:stone", "default:brick"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:grey_bricks 2",
|
||||
type = "shapeless",
|
||||
recipe = {"default:stonebrick", "default:brick"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:empty_bookshelf",
|
||||
type = "shapeless",
|
||||
recipe = {"moreblocks:sweeper", "default:bookshelf"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:coal_stone_bricks 4",
|
||||
recipe = {
|
||||
{"moreblocks:coal_stone", "moreblocks:coal_stone"},
|
||||
{"moreblocks:coal_stone", "moreblocks:coal_stone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:iron_stone_bricks 4",
|
||||
recipe = {
|
||||
{"moreblocks:iron_stone", "moreblocks:iron_stone"},
|
||||
{"moreblocks:iron_stone", "moreblocks:iron_stone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:plankstone 4",
|
||||
recipe = {
|
||||
{"default:stone", "default:wood"},
|
||||
{"default:wood", "default:stone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:plankstone 4",
|
||||
recipe = {
|
||||
{"default:wood", "default:stone"},
|
||||
{"default:stone", "default:wood"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:coal_checker 4",
|
||||
recipe = {
|
||||
{"default:stone", "default:coal_lump"},
|
||||
{"default:coal_lump", "default:stone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:coal_checker 4",
|
||||
recipe = {
|
||||
{"default:coal_lump", "default:stone"},
|
||||
{"default:stone", "default:coal_lump"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:iron_checker 4",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "default:stone"},
|
||||
{"default:stone", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:iron_checker 4",
|
||||
recipe = {
|
||||
{"default:stone", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:stone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:chest_locked",
|
||||
type = "shapeless",
|
||||
recipe = {"default:steel_ingot", "default:chest"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "default:chest_locked",
|
||||
type = "shapeless",
|
||||
recipe = {"default:copper_ingot", "default:chest"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:chest_locked",
|
||||
type = "shapeless",
|
||||
recipe = {"default:bronze_ingot", "default:chest"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:chest_locked",
|
||||
type = "shapeless",
|
||||
recipe = {"default:gold_ingot", "default:chest"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:iron_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:steel_ingot", "default:glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:coal_lump", "moreblocks:iron_glass"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:coal_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:coal_lump", "default:glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:steel_ingot", "moreblocks:coal_glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:clean_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"moreblocks:sweeper", "default:glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:glow_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:torch", "default:glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_glow_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:glass", "default:torch"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_glow_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "moreblocks:glow_glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:super_glow_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:torch", "default:torch", "default:glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:super_glow_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:torch", "moreblocks:glow_glass"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_super_glow_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:glass", "default:torch", "default:torch"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_super_glow_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "moreblocks:super_glow_glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:coal_stone",
|
||||
type = "shapeless",
|
||||
recipe = {"default:coal_lump", "default:stone"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:stone",
|
||||
type = "shapeless",
|
||||
recipe = {"default:steel_ingot", "moreblocks:coal_stone"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:iron_stone",
|
||||
type = "shapeless",
|
||||
recipe = {"default:steel_ingot", "default:stone"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:stone",
|
||||
type = "shapeless",
|
||||
recipe = {"default:coal_lump", "moreblocks:iron_stone"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_stone",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:stone"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:trap_glass",
|
||||
type = "shapeless",
|
||||
recipe = {"default:mese_crystal_fragment", "default:glass"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:cactus_brick",
|
||||
type = "shapeless",
|
||||
recipe = {"default:cactus", "default:brick"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:cactus_checker 4",
|
||||
recipe = {
|
||||
{"default:cactus", "default:stone"},
|
||||
{"default:stone", "default:cactus"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:cactuschecker 4",
|
||||
recipe = {
|
||||
{"default:stone", "default:cactus"},
|
||||
{"default:cactus", "default:stone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:rope 3",
|
||||
recipe = {
|
||||
{"default:junglegrass"},
|
||||
{"default:junglegrass"},
|
||||
{"default:junglegrass"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:cobble_compressed",
|
||||
recipe = {
|
||||
{"default:cobble", "default:cobble", "default:cobble"},
|
||||
{"default:cobble", "default:cobble", "default:cobble"},
|
||||
{"default:cobble", "default:cobble", "default:cobble"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:cobble 9",
|
||||
recipe = {
|
||||
{"moreblocks:cobble_compressed"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking", output = "moreblocks:tar", recipe = "default:gravel",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "moreblocks:copperpatina",
|
||||
recipe = {"bucket:bucket_water", "default:copperblock"},
|
||||
replacements = {
|
||||
{"bucket:bucket_water", "bucket:bucket_empty"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:copper_ingot 9",
|
||||
recipe = {
|
||||
{"moreblocks:copperpatina"},
|
||||
}
|
||||
})
|
||||
|
||||
if minetest.setting_getbool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:circular_saw",
|
||||
recipe = {
|
||||
{ "", "default:steel_ingot", "" },
|
||||
{ "group:wood", "group:wood", "group:wood"},
|
||||
{ "group:wood", "", "group:wood"},
|
||||
}
|
||||
})
|
||||
end
|
2
mods/Blocks/moreblocks/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
default
|
||||
intllib?
|
1
mods/Blocks/moreblocks/description.txt
Normal file
@ -0,0 +1 @@
|
||||
Adds various miscellaneous blocks to the game.
|
33
mods/Blocks/moreblocks/init.lua
Normal file
@ -0,0 +1,33 @@
|
||||
--[[
|
||||
=====================================================================
|
||||
** More Blocks **
|
||||
By Calinou, with the help of ShadowNinja and VanessaE.
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
=====================================================================
|
||||
--]]
|
||||
|
||||
moreblocks = {}
|
||||
|
||||
local S
|
||||
if minetest.get_modpath("intllib") then
|
||||
S = intllib.Getter()
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
moreblocks.intllib = S
|
||||
|
||||
local modpath = minetest.get_modpath("moreblocks")
|
||||
|
||||
dofile(modpath .. "/config.lua")
|
||||
dofile(modpath .. "/circular_saw.lua")
|
||||
dofile(modpath .. "/stairsplus/init.lua")
|
||||
dofile(modpath .. "/nodes.lua")
|
||||
dofile(modpath .. "/redefinitions.lua")
|
||||
dofile(modpath .. "/crafting.lua")
|
||||
dofile(modpath .. "/aliases.lua")
|
||||
|
||||
if minetest.setting_getbool("log_mods") then
|
||||
minetest.log("action", S("[moreblocks] loaded."))
|
||||
end
|
67
mods/Blocks/moreblocks/locale/de.txt
Normal file
@ -0,0 +1,67 @@
|
||||
# Translation by Xanthin
|
||||
|
||||
###init.lua###
|
||||
[moreblocks] loaded. = [moreblocks] geladen.
|
||||
|
||||
###nodes.lua###
|
||||
Jungle Wood Fence = Tropenholzzaun
|
||||
Empty Bookshelf = Leeres Buecherregal
|
||||
Clean Glass = Klares Glas
|
||||
Plankstone = Brettstein
|
||||
Wooden Tile = Holzfliese
|
||||
Full Wooden Tile = Vollholzfliese
|
||||
Centered Wooden Tile = Holzfliese mittig
|
||||
Up Wooden Tile = Holzfliese oben
|
||||
Down Wooden Tile = Holzfliese unten
|
||||
Left Wooden Tile = Holzfliese links
|
||||
Right Wooden Tile = Holzfliese rechts
|
||||
Circle Stone Bricks = Kreissteinziegel
|
||||
Stone Tile = Steinfliese
|
||||
Split Stone Tile = Geteilte Steinfliese
|
||||
Glow Glass = Leuchtglas
|
||||
Super Glow Glass = Superleuchtglas
|
||||
Coal Glass = Kohleglas
|
||||
Iron Glass = Eisenglas
|
||||
Coal Checker = Karierte Kohle
|
||||
Iron Checker = Kariertes Eisen
|
||||
Trap Stone = Steinfalle
|
||||
Trap Glass = Glasfalle
|
||||
Trap Glow Glass = Leuchtglasfalle
|
||||
Trap Super Glow Glass = Superleuchtglasfalle
|
||||
Coal Stone = Kohlestein
|
||||
Iron Stone = Eisenstein
|
||||
Coal Stone Bricks = Kohlesteinziegel
|
||||
Iron Stone Bricks = Eisensteinziegel
|
||||
Cactus Checker = Karierter Kaktus
|
||||
Cactus Brick = Kaktusziegel
|
||||
Sweeper = Besen
|
||||
Jungle Stick = Tropenholzstock
|
||||
Rope = Seil
|
||||
All-faces Tree = Baumscheibenstamm
|
||||
|
||||
###circular_saw.lua###
|
||||
Circular Saw = Kreissaege
|
||||
Circular saw, empty (owned by %s) = Kreissaege, leer (gehoert %s)
|
||||
Circular saw, working with %s (owned by %s) = Kreissaege, arbeitet mit %s (gehoert %s)
|
||||
Circular saw, empty = Kreissaege, leer
|
||||
Circular saw is empty (owned by %s) = Kreissaege ist leer (gehoert %s)
|
||||
|
||||
Input\nmaterial = Ausgangs-\nmaterial
|
||||
Left-over = Rest
|
||||
Max = Anzahl
|
||||
Set = Ok
|
||||
Recycle\noutput = Wiederver-\nwerten
|
||||
|
||||
###./stairsplus/*###
|
||||
%s Stairs = %streppe
|
||||
%s Slab = %sstufe
|
||||
%s Panel = %spaneel
|
||||
%s Microblock = %smikroblock
|
||||
|
||||
%s Pane = %sscheibe
|
||||
%s Fence = %szaun
|
||||
|
||||
###ownership.lua###
|
||||
someone = jemand
|
||||
Sorry, %s owns that spot. = Tut mir leid, %s gehoert diese Stelle.
|
||||
|
52
mods/Blocks/moreblocks/locale/es.txt
Normal file
@ -0,0 +1,52 @@
|
||||
# Translation by kaeza
|
||||
|
||||
[moreblocks] loaded. = [moreblocks] cargado.
|
||||
|
||||
Jungle Wooden Planks = Tablones de madera de jungla
|
||||
Empty Bookshelf = Estante para libros vacío
|
||||
Clean Glass = Cristal Limpio
|
||||
Plankstone = Tablones de piedra
|
||||
Wooden Tile = Parquet
|
||||
Full Wooden Tile = Parquet Completo
|
||||
Centered Wooden Tile = Parquet Centrado
|
||||
Up Wooden Tile = Parquet Superior
|
||||
Down Wooden Tile = Parquet Inferior
|
||||
Left Wooden Tile = Parquet Izquierdo
|
||||
Right Wooden Tile = Parquet Derecho
|
||||
Circle Stone Bricks = Bloques de Piedra Circulares
|
||||
Stone Tile = Baldosa de Piedra
|
||||
Split Stone Tile = Baldosas de Piedra Partida
|
||||
Glow Glass = Cristal Brillante
|
||||
Super Glow Glass = Cristal Súper Brillante
|
||||
Coal Glass = Cristal con Carbón
|
||||
Iron Glass = Cristal con Hierro
|
||||
Coal Checker = Cuadros de Carbón
|
||||
Iron Checker = Cuadros de Hierro
|
||||
Trap Stone = Piedra Trampa
|
||||
Trap Glass = Cristal Trampa
|
||||
Coal Stone = Carbón y Piedra
|
||||
Iron Stone = Hierro y Piedra
|
||||
Cactus Checker = Cuadros de Cactus
|
||||
Cactus Brick = Ladrillos de Cactus
|
||||
Sweeper = Limpiador
|
||||
Jungle Stick = Varita de Madera de Jungla
|
||||
Horizontal Tree = Tronco de árbol horizontal
|
||||
Horizontal Jungle Tree = Tronco de árbol de la jungla horizontal
|
||||
Rope = Soga
|
||||
All-faces Tree = Tronco de Árbol
|
||||
|
||||
%s Stairs = Escalera de %s
|
||||
%s Slab = Losa de %s
|
||||
%s Panel = Panel de %s
|
||||
%s Microblock = Microbloque de %s
|
||||
|
||||
Wooden = Madera
|
||||
Papyrus = Papiro
|
||||
Dry Shrub = Arbusto Desértico
|
||||
Sapling = Brote de Árbol
|
||||
Wooden Planks = Tablones de Madera
|
||||
Ladder = Escalera de Mano
|
||||
Glass = Cristal
|
||||
|
||||
%s Pane = Panel de %s
|
||||
%s Fence = Valla de %s
|
72
mods/Blocks/moreblocks/locale/fr.txt
Normal file
@ -0,0 +1,72 @@
|
||||
# Translation by Calinou
|
||||
|
||||
###init.lua###
|
||||
[moreblocks] loaded. = [moreblocks] a été chargé.
|
||||
|
||||
Jungle Wooden Planks = Planches de bois de jungle
|
||||
Empty Bookshelf = Ètagère vide
|
||||
Clean Glass = Verre propre
|
||||
Plankstone = Pierre-bois
|
||||
Wooden Tile = Dalle en bois
|
||||
Full Wooden Tile = Dalle en bois complète
|
||||
Centered Wooden Tile = Dalle en bois centrée
|
||||
Up Wooden Tile = Dalle en bois vers le haut
|
||||
Down Wooden Tile = Dalle en bois vers le bas
|
||||
Left Wooden Tile = Dalle en bois vers la gauche
|
||||
Right Wooden Tile = Dalle en bois vers la droite
|
||||
Circle Stone Bricks = Briques en pierre circulaires
|
||||
Stone Tile = Dalle en pierre
|
||||
Split Stone Tile = Dalle en pierre découpée
|
||||
Glow Glass = Verre brillant
|
||||
Super Glow Glass = Verre très brillant
|
||||
Coal Glass = Verre de charbon
|
||||
Iron Glass = Verre de fer
|
||||
Coal Checker = Damier en charbon
|
||||
Iron Checker = Damier en fer
|
||||
Trap Stone = Pierre traversable
|
||||
Trap Glass = Verre traversable
|
||||
Trap Glow Glass = Verre brillant traversable
|
||||
Trap Super Glow Glass = Verre très brillant traversable
|
||||
Coal Stone = Pierre de charbon
|
||||
Iron Stone = Pierre de fer
|
||||
Coal Stone Bricks = Briques en pierre de charbon
|
||||
Iron Stone Bricks = Briques en pierre de fer
|
||||
Cactus Checker = Damier en cactus
|
||||
Cactus Brick = Briques de cactus
|
||||
Sweeper = Balai
|
||||
Jungle Stick = Bâton en bois de jungle
|
||||
Horizontal Tree = Tronc d'arbre horizontal
|
||||
Horizontal Jungle Tree = Tronc d'arbre de jungle horizontal
|
||||
Rope = Corde
|
||||
All-faces Tree = Tronc d'arbre
|
||||
|
||||
###redefinition.lua###
|
||||
Wooden = bois
|
||||
Papyrus = Papyrus
|
||||
Dry Shrub = Buisson mort
|
||||
Sapling = Pousse d'arbre
|
||||
Wooden Planks = Planches de bois
|
||||
Ladder = Échelle
|
||||
Glass = Verre
|
||||
|
||||
###circular_saw.lua###
|
||||
Circular Saw = Scie circulaire
|
||||
Circular saw, empty (owned by %s) = Scie circulaire, vide (propriété de %s)
|
||||
Circular saw, working with %s (owned by %s) = Scie circulaire, manipule %s (propriété de %s)
|
||||
Circular saw, empty = Scie circulaire, vide
|
||||
Circular saw is empty (owned by %s) = Scie circulaire est vide (propriété de %s)
|
||||
|
||||
Input material = Entrée du matériel
|
||||
Rest/microblocks = Reste/microbloc
|
||||
Max: = Max:
|
||||
Set = Fixer
|
||||
Recycle output = Recyclage
|
||||
|
||||
###./stairsplus/*###
|
||||
%s Stairs = Escaliers en %s
|
||||
%s Slab = Demi-dalle en %s
|
||||
%s Panel = Barre en %s
|
||||
%s Microblock = Microbloc en %s
|
||||
|
||||
%s Pane = Panneau en %s
|
||||
%s Fence = Barrière en %s
|
70
mods/Blocks/moreblocks/locale/it.txt
Normal file
@ -0,0 +1,70 @@
|
||||
#
|
||||
# Italian translation
|
||||
# Translator: Emon
|
||||
#
|
||||
|
||||
|
||||
###init.lua###
|
||||
[moreblocks] loaded. = [moreblocks] caricato.
|
||||
|
||||
###nodes.lua###
|
||||
Jungle Wood Fence = Recinzione in legno della giungla
|
||||
Empty Bookshelf = Libreria vuota
|
||||
Clean Glass = Vetro pulito
|
||||
Plankstone = Pietra e legno
|
||||
Wooden Tile = Mattonella in legno
|
||||
Full Wooden Tile = Mattonella in legno pieno
|
||||
Centered Wooden Tile = Mattonella in legno centrata
|
||||
Up Wooden Tile = Mattonella in legno verso l'alto
|
||||
Down Wooden Tile = Mattonella in legno verso il basso
|
||||
Left Wooden Tile = Mattonella in legno verso sinistra
|
||||
Right Wooden Tile = Mattonella in legno verso destra
|
||||
Circle Stone Bricks = Mattoni concentrici in pietra
|
||||
Stone Tile = Mattonella in pietra
|
||||
Split Stone Tile = Mattonella in pietra divisa
|
||||
Glow Glass = Vetro luminoso
|
||||
Super Glow Glass = Super vetro luminoso
|
||||
Coal Glass = Vetro e carbone
|
||||
Iron Glass = Vetro e ferro
|
||||
Coal Checker = Scacchiera in carbone
|
||||
Iron Checker = Scacchiera in ferro
|
||||
Trap Stone = Pietra trappola
|
||||
Trap Glass = Vetro trappola
|
||||
Trap Glow Glass = Vetro luminoso trappola
|
||||
Trap Super Glow Glass = Super vetro luminoso trappola
|
||||
Coal Stone = Pietra in carbone
|
||||
Iron Stone = Pietra in ferro
|
||||
Coal Stone Bricks = Mattoni di pietra in carbone
|
||||
Iron Stone Bricks = Mattoni di pietra in ferro
|
||||
Cactus Checker = Scacchiera in cactus
|
||||
Cactus Brick = Mattoni di cactus
|
||||
Sweeper = Spazzola
|
||||
Jungle Stick = Bastone in legno della giungla
|
||||
Rope = Corda
|
||||
All-faces Tree = Albero su ogni lato
|
||||
|
||||
###circular_saw.lua###
|
||||
Circular Saw = Sega circolare
|
||||
Circular saw, empty (owned by %s) = Sega circolare, vuota (di proprietà di %s)
|
||||
Circular saw, working with %s (owned by %s) = Sega circolare, in funzione su %s (di proprietà di %s)
|
||||
Circular saw, empty = Sega circolare, vuota
|
||||
Circular saw is empty (owned by %s) = La sega circolare è vuota (di proprietà di %s)
|
||||
|
||||
Input\nmaterial = Materiale\niniziale
|
||||
Left-over = Scarto
|
||||
Max = Max.
|
||||
Set = Imp.
|
||||
Recycle\noutput = Ricicla\nfinale
|
||||
|
||||
###ownership.lua###
|
||||
someone = qualcuno
|
||||
Sorry, %s owns that spot. = Spiacente, quel punto è di proprietà di %s
|
||||
|
||||
###./stairsplus/*###
|
||||
%s Stairs = Scale - %s
|
||||
%s Slab = Lastra - %s
|
||||
%s Panel = Pannello - %s
|
||||
%s Microblock = Microblocco %s
|
||||
|
||||
%s Pane = Pannello - %s
|
||||
%s Fence = Recinzione - %s
|
64
mods/Blocks/moreblocks/locale/template.txt
Normal file
@ -0,0 +1,64 @@
|
||||
###init.lua###
|
||||
[moreblocks] loaded. =
|
||||
|
||||
###nodes.lua###
|
||||
Jungle Wood Fence =
|
||||
Empty Bookshelf =
|
||||
Clean Glass =
|
||||
Plankstone =
|
||||
Wooden Tile =
|
||||
Full Wooden Tile =
|
||||
Centered Wooden Tile =
|
||||
Up Wooden Tile =
|
||||
Down Wooden Tile =
|
||||
Left Wooden Tile =
|
||||
Right Wooden Tile =
|
||||
Circle Stone Bricks =
|
||||
Stone Tile =
|
||||
Split Stone Tile =
|
||||
Glow Glass =
|
||||
Super Glow Glass =
|
||||
Coal Glass =
|
||||
Iron Glass =
|
||||
Coal Checker =
|
||||
Iron Checker =
|
||||
Trap Stone =
|
||||
Trap Glass =
|
||||
Trap Glow Glass =
|
||||
Trap Super Glow Glass =
|
||||
Coal Stone =
|
||||
Iron Stone =
|
||||
Coal Stone Bricks =
|
||||
Iron Stone Bricks =
|
||||
Cactus Checker =
|
||||
Cactus Brick =
|
||||
Sweeper =
|
||||
Jungle Stick =
|
||||
Rope =
|
||||
All-faces Tree =
|
||||
|
||||
###circular_saw.lua###
|
||||
Circular Saw =
|
||||
Circular saw, empty (owned by %s) =
|
||||
Circular saw, working with %s (owned by %s) =
|
||||
Circular saw, empty =
|
||||
Circular saw is empty (owned by %s) =
|
||||
|
||||
Input\nmaterial =
|
||||
Left-over =
|
||||
Max =
|
||||
Set =
|
||||
Recycle\noutput =
|
||||
|
||||
###ownership.lua###
|
||||
someone =
|
||||
Sorry, %s owns that spot. =
|
||||
|
||||
###./stairsplus/*###
|
||||
%s Stairs =
|
||||
%s Slab =
|
||||
%s Panel =
|
||||
%s Microblock =
|
||||
|
||||
%s Pane =
|
||||
%s Fence =
|
1
mods/Blocks/moreblocks/mod.conf
Normal file
@ -0,0 +1 @@
|
||||
name = moreblocks
|
26
mods/Blocks/moreblocks/models/moreblocks_slope.obj
Normal file
@ -0,0 +1,26 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope.mtl
|
||||
o Cube_Cube.002
|
||||
v 0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.707100 -0.707100
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 4/3/2 3/4/2 5/1/2 6/2/2
|
||||
f 2/1/3 5/3/3 3/4/3
|
||||
f 1/2/4 4/3/4 6/4/4
|
||||
f 2/1/5 1/2/5 6/3/5 5/4/5
|
33
mods/Blocks/moreblocks/models/moreblocks_slope_cut.obj
Normal file
@ -0,0 +1,33 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_cut.mtl
|
||||
o moreblocks_slope_cut
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.000000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.000000 -0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 0.500000 2.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn -0.408200 0.816500 -0.408200
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 2/1/2 5/2/2 6/5/2 3/6/2
|
||||
f 2/3/3 1/6/3 7/1/3 5/2/3
|
||||
f 7/7/4 4/3/4 3/8/4 6/6/4
|
||||
f 5/1/5 7/2/5 6/4/5
|
||||
f 7/1/6 1/2/6 4/5/6
|
28
mods/Blocks/moreblocks/models/moreblocks_slope_half.obj
Normal file
@ -0,0 +1,28 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_half.mtl
|
||||
o Cube_Cube.002
|
||||
v 0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.000000 0.500000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.894400 -0.447200
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 4/3/2 3/4/2 5/5/2 6/6/2
|
||||
f 2/1/3 5/3/3 3/4/3
|
||||
f 1/2/4 4/3/4 6/4/4
|
||||
f 2/5/5 1/6/5 6/3/5 5/4/5
|
@ -0,0 +1,32 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_half_raised.mtl
|
||||
o Cube.001
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 0.000000 -0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 0.000000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 0.500000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.000000 1.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn 0.000000 0.894400 -0.447200
|
||||
usemtl None.001
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 2/5/2 5/2/2 6/3/2 3/4/2
|
||||
f 5/5/3 7/6/3 8/3/3 6/4/3
|
||||
f 7/1/4 1/6/4 4/3/4 8/4/4
|
||||
f 4/4/5 3/1/5 6/6/5 8/3/5
|
||||
f 2/4/6 1/1/6 7/6/6 5/3/6
|
35
mods/Blocks/moreblocks/models/moreblocks_slope_inner.obj
Normal file
@ -0,0 +1,35 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_inner.mtl
|
||||
o Cube_Cube.000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.707100 -0.707100
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn -0.707100 0.707100 0.000000
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 5/1/2 6/3/2 7/4/2
|
||||
f 5/1/3 2/2/3 6/4/3
|
||||
f 1/2/4 4/3/4 8/4/4
|
||||
f 8/1/5 4/2/5 3/3/5 7/4/5
|
||||
f 7/3/6 3/4/6 2/1/6 5/2/6
|
||||
f 2/1/7 1/2/7 8/3/7
|
||||
l 7 9
|
||||
l 2 9
|
32
mods/Blocks/moreblocks/models/moreblocks_slope_inner_cut.obj
Normal file
@ -0,0 +1,32 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_inner_cut.mtl
|
||||
o moreblocks_slope_inner_cut
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn -0.577400 0.577400 -0.577400
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 5/1/2 1/2/2 4/3/2 6/4/2
|
||||
f 2/1/3 1/2/3 5/3/3 7/4/3
|
||||
f 6/1/4 4/2/4 3/3/4
|
||||
f 7/1/5 5/2/5 6/3/5
|
||||
f 2/1/6 7/2/6 3/4/6
|
||||
f 7/5/7 6/3/7 3/4/7
|
@ -0,0 +1,34 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_inner_cut_half.mtl
|
||||
o moreblocks_slope_inner_cut_half
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.000000 -0.500000
|
||||
v 0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.000000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn -0.408200 0.816500 -0.408200
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 5/1/2 1/2/2 4/3/2 6/4/2
|
||||
f 2/1/3 1/2/3 5/5/3 7/6/3
|
||||
f 6/1/4 4/2/4 3/5/4
|
||||
f 7/1/5 5/2/5 6/3/5
|
||||
f 2/1/6 7/2/6 3/4/6
|
||||
f 7/7/7 6/5/7 3/6/7
|
@ -0,0 +1,35 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_inner_cut_half_raised.mtl
|
||||
o moreblocks_slope_inner_cut_half_raised
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v -0.500000 0.000000 -0.500000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.500000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn -0.000000 0.000000 -1.000000
|
||||
vn -0.408200 0.816500 -0.408200
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 5/1/2 1/2/2 4/3/2 6/4/2
|
||||
f 2/1/3 1/2/3 5/3/3 7/4/3
|
||||
f 6/1/4 4/2/4 3/3/4
|
||||
f 7/1/5 5/2/5 6/3/5 8/5/5
|
||||
f 2/1/6 7/2/6 8/6/6 3/4/6
|
||||
f 8/7/7 6/3/7 3/4/7
|
@ -0,0 +1,35 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_inner_half.mtl
|
||||
o Cube_Cube.001
|
||||
v 0.500000 0.000000 -0.500000
|
||||
v 0.500000 -0.000000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v -0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.894400 -0.447200
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn -0.447200 0.894400 0.000000
|
||||
usemtl None.002
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 5/1/2 6/3/2 7/4/2
|
||||
f 5/1/3 2/2/3 6/4/3
|
||||
f 1/2/4 4/3/4 8/4/4
|
||||
f 8/1/5 4/2/5 3/3/5 7/4/5
|
||||
f 7/3/6 3/4/6 2/1/6 5/2/6
|
||||
f 2/1/7 1/2/7 8/3/7
|
||||
l 7 9
|
||||
l 2 9
|
@ -0,0 +1,38 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_inner_half_raised.mtl
|
||||
o Cube_Cube.003
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 0.000000 -0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 0.000000 -0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.000000 0.500000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.894400 -0.447200
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn -0.447200 0.894400 0.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
usemtl None.003
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 5/1/2 2/2/2 6/4/2
|
||||
f 7/3/3 3/4/3 2/1/3 5/2/3
|
||||
f 2/2/4 1/3/4 8/4/4
|
||||
f 7/1/5 9/2/5 4/3/5 3/4/5
|
||||
f 6/5/6 1/2/6 4/3/6 9/4/6
|
||||
f 7/4/7 5/1/7 6/6/7 9/3/7
|
||||
l 2 10
|
||||
l 7 10
|
25
mods/Blocks/moreblocks/models/moreblocks_slope_outer.obj
Normal file
@ -0,0 +1,25 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_outer.mtl
|
||||
o Cube_Cube.004
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn -0.707100 0.707100 0.000000
|
||||
vn 0.000000 0.707100 -0.707100
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 5/2/2 1/3/2 4/4/2
|
||||
f 2/3/3 1/4/3 5/1/3
|
||||
f 5/1/4 3/3/4 2/4/4
|
||||
f 5/2/5 4/3/5 3/4/5
|
23
mods/Blocks/moreblocks/models/moreblocks_slope_outer_cut.obj
Normal file
@ -0,0 +1,23 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_outer_cut.mtl
|
||||
o Cube.002
|
||||
v 0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.500000 1.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn -0.577400 0.577400 -0.577400
|
||||
usemtl None.004
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1
|
||||
f 4/3/2 1/4/2 3/2/2
|
||||
f 3/2/3 2/3/3 4/4/3
|
||||
f 2/3/4 1/5/4 4/2/4
|
@ -0,0 +1,24 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_outer_cut_half.mtl
|
||||
o Cube.003
|
||||
v 0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 0.500000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.500000 1.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn -0.408200 0.816500 -0.408200
|
||||
usemtl None.005
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1
|
||||
f 4/3/2 1/4/2 3/2/2
|
||||
f 3/2/3 2/3/3 4/5/3
|
||||
f 2/3/4 1/6/4 4/2/4
|
@ -0,0 +1,28 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_outer_cut_half_raised.mtl
|
||||
o Cube_Cube.005
|
||||
v -0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.000000 -0.500000
|
||||
vt 0.000000 0.500000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 1.000000 0.500000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn -0.408200 0.816500 -0.408200
|
||||
vn -0.707100 0.000000 -0.707100
|
||||
usemtl None.006
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 4/5/2 3/2/2 5/3/2 6/6/2
|
||||
f 2/5/3 5/3/3 3/4/3
|
||||
f 1/2/4 4/3/4 6/4/4
|
||||
f 2/3/5 1/6/5 6/1/5 5/2/5
|
@ -0,0 +1,27 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_outer_half.mtl
|
||||
o Cube.004
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.000000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.000000 0.500000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.894400 -0.447200
|
||||
vn -0.447200 0.894400 0.000000
|
||||
usemtl None.007
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 5/5/2 1/3/2 4/4/2
|
||||
f 3/4/3 5/6/3 4/3/3
|
||||
f 2/4/4 5/2/4 3/3/4
|
||||
f 1/4/5 5/1/5 2/3/5
|
@ -0,0 +1,34 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib moreblocks_slope_outer_half_raised.mtl
|
||||
o Cube_Cube.006
|
||||
v -0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.000000 -0.500000
|
||||
v -0.500000 0.000000 -0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
vt 0.000000 0.500000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 1.000000 0.500000
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.894400 -0.447200
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn -0.447200 0.894400 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 0.000000 -1.000000 -0.000000
|
||||
usemtl None.008
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 4/5/2 3/2/2 5/3/2 6/6/2
|
||||
f 7/3/3 4/5/3 6/2/3
|
||||
f 1/6/4 7/1/4 8/2/4 2/3/4
|
||||
f 7/3/5 1/4/5 4/5/5
|
||||
f 6/1/6 5/2/6 8/3/6 7/6/6
|
||||
f 5/5/7 3/2/7 2/3/7 8/4/7
|
356
mods/Blocks/moreblocks/nodes.lua
Normal file
@ -0,0 +1,356 @@
|
||||
--[[
|
||||
More Blocks: node definitions
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local S = moreblocks.intllib
|
||||
|
||||
local sound_wood = default.node_sound_wood_defaults()
|
||||
local sound_stone = default.node_sound_stone_defaults()
|
||||
local sound_glass = default.node_sound_glass_defaults()
|
||||
local sound_leaves = default.node_sound_leaves_defaults()
|
||||
|
||||
local function tile_tiles(name)
|
||||
local tex = "moreblocks_" ..name.. ".png"
|
||||
return {tex, tex, tex, tex, tex.. "^[transformR90", tex.. "^[transformR90"}
|
||||
end
|
||||
|
||||
local nodes = {
|
||||
["wood_tile"] = {
|
||||
description = S("Wooden Tile"),
|
||||
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
tiles = {"default_wood.png^moreblocks_wood_tile.png",
|
||||
"default_wood.png^moreblocks_wood_tile.png",
|
||||
"default_wood.png^moreblocks_wood_tile.png",
|
||||
"default_wood.png^moreblocks_wood_tile.png",
|
||||
"default_wood.png^moreblocks_wood_tile.png^[transformR90",
|
||||
"default_wood.png^moreblocks_wood_tile.png^[transformR90"},
|
||||
sounds = sound_wood,
|
||||
},
|
||||
["wood_tile_flipped"] = {
|
||||
description = S("Wooden Tile"),
|
||||
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
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,
|
||||
},
|
||||
["wood_tile_center"] = {
|
||||
description = S("Centered Wooden Tile"),
|
||||
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
tiles = {"default_wood.png^moreblocks_wood_tile_center.png"},
|
||||
sounds = sound_wood,
|
||||
},
|
||||
["wood_tile_full"] = {
|
||||
description = S("Full Wooden Tile"),
|
||||
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
tiles = tile_tiles("wood_tile_full"),
|
||||
sounds = sound_wood,
|
||||
},
|
||||
["wood_tile_up"] = {
|
||||
description = S("Upwards Wooden Tile"),
|
||||
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
tiles = {"default_wood.png^moreblocks_wood_tile_up.png"},
|
||||
sounds = sound_wood,
|
||||
no_stairs = true,
|
||||
},
|
||||
["wood_tile_down"] = {
|
||||
description = S("Downwards Wooden Tile"),
|
||||
groups = {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,
|
||||
no_stairs = true,
|
||||
},
|
||||
["wood_tile_left"] = {
|
||||
description = S("Leftwards Wooden Tile"),
|
||||
groups = {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,
|
||||
no_stairs = true,
|
||||
},
|
||||
["wood_tile_right"] = {
|
||||
description = S("Rightwards Wooden Tile"),
|
||||
groups = {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,
|
||||
no_stairs = true,
|
||||
},
|
||||
["circle_stone_bricks"] = {
|
||||
description = S("Circle Stone Bricks"),
|
||||
groups = {cracky = 3},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["grey_bricks"] = {
|
||||
description = S("Stone Bricks"),
|
||||
groups = {cracky = 3},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["coal_stone_bricks"] = {
|
||||
description = S("Coal Stone Bricks"),
|
||||
groups = {cracky = 3},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["iron_stone_bricks"] = {
|
||||
description = S("Iron Stone Bricks"),
|
||||
groups = {cracky = 3},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["stone_tile"] = {
|
||||
description = S("Stone Tile"),
|
||||
groups = {cracky = 3},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["split_stone_tile"] = {
|
||||
description = S("Split Stone Tile"),
|
||||
tiles = {"moreblocks_split_stone_tile_top.png",
|
||||
"moreblocks_split_stone_tile.png"},
|
||||
groups = {cracky = 3},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["split_stone_tile_alt"] = {
|
||||
description = S("Checkered Stone Tile"),
|
||||
groups = {cracky = 3},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["tar"] = {
|
||||
description = S("Tar"),
|
||||
groups = {cracky = 2, tar_block = 1},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["cobble_compressed"] = {
|
||||
description = S("Compressed Cobblestone"),
|
||||
groups = {cracky = 1},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["plankstone"] = {
|
||||
description = S("Plankstone"),
|
||||
groups = {cracky = 3},
|
||||
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"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {snappy = 2, 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"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {snappy = 2, 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"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
},
|
||||
["cactus_brick"] = {
|
||||
description = S("Cactus Brick"),
|
||||
groups = {cracky = 3},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["cactus_checker"] = {
|
||||
description = S("Cactus Checker"),
|
||||
groups = {cracky = 3},
|
||||
tiles = {"default_stone.png^moreblocks_cactus_checker.png",
|
||||
"default_stone.png^moreblocks_cactus_checker.png",
|
||||
"default_stone.png^moreblocks_cactus_checker.png",
|
||||
"default_stone.png^moreblocks_cactus_checker.png",
|
||||
"default_stone.png^moreblocks_cactus_checker.png^[transformR90",
|
||||
"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},
|
||||
sounds = sound_wood,
|
||||
no_stairs = true,
|
||||
},
|
||||
["coal_stone"] = {
|
||||
description = S("Coal Stone"),
|
||||
groups = {cracky = 3},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["iron_stone"] = {
|
||||
description = S("Iron Stone"),
|
||||
groups = {cracky = 3},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["coal_checker"] = {
|
||||
description = S("Coal Checker"),
|
||||
tiles = {"default_stone.png^moreblocks_coal_checker.png",
|
||||
"default_stone.png^moreblocks_coal_checker.png",
|
||||
"default_stone.png^moreblocks_coal_checker.png",
|
||||
"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},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["iron_checker"] = {
|
||||
description = S("Iron Checker"),
|
||||
tiles = {"default_stone.png^moreblocks_iron_checker.png",
|
||||
"default_stone.png^moreblocks_iron_checker.png",
|
||||
"default_stone.png^moreblocks_iron_checker.png",
|
||||
"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},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
["trap_stone"] = {
|
||||
description = S("Trap Stone"),
|
||||
walkable = false,
|
||||
groups = {cracky = 3},
|
||||
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"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
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},
|
||||
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},
|
||||
sounds = sound_wood,
|
||||
furnace_burntime = 30,
|
||||
},
|
||||
["glow_glass"] = {
|
||||
description = S("Glow Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
--tiles = {"moreblocks_glow_glass.png", "moreblocks_glow_glass_detail.png"},
|
||||
tiles = {"moreblocks_glow_glass.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 11,
|
||||
groups = {snappy = 2, 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"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 11,
|
||||
walkable = false,
|
||||
groups = {snappy = 2, 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"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 14,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
},
|
||||
["trap_super_glow_glass"] = {
|
||||
description = S("Trap Super Glow Glass"),
|
||||
drawtype = "glasslike_framed_optional",
|
||||
--tiles = {"moreblocks_trap_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"},
|
||||
tiles = {"moreblocks_trap_super_glow_glass.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 14,
|
||||
walkable = false,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
no_stairs = true,
|
||||
},
|
||||
["rope"] = {
|
||||
description = S("Rope"),
|
||||
drawtype = "signlike",
|
||||
inventory_image = "moreblocks_rope.png",
|
||||
wield_image = "moreblocks_rope.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "wallmounted",
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
selection_box = {type = "wallmounted",},
|
||||
groups = {snappy = 3, flammable = 2},
|
||||
sounds = sound_leaves,
|
||||
no_stairs = true,
|
||||
},
|
||||
["copperpatina"] = {
|
||||
description = S("Copper Patina Block"),
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = sound_stone,
|
||||
},
|
||||
}
|
||||
|
||||
for name, def in pairs(nodes) do
|
||||
def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"}
|
||||
minetest.register_node("moreblocks:" ..name, def)
|
||||
minetest.register_alias(name, "moreblocks:" ..name)
|
||||
if not def.no_stairs then
|
||||
local groups = {}
|
||||
for k, v in pairs(def.groups) do groups[k] = v end
|
||||
stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, {
|
||||
description = def.description,
|
||||
groups = groups,
|
||||
tiles = def.tiles,
|
||||
sunlight_propagates = def.sunlight_propagates,
|
||||
light_source = def.light_source,
|
||||
sounds = def.sounds,
|
||||
})
|
||||
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,
|
||||
})
|
||||
|
41
mods/Blocks/moreblocks/ownership.lua
Normal file
@ -0,0 +1,41 @@
|
||||
--[[
|
||||
More Blocks: ownership handling
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local S = moreblocks.gettext
|
||||
|
||||
function moreblocks.node_is_owned(pos, placer)
|
||||
local ownername = false
|
||||
if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod
|
||||
if HasOwner(pos, placer) then -- returns true if the node is owned
|
||||
if not IsPlayerNodeOwner(pos, placer:get_player_name()) then
|
||||
if type(getLastOwner) == "function" then -- ...is an old version
|
||||
ownername = getLastOwner(pos)
|
||||
elseif type(GetNodeOwnerName) == "function" then -- ...is a recent version
|
||||
ownername = GetNodeOwnerName(pos)
|
||||
else
|
||||
ownername = S("someone")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif type(isprotect)=="function" then -- glomie's protection mod
|
||||
if not isprotect(5, pos, placer) then
|
||||
ownername = S("someone")
|
||||
end
|
||||
elseif type(protector)=="table" and type(protector.can_dig)=="function" then -- Zeg9's protection mod
|
||||
if not protector.can_dig(5, pos, placer) then
|
||||
ownername = S("someone")
|
||||
end
|
||||
end
|
||||
|
||||
if ownername ~= false then
|
||||
minetest.chat_send_player( placer:get_player_name(), S("Sorry, %s owns that spot."):format(ownername) )
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
47
mods/Blocks/moreblocks/redefinitions.lua
Normal file
@ -0,0 +1,47 @@
|
||||
--[[
|
||||
More Blocks: redefinitions of default stuff
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
-- Redefinitions of some default crafting recipes:
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:sign_wall 4",
|
||||
recipe = {
|
||||
{"default:wood", "default:wood", "default:wood"},
|
||||
{"default:wood", "default:wood", "default:wood"},
|
||||
{"", "default:stick", ""},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:ladder 4",
|
||||
recipe = {
|
||||
{"default:stick", "", "default:stick"},
|
||||
{"default:stick", "default:stick", "default:stick"},
|
||||
{"default:stick", "", "default:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:paper 4",
|
||||
recipe = {
|
||||
{"default:papyrus", "default:papyrus", "default:papyrus"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:rail 24",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:stick", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "toolrepair",
|
||||
additional_wear = -0.10, -- Tool repair buff (10% bonus instead of 2%).
|
||||
})
|
24
mods/Blocks/moreblocks/stairsplus/API.md
Normal file
@ -0,0 +1,24 @@
|
||||
API documentation for Stairs+
|
||||
=============================
|
||||
|
||||
* `stairsplus:register_all(modname, subname, recipeitem, fields)`
|
||||
Registers a stair, slab, panel, microblock, and any other types of
|
||||
nodes to be added in the future.
|
||||
This also registers the node with the circular saw.
|
||||
Example:
|
||||
```lua
|
||||
stairsplus:register_all("moreblocks", "wood", "defaut:wood", {
|
||||
description = "Wooden",
|
||||
tiles = {"default_wood.png"},
|
||||
groups = {oddly_breakabe_by_hand=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
```
|
||||
The following register only a particular type of microblock.
|
||||
You will probably never want to use them directly:
|
||||
|
||||
* `stairsplus:register_stair(modname, subname, recipeitem, fields)`
|
||||
* `stairsplus:register_slab(modname, subname, recipeitem, fields)`
|
||||
* `stairsplus:register_panel(modname, subname, recipeitem, fields)`
|
||||
* `stairsplus:register_micro(modname, subname, recipeitem, fields)`
|
||||
|
70
mods/Blocks/moreblocks/stairsplus/aliases.lua
Normal file
@ -0,0 +1,70 @@
|
||||
--[[
|
||||
More Blocks: alias definitions
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local function register_stairsplus_alias(modname, origname, newname)
|
||||
minetest.register_alias(modname.. ":slab_" ..origname, "moreblocks:slab_" ..newname)
|
||||
minetest.register_alias(modname.. ":slab_" ..origname.. "_inverted", "moreblocks:slab_" ..newname.. "_inverted")
|
||||
minetest.register_alias(modname.. ":slab_" ..origname.. "_wall", "moreblocks:slab_" ..newname.. "_wall")
|
||||
minetest.register_alias(modname.. ":slab_" ..origname.. "_quarter", "moreblocks:slab_" ..newname.. "_quarter")
|
||||
minetest.register_alias(modname.. ":slab_" ..origname.. "_quarter_inverted", "moreblocks:slab_" ..newname.. "_quarter_inverted")
|
||||
minetest.register_alias(modname.. ":slab_" ..origname.. "_quarter_wall", "moreblocks:slab_" ..newname.. "_quarter_wall")
|
||||
minetest.register_alias(modname.. ":slab_" ..origname.. "_three_quarter", "moreblocks:slab_" ..newname.. "_three_quarter")
|
||||
minetest.register_alias(modname.. ":slab_" ..origname.. "_three_quarter_inverted", "moreblocks:slab_" ..newname.. "_three_quarter_inverted")
|
||||
minetest.register_alias(modname.. ":slab_" ..origname.. "_three_quarter_wall", "moreblocks:slab_" ..newname.. "_three_quarter_wall")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname, "moreblocks:stair_" ..newname)
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_inverted", "moreblocks:stair_" ..newname.. "_inverted")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_wall", "moreblocks:stair_" ..newname.. "_wall")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half", "moreblocks:stair_" ..newname.. "_wall_half")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half_inverted", "moreblocks:stair_" ..newname.. "_wall_half_inverted")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_half", "moreblocks:stair_" ..newname.. "_half")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_half_inverted", "moreblocks:stair_" ..newname.. "_half_inverted")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_right_half", "moreblocks:stair_" ..newname.. "_right_half")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_right_half_inverted", "moreblocks:stair_" ..newname.. "_right_half_inverted")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half", "moreblocks:stair_" ..newname.. "_wall_half")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half_inverted", "moreblocks:stair_" ..newname.. "_wall_half_inverted")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_inner", "moreblocks:stair_" ..newname.. "_inner")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_inner_inverted", "moreblocks:stair_" ..newname.. "_inner_inverted")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_outer", "moreblocks:stair_" ..newname.. "_outer")
|
||||
minetest.register_alias(modname.. ":stair_" ..origname.. "_outer_inverted", "moreblocks:stair_" ..newname.. "_outer_inverted")
|
||||
minetest.register_alias(modname.. ":panel_" ..origname.. "_bottom", "moreblocks:panel_" ..newname.. "_bottom")
|
||||
minetest.register_alias(modname.. ":panel_" ..origname.. "_top", "moreblocks:panel_" ..newname.. "_top")
|
||||
minetest.register_alias(modname.. ":panel_" ..origname.. "_vertical", "moreblocks:panel_" ..newname.. "_vertical")
|
||||
minetest.register_alias(modname.. ":micro_" ..origname.. "_bottom", "moreblocks:micro_" ..newname.. "_bottom")
|
||||
minetest.register_alias(modname.. ":micro_" ..origname.. "_top", "moreblocks:micro_" ..newname.. "_top")
|
||||
end
|
||||
|
||||
register_stairsplus_alias("stairsplus", "stone", "stone")
|
||||
register_stairsplus_alias("stairsplus", "wood", "wood")
|
||||
register_stairsplus_alias("stairsplus", "pinewood", "pinewood")
|
||||
register_stairsplus_alias("stairsplus", "cobble", "cobble")
|
||||
register_stairsplus_alias("stairsplus", "brick", "brick")
|
||||
register_stairsplus_alias("stairsplus", "sandstone", "sandstone")
|
||||
register_stairsplus_alias("stairsplus", "glass", "glass")
|
||||
register_stairsplus_alias("stairsplus", "tree", "tree")
|
||||
register_stairsplus_alias("stairsplus", "jungletree", "jungletree")
|
||||
register_stairsplus_alias("stairsplus", "pinetree", "pinetree")
|
||||
register_stairsplus_alias("stairsplus", "desert_stone", "desert_stone")
|
||||
register_stairsplus_alias("stairsplus", "steelblock", "steelblock")
|
||||
register_stairsplus_alias("stairsplus", "mossycobble", "mossycobble")
|
||||
|
||||
register_stairsplus_alias("moreblocks", "coalstone", "coal_stone")
|
||||
register_stairsplus_alias("moreblocks", "junglewood", "jungle_wood")
|
||||
register_stairsplus_alias("moreblocks", "circlestonebrick", "circle_stone_bricks")
|
||||
register_stairsplus_alias("moreblocks", "ironstone", "iron_stone")
|
||||
register_stairsplus_alias("moreblocks", "coalglass", "coal_glass")
|
||||
register_stairsplus_alias("moreblocks", "ironglass", "iron_glass")
|
||||
register_stairsplus_alias("moreblocks", "glowglass", "glow_glass")
|
||||
register_stairsplus_alias("moreblocks", "superglowglass", "super_glow_glass")
|
||||
register_stairsplus_alias("moreblocks", "coalchecker", "coal_checker")
|
||||
register_stairsplus_alias("moreblocks", "ironchecker", "iron_checker")
|
||||
register_stairsplus_alias("moreblocks", "cactuschecker", "cactus_checker")
|
||||
register_stairsplus_alias("moreblocks", "ironstonebrick", "iron_stone_bricks")
|
||||
register_stairsplus_alias("moreblocks", "stonesquare", "stone_tile")
|
||||
register_stairsplus_alias("moreblocks", "splitstonesquare", "split_stone_tile")
|
||||
register_stairsplus_alias("moreblocks", "woodtile", "wood_tile")
|
||||
register_stairsplus_alias("moreblocks", "woodtile_centered", "wood_tile_centered")
|
||||
register_stairsplus_alias("moreblocks", "woodtile_full", "wood_tile_full")
|
139
mods/Blocks/moreblocks/stairsplus/conversion.lua
Normal file
@ -0,0 +1,139 @@
|
||||
--[[
|
||||
More Blocks: conversion
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
-- Function to convert all stairs/slabs/etc nodes from
|
||||
-- inverted, wall, etc to regular + 6d facedir
|
||||
|
||||
local dirs1 = {21, 20, 23, 22, 21}
|
||||
local dirs2 = {15, 8, 17, 6, 15}
|
||||
local dirs3 = {14, 11, 16, 5, 14}
|
||||
|
||||
function stairsplus:register_6dfacedir_conversion(modname, material)
|
||||
--print("Register stairsplus 6d facedir conversion")
|
||||
--print('ABM for '..modname..' "'..material..'"')
|
||||
|
||||
local objects_list1 = {
|
||||
modname.. ":slab_" ..material.. "_inverted",
|
||||
modname.. ":slab_" ..material.. "_quarter_inverted",
|
||||
modname.. ":slab_" ..material.. "_three_quarter_inverted",
|
||||
modname.. ":stair_" ..material.. "_inverted",
|
||||
modname.. ":stair_" ..material.. "_wall",
|
||||
modname.. ":stair_" ..material.. "_wall_half",
|
||||
modname.. ":stair_" ..material.. "_wall_half_inverted",
|
||||
modname.. ":stair_" ..material.. "_half_inverted",
|
||||
modname.. ":stair_" ..material.. "_right_half_inverted",
|
||||
modname.. ":panel_" ..material.. "_vertical",
|
||||
modname.. ":panel_" ..material.. "_top",
|
||||
}
|
||||
|
||||
local objects_list2 = {
|
||||
modname.. ":slab_" ..material.. "_wall",
|
||||
modname.. ":slab_" ..material.. "_quarter_wall",
|
||||
modname.. ":slab_" ..material.. "_three_quarter_wall",
|
||||
modname.. ":stair_" ..material.. "_inner_inverted",
|
||||
modname.. ":stair_" ..material.. "_outer_inverted",
|
||||
modname.. ":micro_" ..material.. "_top"
|
||||
}
|
||||
|
||||
for _, object in pairs(objects_list1) do
|
||||
local flip_upside_down = false
|
||||
local flip_to_wall = false
|
||||
|
||||
local dest_object = object
|
||||
|
||||
if string.find(dest_object, "_inverted") then
|
||||
flip_upside_down = true
|
||||
dest_object = string.gsub(dest_object, "_inverted", "")
|
||||
end
|
||||
|
||||
if string.find(object, "_top") then
|
||||
flip_upside_down = true
|
||||
dest_object = string.gsub(dest_object, "_top", "")
|
||||
end
|
||||
|
||||
if string.find(dest_object, "_wall") then
|
||||
flip_to_wall = true
|
||||
dest_object = string.gsub(dest_object, "_wall", "")
|
||||
end
|
||||
|
||||
if string.find(dest_object, "_vertical") then
|
||||
flip_to_wall = true
|
||||
dest_object = string.gsub(dest_object, "_vertical", "")
|
||||
end
|
||||
|
||||
if string.find(dest_object, "_half") and not string.find(dest_object, "_right_half") then
|
||||
dest_object = string.gsub(dest_object, "_half", "_right_half")
|
||||
elseif string.find(dest_object, "_right_half") then
|
||||
dest_object = string.gsub(dest_object, "_right_half", "_half")
|
||||
end
|
||||
|
||||
--print(" +---> convert " ..object)
|
||||
--print(" | to " ..dest_object)
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {object},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local fdir = node.param2 or 0
|
||||
|
||||
if flip_upside_down and not flip_to_wall then
|
||||
nfdir = dirs1[fdir + 2]
|
||||
elseif flip_to_wall and not flip_upside_down then
|
||||
nfdir = dirs2[fdir + 1]
|
||||
elseif flip_to_wall and flip_upside_down then
|
||||
nfdir = dirs3[fdir + 2]
|
||||
end
|
||||
minetest.set_node(pos, {name = dest_object, param2 = nfdir})
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
for _, object in pairs(objects_list2) do
|
||||
local flip_upside_down = false
|
||||
local flip_to_wall = false
|
||||
|
||||
local dest_object = object
|
||||
|
||||
if string.find(dest_object, "_inverted") then
|
||||
flip_upside_down = true
|
||||
dest_object = string.gsub(dest_object, "_inverted", "")
|
||||
end
|
||||
|
||||
if string.find(dest_object, "_top") then
|
||||
flip_upside_down = true
|
||||
dest_object = string.gsub(dest_object, "_top", "")
|
||||
end
|
||||
|
||||
if string.find(dest_object, "_wall") then
|
||||
flip_to_wall = true
|
||||
dest_object = string.gsub(dest_object, "_wall", "")
|
||||
end
|
||||
|
||||
--print(" +---> convert " ..object)
|
||||
--print(" | to " ..dest_object)
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {object},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local fdir = node.param2
|
||||
local nfdir = 20
|
||||
|
||||
if flip_upside_down and not flip_to_wall then
|
||||
nfdir = dirs1[fdir + 1]
|
||||
elseif flip_to_wall and not flip_upside_down then
|
||||
nfdir = dirs2[fdir + 2]
|
||||
|
||||
end
|
||||
minetest.set_node(pos, {name = dest_object, param2 = nfdir})
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
91
mods/Blocks/moreblocks/stairsplus/init.lua
Normal file
@ -0,0 +1,91 @@
|
||||
--[[
|
||||
More Blocks: Stairs+
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
-- Nodes will be called <modname>:{stair,slab,panel,micro}_<subname>
|
||||
|
||||
local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"
|
||||
|
||||
stairsplus = {}
|
||||
stairsplus.expect_infinite_stacks = false
|
||||
|
||||
if not minetest.get_modpath("unified_inventory")
|
||||
and minetest.setting_getbool("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
|
||||
for k, v in pairs(groups) do
|
||||
if k ~= "wood" and k ~= "stone" then
|
||||
result[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
if not moreblocks.config.stairsplus_in_creative_inventory then
|
||||
result.not_in_creative_inventory = 1
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
function stairsplus:register_all(modname, subname, recipeitem, fields)
|
||||
self:register_stair(modname, subname, recipeitem, fields)
|
||||
self:register_slab (modname, subname, recipeitem, fields)
|
||||
self:register_slope(modname, subname, recipeitem, fields)
|
||||
self:register_panel(modname, subname, recipeitem, fields)
|
||||
self:register_micro(modname, subname, recipeitem, fields)
|
||||
-- self:register_6dfacedir_conversion(modname, subname) -- Not needed as of Q3 2013, uncomment to fix old maps.
|
||||
end
|
||||
|
||||
function stairsplus:register_alias_all(modname_old, subname_old, modname_new, subname_new)
|
||||
self:register_stair_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
self:register_slab_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
self:register_slope_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
self:register_panel_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
self:register_micro_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
end
|
||||
function stairsplus:register_alias_force_all(modname_old, subname_old, modname_new, subname_new)
|
||||
self:register_stair_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||
self:register_slab_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||
self:register_slope_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||
self:register_panel_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||
self:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new)
|
||||
end
|
||||
|
||||
function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
stairsplus:register_all(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light
|
||||
})
|
||||
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 .. "/stairs.lua")
|
||||
dofile(modpath .. "/slabs.lua")
|
||||
dofile(modpath .. "/slopes.lua")
|
||||
dofile(modpath .. "/panels.lua")
|
||||
dofile(modpath .. "/microblocks.lua")
|
||||
dofile(modpath .. "/registrations.lua")
|
153
mods/Blocks/moreblocks/stairsplus/microblocks.lua
Normal file
@ -0,0 +1,153 @@
|
||||
--[[
|
||||
More Blocks: microblock definitions
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local S = moreblocks.intllib
|
||||
|
||||
-- Node will be called <modname>:micro_<subname>
|
||||
|
||||
function register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
stairsplus:register_micro(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
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},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
function stairsplus:register_micro_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(microblocks_defs)
|
||||
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)
|
||||
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)
|
||||
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 = "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)
|
||||
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
|
133
mods/Blocks/moreblocks/stairsplus/panels.lua
Normal file
@ -0,0 +1,133 @@
|
||||
--[[
|
||||
More Blocks: panel definitions
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local S = moreblocks.intllib
|
||||
|
||||
-- Node will be called <modname>:panel_<subname>
|
||||
|
||||
function register_panel(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
stairsplus:register_panel(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
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},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
function stairsplus:register_panel_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(panels_defs)
|
||||
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)
|
||||
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)
|
||||
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 = "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)
|
||||
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
|
65
mods/Blocks/moreblocks/stairsplus/registrations.lua
Normal file
@ -0,0 +1,65 @@
|
||||
--[[
|
||||
More Blocks: registrations
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
||||
"stone",
|
||||
"cobble",
|
||||
"mossycobble",
|
||||
"brick",
|
||||
"sandstone",
|
||||
"steelblock",
|
||||
"goldblock",
|
||||
"copperblock",
|
||||
"bronzeblock",
|
||||
"diamondblock",
|
||||
"desert_stone",
|
||||
"desert_cobble",
|
||||
"meselamp",
|
||||
"glass",
|
||||
"tree",
|
||||
"wood",
|
||||
"jungletree",
|
||||
"junglewood",
|
||||
"pine_tree",
|
||||
"pine_wood",
|
||||
"acacia_tree",
|
||||
"acacia_wood",
|
||||
"aspen_tree",
|
||||
"aspen_wood",
|
||||
"obsidian",
|
||||
"obsidian_glass",
|
||||
"stonebrick",
|
||||
"desert_stonebrick",
|
||||
"sandstonebrick",
|
||||
"obsidianbrick",
|
||||
}
|
||||
|
||||
for _, name in pairs(default_nodes) do
|
||||
local nodename = "default:" .. name
|
||||
local ndef = minetest.registered_nodes[nodename]
|
||||
if ndef then
|
||||
local drop
|
||||
if type(ndef.drop) == "string" then
|
||||
drop = ndef.drop:sub(9)
|
||||
end
|
||||
|
||||
local tiles = ndef.tiles
|
||||
if #ndef.tiles > 1 and ndef.drawtype:find("glass") then
|
||||
tiles = { ndef.tiles[1] }
|
||||
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
|
||||
})
|
||||
end
|
||||
end
|
224
mods/Blocks/moreblocks/stairsplus/slabs.lua
Normal file
@ -0,0 +1,224 @@
|
||||
--[[
|
||||
More Blocks: slab definitions
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local S = moreblocks.intllib
|
||||
|
||||
-- Node will be called <modname>:slab_<subname>
|
||||
|
||||
function register_slab(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
stairsplus:register_slab(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
local slabs_defs = {
|
||||
[""] = 8,
|
||||
["_quarter"] = 4,
|
||||
["_three_quarter"] = 12,
|
||||
["_1"] = 1,
|
||||
["_2"] = 2,
|
||||
["_14"] = 14,
|
||||
["_15"] = 15,
|
||||
}
|
||||
|
||||
function stairsplus:register_slab_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(slabs_defs)
|
||||
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)
|
||||
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 desc_base = S("%s Slab"):format(fields.description)
|
||||
for alternate, num in pairs(defs) do
|
||||
local def = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, (num/16)-0.5, 0.5},
|
||||
}
|
||||
}
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
def.description = ("%s (%d/16)"):format(desc_base, num)
|
||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||
if fields.drop and not (type(fields.drop) == "table") then
|
||||
def.drop = modname.. ":slab_" .. fields.drop .. alternate
|
||||
end
|
||||
minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)
|
||||
end
|
||||
minetest.register_alias("stairs:slab_" .. subname, modname .. ":slab_" .. subname)
|
||||
|
||||
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
|
362
mods/Blocks/moreblocks/stairsplus/slopes.lua
Normal file
@ -0,0 +1,362 @@
|
||||
--[[
|
||||
More Blocks: slope definitions
|
||||
|
||||
Copyright (c) 2011-2015 Calinou 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)
|
||||
stairsplus:register_slope(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
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,
|
||||
},
|
||||
}
|
||||
|
||||
function stairsplus:register_slope_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(slopes_defs)
|
||||
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)
|
||||
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)
|
||||
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 = "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)
|
||||
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
|
239
mods/Blocks/moreblocks/stairsplus/stairs.lua
Normal file
@ -0,0 +1,239 @@
|
||||
--[[
|
||||
More Blocks: stair definitions
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
local S = moreblocks.intllib
|
||||
|
||||
-- Node will be called <modname>:stair_<subname>
|
||||
|
||||
function register_stair(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
stairsplus:register_stair(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
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},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
function stairsplus:register_stair_alias(modname_old, subname_old, modname_new, subname_new)
|
||||
local defs = stairsplus.copytable(stairs_defs)
|
||||
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)
|
||||
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)
|
||||
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 = "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)
|
||||
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
|
BIN
mods/Blocks/moreblocks/textures/default_brick.png
Normal file
After Width: | Height: | Size: 716 B |
BIN
mods/Blocks/moreblocks/textures/default_fence_overlay.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
mods/Blocks/moreblocks/textures/invisible.png
Normal file
After Width: | Height: | Size: 68 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_cactus_brick.png
Normal file
After Width: | Height: | Size: 718 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_cactus_checker.png
Normal file
After Width: | Height: | Size: 693 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 579 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_circular_saw_side.png
Normal file
After Width: | Height: | Size: 478 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_circular_saw_top.png
Normal file
After Width: | Height: | Size: 441 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_clean_glass.png
Normal file
After Width: | Height: | Size: 177 B |
After Width: | Height: | Size: 96 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_coal_checker.png
Normal file
After Width: | Height: | Size: 744 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_coal_glass.png
Normal file
After Width: | Height: | Size: 155 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_coal_glass_detail.png
Normal file
After Width: | Height: | Size: 159 B |
After Width: | Height: | Size: 166 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_coal_stone.png
Normal file
After Width: | Height: | Size: 229 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_coal_stone_bricks.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_cobble_compressed.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_copperpatina.png
Normal file
After Width: | Height: | Size: 325 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_empty_bookshelf.png
Normal file
After Width: | Height: | Size: 219 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_fence_jungle_wood.png
Normal file
After Width: | Height: | Size: 204 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_fence_wood.png
Normal file
After Width: | Height: | Size: 480 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_glass.png
Normal file
After Width: | Height: | Size: 210 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_glass_stairsplus.png
Normal file
After Width: | Height: | Size: 215 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_glow_glass.png
Normal file
After Width: | Height: | Size: 157 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_glow_glass_detail.png
Normal file
After Width: | Height: | Size: 161 B |
After Width: | Height: | Size: 169 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_grey_bricks.png
Normal file
After Width: | Height: | Size: 725 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_iron_checker.png
Normal file
After Width: | Height: | Size: 850 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_iron_glass.png
Normal file
After Width: | Height: | Size: 158 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_iron_glass_detail.png
Normal file
After Width: | Height: | Size: 163 B |
After Width: | Height: | Size: 169 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_iron_stone.png
Normal file
After Width: | Height: | Size: 230 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_iron_stone_bricks.png
Normal file
After Width: | Height: | Size: 485 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_junglestick.png
Normal file
After Width: | Height: | Size: 122 B |
After Width: | Height: | Size: 144 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_plankstone.png
Normal file
After Width: | Height: | Size: 335 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_plankstone_2.png
Normal file
After Width: | Height: | Size: 354 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_rope.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_split_stone_tile.png
Normal file
After Width: | Height: | Size: 273 B |
After Width: | Height: | Size: 306 B |
After Width: | Height: | Size: 279 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_stone_tile.png
Normal file
After Width: | Height: | Size: 271 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_super_glow_glass.png
Normal file
After Width: | Height: | Size: 154 B |
After Width: | Height: | Size: 156 B |
After Width: | Height: | Size: 171 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_sweeper.png
Normal file
After Width: | Height: | Size: 310 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_tar.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_trap_glass.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_trap_glow_glass.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_trap_stone.png
Normal file
After Width: | Height: | Size: 333 B |
After Width: | Height: | Size: 170 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_tree_stairsplus.png
Normal file
After Width: | Height: | Size: 311 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_wood_tile.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_wood_tile_center.png
Normal file
After Width: | Height: | Size: 288 B |
BIN
mods/Blocks/moreblocks/textures/moreblocks_wood_tile_full.png
Normal file
After Width: | Height: | Size: 436 B |