initial commit
subgame + mods
13
mods/moreblocks/LICENSE.txt
Executable file
@ -0,0 +1,13 @@
|
||||
+---- zlib/libpng license ----+
|
||||
|
||||
Copyright (c) 2013-2014 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.
|
12
mods/moreblocks/README.txt
Executable file
@ -0,0 +1,12 @@
|
||||
More Blocks
|
||||
==========
|
||||
|
||||
More Blocks for Minetest (http://minetest.net), a free and open source infinite
|
||||
world block sandbox game.
|
||||
|
||||
To install, just clone this repository into your "mods" directory.
|
||||
|
||||
More Blocks code is under the zlib license, textures are under CC BY-SA 3.0 unported.
|
||||
|
||||
Forum topic: http://forum.minetest.net/viewtopic.php?id=509
|
||||
|
75
mods/moreblocks/aliases.lua
Executable file
@ -0,0 +1,75 @@
|
||||
-- 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")
|
||||
|
||||
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,
|
||||
})
|
||||
|
355
mods/moreblocks/circular_saw.lua
Executable file
@ -0,0 +1,355 @@
|
||||
local S = moreblocks.gettext
|
||||
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:
|
||||
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, 0, 0, 0,
|
||||
}
|
||||
|
||||
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"},
|
||||
}
|
||||
|
||||
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 = {}
|
||||
-- If there is nothing inside, display empty inventory:
|
||||
if amount < 1 then
|
||||
return list
|
||||
end
|
||||
|
||||
for i, t in ipairs(circular_saw.names) do
|
||||
local cost = circular_saw.cost_in_microblocks[i]
|
||||
table.insert(list, modname .. ":" .. t[1] .. "_" .. material .. t[2]
|
||||
.. " " .. math.min(math.floor(amount/cost), max))
|
||||
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") and
|
||||
inv:get_stack("input", index):get_name() ~= stackname then
|
||||
return 0
|
||||
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)
|
||||
circular_saw:update_inventory(pos, cost * count)
|
||||
end
|
||||
end
|
||||
|
||||
function circular_saw.on_metadata_inventory_take(
|
||||
pos, listname, index, stack, player)
|
||||
-- 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)
|
||||
meta:set_string("formspec", "size[11,9]" ..gui_slots..
|
||||
"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,4;]" ..
|
||||
"list[current_player;main;1.5,5;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", 4*8) -- 4x8 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,
|
||||
})
|
22
mods/moreblocks/config.lua
Executable file
@ -0,0 +1,22 @@
|
||||
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)
|
446
mods/moreblocks/crafting.lua
Executable file
@ -0,0 +1,446 @@
|
||||
-- Crafting
|
||||
|
||||
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({
|
||||
type = "cooking", output = "moreblocks:tar", recipe = "default:gravel",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:circular_saw",
|
||||
recipe = {
|
||||
{ "", "default:steel_ingot", "" },
|
||||
{ "group:wood", "group:wood", "group:wood"},
|
||||
{ "group:wood", "", "group:wood"},
|
||||
}
|
||||
})
|
2
mods/moreblocks/depends.txt
Executable file
@ -0,0 +1,2 @@
|
||||
default
|
||||
intllib?
|
31
mods/moreblocks/init.lua
Executable file
@ -0,0 +1,31 @@
|
||||
--[[
|
||||
-- More Blocks (moreblocks) by Calinou
|
||||
-- Licensed under the zlib/ license for code and CC BY-SA 3.0 for textures, see LICENSE.txt for info.
|
||||
--]]
|
||||
|
||||
moreblocks = {}
|
||||
|
||||
-- Load translation library if intllib is installed
|
||||
|
||||
local S -- Load translation library if intllib is installed:
|
||||
if intllib then
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
moreblocks.gettext = 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
|
||||
print(S("[moreblocks] loaded."))
|
||||
end
|
||||
|
67
mods/moreblocks/locale/de.txt
Executable 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/moreblocks/locale/es.txt
Executable 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/moreblocks/locale/fr.txt
Executable file
@ -0,0 +1,72 @@
|
||||
# Translation by Calinou
|
||||
|
||||
###init.lua###
|
||||
[moreblocks] loaded. = [moreblocks] a <20>t<EFBFBD> charg<72>.
|
||||
|
||||
Jungle Wooden Planks = Planches de bois de jungle
|
||||
Empty Bookshelf = <20>tag<61>re vide
|
||||
Clean Glass = Verre propre
|
||||
Plankstone = Pierre-bois
|
||||
Wooden Tile = Dalle en bois
|
||||
Full Wooden Tile = Dalle en bois compl<70>te
|
||||
Centered Wooden Tile = Dalle en bois centr<74>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<75>e
|
||||
Glow Glass = Verre brillant
|
||||
Super Glow Glass = Verre tr<74>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<74>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 = <20>chelle
|
||||
Glass = Verre
|
||||
|
||||
###circular_saw.lua###
|
||||
Circular Saw = Scie circulaire
|
||||
Circular saw, empty (owned by %s) = Scie circulaire, vide (propri<72>t<EFBFBD> de %s)
|
||||
Circular saw, working with %s (owned by %s) = Scie circulaire, manipule %s (propri<72>t<EFBFBD> de %s)
|
||||
Circular saw, empty = Scie circulaire, vide
|
||||
Circular saw is empty (owned by %s) = Scie circulaire est vide (propri<72>t<EFBFBD> de %s)
|
||||
|
||||
Input material = Entr<74>e du mat<61>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<72>re en %s
|
64
mods/moreblocks/locale/template.txt
Executable 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 =
|
344
mods/moreblocks/nodes.lua
Executable file
@ -0,0 +1,344 @@
|
||||
local S = moreblocks.gettext
|
||||
|
||||
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},
|
||||
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",
|
||||
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",
|
||||
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",
|
||||
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",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = sound_glass,
|
||||
no_stairs = true,
|
||||
},
|
||||
["fence_jungle_wood"] = {
|
||||
description = S("Jungle Wood Fence"),
|
||||
drawtype = "fencelike",
|
||||
tiles = {"default_junglewood.png"},
|
||||
inventory_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
|
||||
},
|
||||
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = sound_wood,
|
||||
no_stairs = true,
|
||||
},
|
||||
["all_faces_tree"] = {
|
||||
description = S("All-faces Tree"),
|
||||
tiles = {"default_tree_top.png"},
|
||||
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",
|
||||
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",
|
||||
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",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 15,
|
||||
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",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = 15,
|
||||
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,
|
||||
},
|
||||
}
|
||||
|
||||
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:jungle_stick", {
|
||||
description = S("Jungle Stick"),
|
||||
inventory_image = "moreblocks_junglestick.png",
|
||||
groups = {stick= 1},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("moreblocks:nothing", {
|
||||
inventory_image = "invisible.png",
|
||||
on_use = function() end,
|
||||
})
|
||||
|
35
mods/moreblocks/ownership.lua
Executable file
@ -0,0 +1,35 @@
|
||||
|
||||
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
|
96
mods/moreblocks/redefinitions.lua
Executable file
@ -0,0 +1,96 @@
|
||||
-- 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 16",
|
||||
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.15, -- Tool repair buff (15% bonus instead of 2%).
|
||||
})
|
||||
|
||||
-- Redefinitions of some default nodes:
|
||||
|
||||
-- Make glass and obsidian glass framed, like the More Blocks glasses:
|
||||
minetest.override_item("default:glass", {
|
||||
drawtype = "glasslike_framed",
|
||||
})
|
||||
|
||||
minetest.override_item("default:obsidian_glass", {
|
||||
drawtype = "glasslike_framed",
|
||||
})
|
||||
|
||||
-- Let there be light. This makes some nodes let light pass through:
|
||||
minetest.override_item("default:ladder", {
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
minetest.override_item("default:sapling", {
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
minetest.override_item("default:dry_shrub", {
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
minetest.override_item("default:papyrus", {
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
minetest.override_item("default:junglegrass", {
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
minetest.override_item("default:junglesapling", {
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
minetest.override_item("default:grass_1", {
|
||||
inventory_image = "default_grass_3.png", -- Use a bigger inventory image.
|
||||
wield_image = "default_grass_3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
for i = 2, 5 do
|
||||
minetest.override_item("default:grass_" ..i, {
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
end
|
25
mods/moreblocks/stairsplus/API.md
Executable file
@ -0,0 +1,25 @@
|
||||
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)`
|
||||
|
62
mods/moreblocks/stairsplus/aliases.lua
Executable file
@ -0,0 +1,62 @@
|
||||
|
||||
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", "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", "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")
|
132
mods/moreblocks/stairsplus/conversion.lua
Executable file
@ -0,0 +1,132 @@
|
||||
-- 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
|
||||
|
43
mods/moreblocks/stairsplus/init.lua
Executable file
@ -0,0 +1,43 @@
|
||||
-- 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:register_all(modname, subname, recipeitem, fields)
|
||||
fields = fields or {}
|
||||
fields.groups = fields.groups or {}
|
||||
if not moreblocks.config.stairsplus_in_creative_inventory then
|
||||
fields.groups.not_in_creative_inventory = 1
|
||||
end
|
||||
self:register_stair(modname, subname, recipeitem, fields)
|
||||
self:register_slab (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.
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
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.. "/panels.lua")
|
||||
dofile(modpath.. "/microblocks.lua")
|
||||
dofile(modpath.. "/registrations.lua")
|
122
mods/moreblocks/stairsplus/microblocks.lua
Executable file
@ -0,0 +1,122 @@
|
||||
local S -- Load translation library if intllib is installed:
|
||||
if intllib then
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
|
||||
-- Node will be called <modname>:micro_<subname>
|
||||
|
||||
function register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
return stairsplus:register_micro(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
function stairsplus:register_micro(modname, subname, recipeitem, fields)
|
||||
local 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},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
local desc = S("%s Microblock"):format(fields.description)
|
||||
for alternate, def in pairs(defs) do
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.description = desc
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":micro_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":micro_" ..subname..alternate, def)
|
||||
end
|
||||
|
||||
minetest.register_alias(modname.. ":micro_" ..subname.. "_bottom", modname.. ":micro_" ..subname)
|
||||
|
||||
-- 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 .. " 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
|
113
mods/moreblocks/stairsplus/panels.lua
Executable file
@ -0,0 +1,113 @@
|
||||
local S -- Load translation library if intllib is installed:
|
||||
if intllib then
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
|
||||
-- Node will be called <modname>:panel_<subname>
|
||||
|
||||
function register_panel(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
return stairsplus:register_panel(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||
local 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},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
local desc = S("%s Panel"):format(fields.description)
|
||||
for alternate, def in pairs(defs) do
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.description = desc
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":panel_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":panel_" ..subname..alternate, def)
|
||||
end
|
||||
minetest.register_alias(modname.. ":panel_" ..subname.. "_bottom", modname.. ":panel_" ..subname)
|
||||
|
||||
-- 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
|
49
mods/moreblocks/stairsplus/registrations.lua
Executable file
@ -0,0 +1,49 @@
|
||||
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
||||
"stone",
|
||||
"cobble",
|
||||
"mossycobble",
|
||||
"brick",
|
||||
"sandstone",
|
||||
"steelblock",
|
||||
"goldblock",
|
||||
"copperblock",
|
||||
"bronzeblock",
|
||||
"diamondblock",
|
||||
"desert_stone",
|
||||
-- "desert_cobble",
|
||||
"glass",
|
||||
"tree",
|
||||
"wood",
|
||||
"jungletree",
|
||||
"junglewood",
|
||||
"obsidian",
|
||||
"obsidian_glass",
|
||||
"stonebrick",
|
||||
"desert_stonebrick",
|
||||
"sandstonebrick",
|
||||
}
|
||||
|
||||
for _, name in pairs(default_nodes) do
|
||||
local nodename = "default:" .. name
|
||||
local ndef = minetest.registered_nodes[nodename]
|
||||
local groups = {}
|
||||
for k, v in pairs(ndef.groups)
|
||||
-- Ignore wood and stone groups to not make them usable in crafting:
|
||||
do if k ~= "wood" and k ~= "stone" then
|
||||
groups[k] = v
|
||||
end
|
||||
end
|
||||
local drop
|
||||
if type(ndef.drop) == "string" then
|
||||
drop = ndef.drop:sub(9)
|
||||
end
|
||||
stairsplus:register_all("moreblocks", name, nodename, {
|
||||
description = ndef.description,
|
||||
drop = drop,
|
||||
groups = groups,
|
||||
sounds = ndef.sounds,
|
||||
tiles = ndef.tiles,
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
end
|
||||
|
120
mods/moreblocks/stairsplus/slabs.lua
Executable file
@ -0,0 +1,120 @@
|
||||
local S -- Load translation library if intllib is installed:
|
||||
if intllib then
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
|
||||
-- Node will be called <modname>:slab_<subname>
|
||||
|
||||
function register_slab(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
return stairsplus:register_slab(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
||||
local defs = {
|
||||
[""] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
},
|
||||
["_quarter"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
},
|
||||
},
|
||||
["_three_quarter"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5},
|
||||
},
|
||||
},
|
||||
["_1"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
||||
},
|
||||
},
|
||||
["_2"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
|
||||
},
|
||||
},
|
||||
["_14"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.375, 0.5},
|
||||
},
|
||||
},
|
||||
["_15"] = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
|
||||
},
|
||||
},
|
||||
}
|
||||
local desc = S("%s Slab"):format(fields.description)
|
||||
for alternate, def in pairs(defs) do
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.description = desc
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":slab_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":slab_" ..subname..alternate, def)
|
||||
end
|
||||
minetest.register_alias("stairs:slab_" ..subname, modname.. ":slab_" ..subname)
|
||||
|
||||
-- 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},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {{modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {
|
||||
{modname .. ":panel_" .. subname},
|
||||
{modname .. ":panel_" .. subname},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. " 3",
|
||||
recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname},
|
||||
})
|
||||
end
|
225
mods/moreblocks/stairsplus/stairs.lua
Executable file
@ -0,0 +1,225 @@
|
||||
local S -- Load translation library if intllib is installed:
|
||||
if intllib then
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
|
||||
-- Node will be called <modname>:stair_<subname>
|
||||
|
||||
function register_stair(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||
return stairsplus:register_stair(modname, subname, recipeitem, {
|
||||
groups = groups,
|
||||
tiles = images,
|
||||
description = description,
|
||||
drop = drop,
|
||||
light_source = light,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
function stairsplus:register_stair(modname, subname, recipeitem, fields)
|
||||
local 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},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local desc = S("%s Stairs"):format(fields.description)
|
||||
for alternate, def in pairs(defs) do
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.on_place = minetest.rotate_node
|
||||
for k, v in pairs(fields) do
|
||||
def[k] = v
|
||||
end
|
||||
def.description = desc
|
||||
if fields.drop then
|
||||
def.drop = modname.. ":stair_" ..fields.drop..alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":stair_" ..subname..alternate, def)
|
||||
end
|
||||
minetest.register_alias(":stairs:stair_" ..subname, modname.. ":stair_" ..subname)
|
||||
|
||||
-- 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 .. "_half",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_right_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/moreblocks/textures/default_brick.png
Executable file
After Width: | Height: | Size: 716 B |
BIN
mods/moreblocks/textures/default_fence_overlay.png
Executable file
After Width: | Height: | Size: 285 B |
BIN
mods/moreblocks/textures/invisible.png
Executable file
After Width: | Height: | Size: 68 B |
BIN
mods/moreblocks/textures/moreblocks_cactus_brick.png
Executable file
After Width: | Height: | Size: 718 B |
BIN
mods/moreblocks/textures/moreblocks_cactus_checker.png
Executable file
After Width: | Height: | Size: 693 B |
BIN
mods/moreblocks/textures/moreblocks_circle_stone_bricks.png
Executable file
After Width: | Height: | Size: 448 B |
BIN
mods/moreblocks/textures/moreblocks_circular_saw_bottom.png
Executable file
After Width: | Height: | Size: 579 B |
BIN
mods/moreblocks/textures/moreblocks_circular_saw_side.png
Executable file
After Width: | Height: | Size: 478 B |
BIN
mods/moreblocks/textures/moreblocks_circular_saw_top.png
Executable file
After Width: | Height: | Size: 441 B |
BIN
mods/moreblocks/textures/moreblocks_clean_glass.png
Executable file
After Width: | Height: | Size: 177 B |
BIN
mods/moreblocks/textures/moreblocks_coal_checker.png
Executable file
After Width: | Height: | Size: 744 B |
BIN
mods/moreblocks/textures/moreblocks_coal_glass.png
Executable file
After Width: | Height: | Size: 155 B |
BIN
mods/moreblocks/textures/moreblocks_coal_glass_stairsplus.png
Executable file
After Width: | Height: | Size: 166 B |
BIN
mods/moreblocks/textures/moreblocks_coal_stone.png
Executable file
After Width: | Height: | Size: 229 B |
BIN
mods/moreblocks/textures/moreblocks_coal_stone_bricks.png
Executable file
After Width: | Height: | Size: 484 B |
BIN
mods/moreblocks/textures/moreblocks_empty_bookshelf.png
Executable file
After Width: | Height: | Size: 585 B |
BIN
mods/moreblocks/textures/moreblocks_fence_jungle_wood.png
Executable file
After Width: | Height: | Size: 204 B |
BIN
mods/moreblocks/textures/moreblocks_fence_wood.png
Executable file
After Width: | Height: | Size: 480 B |
BIN
mods/moreblocks/textures/moreblocks_glass.png
Executable file
After Width: | Height: | Size: 210 B |
BIN
mods/moreblocks/textures/moreblocks_glass_stairsplus.png
Executable file
After Width: | Height: | Size: 215 B |
BIN
mods/moreblocks/textures/moreblocks_glow_glass.png
Executable file
After Width: | Height: | Size: 157 B |
BIN
mods/moreblocks/textures/moreblocks_glow_glass_stairsplus.png
Executable file
After Width: | Height: | Size: 169 B |
BIN
mods/moreblocks/textures/moreblocks_grey_bricks.png
Executable file
After Width: | Height: | Size: 725 B |
BIN
mods/moreblocks/textures/moreblocks_iron_checker.png
Executable file
After Width: | Height: | Size: 850 B |
BIN
mods/moreblocks/textures/moreblocks_iron_glass.png
Executable file
After Width: | Height: | Size: 158 B |
BIN
mods/moreblocks/textures/moreblocks_iron_glass_stairsplus.png
Executable file
After Width: | Height: | Size: 169 B |
BIN
mods/moreblocks/textures/moreblocks_iron_stone.png
Executable file
After Width: | Height: | Size: 230 B |
BIN
mods/moreblocks/textures/moreblocks_iron_stone_bricks.png
Executable file
After Width: | Height: | Size: 485 B |
BIN
mods/moreblocks/textures/moreblocks_junglestick.png
Executable file
After Width: | Height: | Size: 122 B |
BIN
mods/moreblocks/textures/moreblocks_obsidian_glass_stairsplus.png
Executable file
After Width: | Height: | Size: 144 B |
BIN
mods/moreblocks/textures/moreblocks_plankstone.png
Executable file
After Width: | Height: | Size: 335 B |
BIN
mods/moreblocks/textures/moreblocks_plankstone_2.png
Executable file
After Width: | Height: | Size: 354 B |
BIN
mods/moreblocks/textures/moreblocks_rope.png
Executable file
After Width: | Height: | Size: 356 B |
BIN
mods/moreblocks/textures/moreblocks_split_stone_tile.png
Executable file
After Width: | Height: | Size: 273 B |
BIN
mods/moreblocks/textures/moreblocks_split_stone_tile_alt.png
Executable file
After Width: | Height: | Size: 306 B |
BIN
mods/moreblocks/textures/moreblocks_split_stone_tile_top.png
Executable file
After Width: | Height: | Size: 279 B |
BIN
mods/moreblocks/textures/moreblocks_stone_tile.png
Executable file
After Width: | Height: | Size: 271 B |
BIN
mods/moreblocks/textures/moreblocks_super_glow_glass.png
Executable file
After Width: | Height: | Size: 154 B |
BIN
mods/moreblocks/textures/moreblocks_super_glow_glass_stairsplus.png
Executable file
After Width: | Height: | Size: 171 B |
BIN
mods/moreblocks/textures/moreblocks_sweeper.png
Executable file
After Width: | Height: | Size: 310 B |
BIN
mods/moreblocks/textures/moreblocks_tar.png
Executable file
After Width: | Height: | Size: 270 B |
BIN
mods/moreblocks/textures/moreblocks_trap_glass.png
Executable file
After Width: | Height: | Size: 170 B |
BIN
mods/moreblocks/textures/moreblocks_trap_glow_glass.png
Executable file
After Width: | Height: | Size: 170 B |
BIN
mods/moreblocks/textures/moreblocks_trap_stone.png
Executable file
After Width: | Height: | Size: 333 B |
BIN
mods/moreblocks/textures/moreblocks_trap_super_glow_glass.png
Executable file
After Width: | Height: | Size: 170 B |
BIN
mods/moreblocks/textures/moreblocks_tree_stairsplus.png
Executable file
After Width: | Height: | Size: 311 B |
BIN
mods/moreblocks/textures/moreblocks_wood_tile.png
Executable file
After Width: | Height: | Size: 396 B |
BIN
mods/moreblocks/textures/moreblocks_wood_tile_center.png
Executable file
After Width: | Height: | Size: 288 B |
BIN
mods/moreblocks/textures/moreblocks_wood_tile_full.png
Executable file
After Width: | Height: | Size: 436 B |
BIN
mods/moreblocks/textures/moreblocks_wood_tile_up.png
Executable file
After Width: | Height: | Size: 289 B |