diff options
| -rw-r--r-- | crafting.lua | 46 | ||||
| -rw-r--r-- | init.lua | 29 | ||||
| -rw-r--r-- | ownership.lua | 35 | ||||
| -rw-r--r-- | stairsplus.lua | 86 | ||||
| -rw-r--r-- | stairsplus/microblocks.lua | 42 | ||||
| -rw-r--r-- | stairsplus/panels.lua | 42 | ||||
| -rw-r--r-- | stairsplus/slabs.lua | 48 | ||||
| -rw-r--r-- | stairsplus/stairs.lua | 42 | ||||
| -rw-r--r-- | textures/moreblocks_coal_stone_bricks.png (renamed from textures/moreblocks_stone_bricks.png) | bin | 650 -> 650 bytes | 
9 files changed, 135 insertions, 235 deletions
diff --git a/crafting.lua b/crafting.lua index 0410ad0..8019772 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({ @@ -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"},
 @@ -373,10 +384,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/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 Binary files differindex 52c8ca8..52c8ca8 100644 --- a/textures/moreblocks_stone_bricks.png +++ b/textures/moreblocks_coal_stone_bricks.png  | 
