aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--circular_saw.lua22
-rw-r--r--crafting.lua46
-rw-r--r--init.lua29
-rw-r--r--locale/fr.txt50
-rw-r--r--locale/template.txt70
-rw-r--r--ownership.lua35
-rw-r--r--stairsplus.lua86
-rw-r--r--stairsplus/microblocks.lua42
-rw-r--r--stairsplus/panels.lua42
-rw-r--r--stairsplus/slabs.lua48
-rw-r--r--stairsplus/stairs.lua42
-rw-r--r--textures/moreblocks_coal_stone_bricks.png (renamed from textures/moreblocks_stone_bricks.png)bin650 -> 650 bytes
12 files changed, 250 insertions, 262 deletions
diff --git a/circular_saw.lua b/circular_saw.lua
index 741275f..c3da999 100644
--- a/circular_saw.lua
+++ b/circular_saw.lua
@@ -22,8 +22,8 @@ for i,v in ipairs({"default:wood", "default:stone", "default:cobble", "default:m
"moreblocks:coal_stone", "moreblocks:iron_stone", "moreblocks:coal_checker", "moreblocks:iron_checker",
"moreblocks:cactus_checker", "moreblocks:coal_glass", "moreblocks:iron_glass", "moreblocks:glow_glass",
"moreblocks:super_glow_glass", "moreblocks:wooden_tile", "moreblocks:stone_tile", "moreblocks:split_stone_tile",
- "moreblocks:iron_stone_bricks", "moreblocks:circle_stone_bricks", "moreblocks:wood_tile_centered",
- "moreblocks:wood_tile_full", "moreblocks:plank_stone"}) do
+ "moreblocks:coal_stone_bricks","moreblocks:iron_stone_bricks", "moreblocks:circle_stone_bricks",
+ "moreblocks:wood_tile_centered", "moreblocks:wood_tile_full", "moreblocks:plank_stone"}) do
table.insert(circular_saw.known_stairs, v);
end
@@ -101,7 +101,7 @@ circular_saw.reset_circular_saw = function(pos)
inv:set_list("output", circular_saw.get_stair_output_inv("", "", 0, meta:get_string("max_offered")));
meta:set_int("anz", 0);
- meta:set_string("infotext", "Circular saw, empty (owned by " .. (meta:get_string("owner") or "") .. ")");
+ meta:set_string("infotext", S("Circular saw, empty (owned by %s)"):format((meta:get_string("owner") or "")));
end
@@ -149,7 +149,7 @@ circular_saw.update_inventory = function(pos, amount)
-- Store how many microblocks are available
meta:set_int("anz", (akt+amount));
- meta:set_string("infotext", "Circular saw, working with " ..material.. " (owned by " .. (meta:get_string("owner") or "") .. ")");
+ meta:set_string("infotext", S("Circular saw, working with %s (owned by %s)"):format(material,(meta:get_string("owner") or "")));
end
@@ -276,7 +276,7 @@ circular_saw.on_construct_init = function(pos, formspec)
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", "Circular saw, empty")
+ meta:set_string("infotext", S("Circular saw, empty"))
local inv = meta:get_inventory()
inv:set_size("input", 1) -- Input slot for full blocks of material x
@@ -329,13 +329,13 @@ minetest.register_node("moreblocks:circular_saw", {
return circular_saw.on_construct_init(pos,
"size[10,9]" ..
"list[current_name;input;0,0;1,1;]" ..
- "label[0,0;Input material]" ..
+ "label[0,0;"..S("Input material").."]" ..
"list[current_name;micro;0,1;1,1;]" ..
- "label[0,1;Rest/microblocks]" ..
- "field[0.3,2.5;1,1;max_offered;Max:;${max_offered}]" ..
- "button[1,2;1,1;Set;Set]" ..
+ "label[0,1;"..S("Rest/microblocks").."]" ..
+ "field[0.3,2.5;1,1;max_offered;"..S("Max:")..";${max_offered}]" ..
+ "button[1,2;1,1;Set;"..S("Set").."]" ..
"list[current_name;recycle;0,3;1,1;]" ..
- "label[0,3;Recycle output]" ..
+ "label[0,3;"..S("Recycle output").."]" ..
"list[current_name;output;2,0;8,4;]" ..
"list[current_player;main;1,5;8,4;]");
end,
@@ -349,7 +349,7 @@ minetest.register_node("moreblocks:circular_saw", {
local meta = minetest.env:get_meta(pos);
meta:set_string("owner", (placer:get_player_name() or ""));
- meta:set_string("infotext", "Circular saw is empty (owned by " .. (placer:get_player_name() or "") .. ")");
+ meta:set_string("infotext", S("Circular saw is empty (owned by %s)"):format((placer:get_player_name() or "")));
end,
-- The amount of items offered per shape can be configured
diff --git a/crafting.lua b/crafting.lua
index 1bc98c5..3d52161 100644
--- a/crafting.lua
+++ b/crafting.lua
@@ -40,7 +40,7 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "moreblocks:woodtile 9",
+ output = "moreblocks:wood_tile 9",
recipe = {
{"default:wood", "default:wood", "default:wood"},
{"default:wood", "default:wood", "default:wood"},
@@ -49,56 +49,56 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "moreblocks:woodtile_flipped 1",
+ output = "moreblocks:wood_tile_flipped 1",
recipe = {
- {"moreblocks:woodtile"},
+ {"moreblocks:wood_tile"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_center 9",
+ output = "moreblocks:wood_tile_center 9",
recipe = {
{"default:wood", "default:wood", "default:wood"},
- {"default:wood", "moreblocks:woodtile", "default:wood"},
+ {"default:wood", "moreblocks:wood_tile", "default:wood"},
{"default:wood", "default:wood", "default:wood"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_full 4",
+ output = "moreblocks:wood_tile_full 4",
recipe = {
- {"moreblocks:woodtile", "moreblocks:woodtile"},
- {"moreblocks:woodtile", "moreblocks:woodtile"},
+ {"moreblocks:wood_tile", "moreblocks:wood_tile"},
+ {"moreblocks:wood_tile", "moreblocks:wood_tile"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_up 1",
+ output = "moreblocks:wood_tile_up 1",
recipe = {
{"default:stick"},
- {"moreblocks:woodtile_center"},
+ {"moreblocks:wood_tile_center"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_down 1",
+ output = "moreblocks:wood_tile_down 1",
recipe = {
- {"moreblocks:woodtile_center"},
+ {"moreblocks:wood_tile_center"},
{"default:stick"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_left 1",
+ output = "moreblocks:wood_tile_left 1",
recipe = {
- {"default:stick", "moreblocks:woodtile_center"},
+ {"default:stick", "moreblocks:wood_tile_center"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_right 1",
+ output = "moreblocks:wood_tile_right 1",
recipe = {
- {"moreblocks:woodtile_center", "default:stick"},
+ {"moreblocks:wood_tile_center", "default:stick"},
}
})
@@ -176,9 +176,19 @@ minetest.register_craft({
})
minetest.register_craft({
+ output = "moreblocks:coal_stone_bricks 1",
+ recipe = {
+ {"moreblocks:coal_stone", "moreblocks:coal_stone"},
+ {"moreblocks:coal_stone", "moreblocks:coal_stone"},
+ }
+})
+
+minetest.register_craft({
output = "moreblocks:iron_stone_bricks 1",
- type = "shapeless",
- recipe = {"default:steel_ingot", "default:stonebrick"},
+ recipe = {
+ {"moreblocks:iron_stone", "moreblocks:iron_stone"},
+ {"moreblocks:iron_stone", "moreblocks:iron_stone"},
+ }
})
minetest.register_craft({
diff --git a/init.lua b/init.lua
index 40fee2a..4fc120f 100644
--- a/init.lua
+++ b/init.lua
@@ -1,3 +1,13 @@
+--[[
+****
+More Blocks
+by Calinou
+Licensed under the zlib/libpng license for code and CC BY-SA for textures, see LICENSE.txt for info.
+****
+--]]
+
+moreblocks = {}
+
-- Load translation library if intllib is installed
local S
@@ -7,9 +17,11 @@ if (minetest.get_modpath("intllib")) then
else
S = function ( s ) return s end
end
+moreblocks.gettext = S
dofile(minetest.get_modpath("moreblocks").."/_config.txt")
+dofile(minetest.get_modpath("moreblocks").."/ownership.lua")
dofile(minetest.get_modpath("moreblocks").."/redefinitions.lua")
dofile(minetest.get_modpath("moreblocks").."/crafting.lua")
dofile(minetest.get_modpath("moreblocks").."/aliases.lua")
@@ -22,14 +34,6 @@ dofile(minetest.get_modpath("moreblocks").."/stairsplus/aliases.lua")
dofile(minetest.get_modpath("moreblocks").."/stairsplus.lua")
dofile(minetest.get_modpath("moreblocks").."/circular_saw.lua")
---[[
-****
-More Blocks
-by Calinou
-Licensed under the zlib/libpng license for code and CC BY-SA for textures, see LICENSE.txt for info.
-****
---]]
-
-- Blocks
minetest.register_node("moreblocks:wood_tile", {
@@ -108,6 +112,13 @@ minetest.register_node("moreblocks:circle_stone_bricks", {
sounds = default.node_sound_stone_defaults(),
})
+minetest.register_node("moreblocks:coal_stone_bricks", {
+ description = S("Coal Stone Bricks"),
+ tiles = {"moreblocks_coal_stone_bricks.png"},
+ groups = {cracky=3},
+ sounds = default.node_sound_stone_defaults(),
+})
+
minetest.register_node("moreblocks:iron_stone_bricks", {
description = S("Iron Stone Bricks"),
tiles = {"moreblocks_iron_stone_bricks.png"},
@@ -353,10 +364,10 @@ minetest.register_craftitem("moreblocks:sweeper", {
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 = minetest.item_eat(0),
})
diff --git a/locale/fr.txt b/locale/fr.txt
index e537a8c..6bd7f98 100644
--- a/locale/fr.txt
+++ b/locale/fr.txt
@@ -1,54 +1,72 @@
# Translation by Calinou
-[moreblocks] loaded. = [moreblocks] a été chargé.
+###init.lua###
+[moreblocks] loaded. = [moreblocks] a été chargé.
Jungle Wooden Planks = Planches de bois de jungle
-Empty Bookshelf = Étagère vide
+Empty Bookshelf = Ètagère vide
Clean Glass = Verre propre
Plankstone = Pierre-bois
Wooden Tile = Dalle en bois
-Full Wooden Tile = Dalle en bois complète
-Centered Wooden Tile = Dalle en bois centrée
+Full Wooden Tile = Dalle en bois complète
+Centered Wooden Tile = Dalle en bois centrée
Up Wooden Tile = Dalle en bois vers le haut
Down Wooden Tile = Dalle en bois vers le bas
Left Wooden Tile = Dalle en bois vers la gauche
Right Wooden Tile = Dalle en bois vers la droite
Circle Stone Bricks = Briques en pierre circulaires
Stone Tile = Dalle en pierre
-Split Stone Tile = Dalle en pierre découpée
+Split Stone Tile = Dalle en pierre découpée
Glow Glass = Verre brillant
-Super Glow Glass = Verre très brillant
-Coal Glass = Verre en charbon
-Iron Glass = Verre en fer
+Super Glow Glass = Verre très brillant
+Coal Glass = Verre de charbon
+Iron Glass = Verre de fer
Coal Checker = Damier en charbon
Iron Checker = Damier en fer
-Trap Stone = Pierre à piège
-Trap Glass = Verre à piège
-Coal Stone = Pierre en charbon
-Iron Stone = Pierre en fer
+Trap Stone = Pierre traversable
+Trap Glass = Verre traversable
+Trap Glow Glass = Verre brillant traversable
+Trap Super Glow Glass = Verre très brillant traversable
+Coal Stone = Pierre de charbon
+Iron Stone = Pierre de fer
+Coal Stone Bricks = Briques en pierre de charbon
+Iron Stone Bricks = Briques en pierre de fer
Cactus Checker = Damier en cactus
-Cactus Brick = Briques en cactus
+Cactus Brick = Briques de cactus
Sweeper = Balai
-Jungle Stick = Bâton en bois de jungle
+Jungle Stick = Bâton en bois de jungle
Horizontal Tree = Tronc d'arbre horizontal
Horizontal Jungle Tree = Tronc d'arbre de jungle horizontal
Rope = Corde
All-faces Tree = Tronc d'arbre
+###redefinition.lua###
Wooden = bois
Papyrus = Papyrus
Dry Shrub = Buisson mort
Sapling = Pousse d'arbre
Wooden Planks = Planches de bois
-Ladder = Échelle
+Ladder = Échelle
Glass = Verre
+###circular_saw.lua###
Circular Saw = Scie circulaire
+Circular saw, empty (owned by %s) = Scie circulaire, vide (propriété de %s)
+Circular saw, working with %s (owned by %s) = Scie circulaire, manipule %s (propriété de %s)
+Circular saw, empty = Scie circulaire, vide
+Circular saw is empty (owned by %s) = Scie circulaire est vide (propriété de %s)
+Input material = Entrée du matériel
+Rest/microblocks = Reste/microbloc
+Max: = Max:
+Set = Fixer
+Recycle output = Recyclage
+
+###./stairsplus/*###
%s Stairs = Escaliers en %s
%s Slab = Demi-dalle en %s
%s Panel = Barre en %s
%s Microblock = Microbloc en %s
%s Pane = Panneau en %s
-%s Fence = Barrière en %s
+%s Fence = Barrière en %s \ No newline at end of file
diff --git a/locale/template.txt b/locale/template.txt
new file mode 100644
index 0000000..77ed1a9
--- /dev/null
+++ b/locale/template.txt
@@ -0,0 +1,70 @@
+###init.lua###
+[moreblocks] loaded. =
+
+Jungle Wooden Planks =
+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 =
+Horizontal Tree =
+Horizontal Jungle Tree =
+Rope =
+All-faces Tree =
+
+###redefinition.lua###
+Wooden =
+Papyrus =
+Dry Shrub =
+Sapling =
+Wooden Planks =
+Ladder =
+Glass =
+
+###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 material =
+Rest/microblocks =
+Max: =
+Set =
+Recycle output =
+
+###./stairsplus/*###
+%s Stairs =
+%s Slab =
+%s Panel =
+%s Microblock =
+
+%s Pane =
+%s Fence = \ No newline at end of file
diff --git a/ownership.lua b/ownership.lua
new file mode 100644
index 0000000..9cd4cb3
--- /dev/null
+++ b/ownership.lua
@@ -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
diff --git a/stairsplus.lua b/stairsplus.lua
index c99ffd2..cd902d9 100644
--- a/stairsplus.lua
+++ b/stairsplus.lua
@@ -8,28 +8,12 @@ else
stairsplus_expect_infinite_stacks = true
end
--- these vales are in order: facedir in degrees = 90, 0, 270, 180, 90
+-- These vales are in order: facedir in degrees = 90, 0, 270, 180, 90
local dirs1 = { 21, 20, 23, 22, 21 }
local dirs2 = { 15, 8, 17, 6, 15 }
local dirs3 = { 14, 11, 16, 5, 14 }
-stairsplus_players_onwall = {}
-
-minetest.register_chatcommand("st", {
- params = "",
- description = "Toggle stairsplus between placing wall/vertical stairs/panels and normal.",
- func = function(name, param)
- stairsplus_players_onwall[name] = not stairsplus_players_onwall[name]
-
- if stairsplus_players_onwall[name] then
- minetest.chat_send_player(name, "Stairsplus: Placing wall stairs/vertical panels.")
- else
- minetest.chat_send_player(name, "Stairsplus: Placing floor/ceiling stairs/panels.")
- end
- end
-})
-
stairsplus_can_it_stack = function(itemstack, placer, pointed_thing)
return false
--[[
@@ -100,54 +84,23 @@ local function get_nodedef_field(nodename, fieldname)
return minetest.registered_nodes[nodename][fieldname]
end
-function stairsplus_rotate_and_place(itemstack, placer, pointed_thing, onwall)
-
- local node = minetest.env:get_node(pointed_thing.under)
-
- if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].on_rightclick then
-
- local above = pointed_thing.above
- local under = pointed_thing.under
- local top = {x=under.x, y=under.y+1, z=under.z}
-
- local pitch = placer:get_look_pitch()
- local node = minetest.env:get_node(above)
- local fdir = minetest.dir_to_facedir(placer:get_look_dir())
- local wield_name = itemstack:get_name()
-
- local slab = string.find(wield_name, "slab")
- local panel = string.find(wield_name, "panel")
- local micro = string.find(wield_name, "micro")
- local iswall = (above.x ~= under.x) or (above.z ~= under.z)
- local isceiling = (above.x == under.x) and (above.z == under.z) and (pitch > 0)
-
- if get_nodedef_field(minetest.env:get_node(under).name, "buildable_to") then
- if slab then fdir = 0 end
- minetest.env:add_node(under, {name = wield_name, param2 = fdir }) -- place right side up
- elseif not get_nodedef_field(minetest.env:get_node(above).name, "buildable_to") then
- return
- elseif onwall or (iswall and (slab or panel)) then
- if slab then
- minetest.env:add_node(above, {name = wield_name, param2 = dirs2[fdir+2] }) -- place with wall slab rotation
- else
- minetest.env:add_node(above, {name = wield_name, param2 = dirs3[fdir+2] }) -- place with wall panel/micro rotation
- end
- elseif isceiling then
- local nfdir = dirs1[fdir+2]
- if slab then nfdir = 22 end
- minetest.env:add_node(above, {name = wield_name, param2 = nfdir }) -- place upside down variant
- else
- if slab then fdir = 0 end
- minetest.env:add_node(above, {name = wield_name, param2 = fdir }) -- place right side up
- end
+--[[
- if not stairsplus_expect_infinite_stacks then
- itemstack:take_item()
+function(itemstack, placer, pointed_thing)
+ local keys=placer:get_player_control()
+ stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
return itemstack
end
- else
- minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer)
+
+]]--
+
+function stairsplus_rotate_and_place(itemstack, placer, pointed_thing)
+ if not moreblocks.node_is_owned(pointed_thing.under, placer) then
+ local keys=placer:get_player_control()
+ minetest.rotate_and_place(itemstack, placer, pointed_thing,
+ stairsplus_expect_infinite_stacks, {force_wall = keys.sneak})
end
+ return itemstack
end
function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light)
@@ -163,7 +116,7 @@ function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, i
register_6dfacedir_conversion(modname, subname)
end
--- Default stairs/slabs/panels/microblocks
+-- Default stairs/slabs/panels/microblocks.
register_stair_slab_panel_micro("moreblocks", "wood", "default:wood",
{snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
@@ -288,7 +241,7 @@ register_stair_slab_panel_micro("moreblocks", "stonebrick", "default:stonebrick"
{cracky=3},
{"default_stone_brick.png"},
"Stone Bricks",
- "stone_bricks",
+ "stonebrick",
0)
register_stair_slab_panel_micro("moreblocks", "desert_stonebrick", "default:desert_stonebrick",
@@ -314,6 +267,13 @@ register_stair_slab_panel_micro("moreblocks", "circle_stone_bricks", "moreblocks
"circle_stone_bricks",
0)
+register_stair_slab_panel_micro("moreblocks", "coal_stone_bricks", "moreblocks:coal_stone_bricks",
+ {cracky=3},
+ {"moreblocks_coal_stone_bricks.png"},
+ "Coal Stone Bricks",
+ "Coal_stone_bricks",
+ 0)
+
register_stair_slab_panel_micro("moreblocks", "iron_stone_bricks", "moreblocks:iron_stone_bricks",
{cracky=3},
{"moreblocks_iron_stone_bricks.png"},
diff --git a/stairsplus/microblocks.lua b/stairsplus/microblocks.lua
index 24a69ea..6cbb7d4 100644
--- a/stairsplus/microblocks.lua
+++ b/stairsplus/microblocks.lua
@@ -31,11 +31,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, 0, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":micro_" .. subname .. "_1", {
@@ -57,11 +53,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, -0.4375, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":micro_" .. subname .. "_2", {
@@ -83,11 +75,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, -0.375, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":micro_" .. subname .. "_4", {
@@ -109,11 +97,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, -0.25, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":micro_" .. subname .. "_12", {
@@ -135,11 +119,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, 0.25, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":micro_" .. subname .. "_14", {
@@ -161,11 +141,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, 0.375, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":micro_" .. subname .. "_15", {
@@ -187,11 +163,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, 0.4375, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_alias(modname..":micro_"..subname.."_bottom", modname..":micro_"..subname)
diff --git a/stairsplus/panels.lua b/stairsplus/panels.lua
index a5a9caa..c0a24fb 100644
--- a/stairsplus/panels.lua
+++ b/stairsplus/panels.lua
@@ -30,11 +30,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
},
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_1", {
@@ -55,11 +51,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5},
},
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_2", {
@@ -80,11 +72,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5},
},
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_4", {
@@ -105,11 +93,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5},
},
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_12", {
@@ -130,11 +114,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5},
},
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_14", {
@@ -155,11 +135,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5},
},
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_15", {
@@ -180,11 +156,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5},
},
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_alias(modname..":panel_"..subname.."_bottom", modname..":panel_"..subname)
diff --git a/stairsplus/slabs.lua b/stairsplus/slabs.lua
index a7ebe43..1e251a5 100644
--- a/stairsplus/slabs.lua
+++ b/stairsplus/slabs.lua
@@ -31,11 +31,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":stairs:slab_" .. subname, {
@@ -56,11 +52,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":slab_" .. subname .. "_quarter", {
@@ -82,11 +74,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":slab_" .. subname .. "_three_quarter", {
@@ -108,11 +96,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":slab_" .. subname .. "_1", {
@@ -134,11 +118,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":slab_" .. subname .. "_2", {
@@ -160,11 +140,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":slab_" .. subname .. "_14", {
@@ -186,11 +162,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, 0.375, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":slab_" .. subname .. "_15", {
@@ -212,11 +184,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
-- Unregister default recipes, optional, see _config.txt
diff --git a/stairsplus/stairs.lua b/stairsplus/stairs.lua
index 7fa6a30..20996a7 100644
--- a/stairsplus/stairs.lua
+++ b/stairsplus/stairs.lua
@@ -36,11 +36,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":stairs:stair_" .. subname, {
@@ -66,11 +62,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_half", {
@@ -97,11 +89,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":stair_" .. subname .. "_right_half", {
@@ -128,11 +116,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":stair_" .. subname .. "_inner", {
@@ -162,11 +146,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":stair_" .. subname .. "_outer", {
@@ -194,11 +174,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_alt", {
@@ -218,11 +194,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
-- Unregister default recipes, optional, see _config.txt
diff --git a/textures/moreblocks_stone_bricks.png b/textures/moreblocks_coal_stone_bricks.png
index 52c8ca8..52c8ca8 100644
--- a/textures/moreblocks_stone_bricks.png
+++ b/textures/moreblocks_coal_stone_bricks.png
Binary files differ