forked from minetest-mods/mesecons
		
	Remove trailing whitespace
This commit is contained in:
		| @@ -30,7 +30,7 @@ | |||||||
| --		action_change = function | --		action_change = function | ||||||
| --		rules = rules/get_rules | --		rules = rules/get_rules | ||||||
| --	}, | --	}, | ||||||
| --	conductor =  | --	conductor = | ||||||
| --	{ | --	{ | ||||||
| --		state = mesecon.state.on/off | --		state = mesecon.state.on/off | ||||||
| --		offstate = opposite state (for state = on only) | --		offstate = opposite state (for state = on only) | ||||||
|   | |||||||
| @@ -496,7 +496,7 @@ function mesecon.find_receptor_on(pos, link) | |||||||
| 					end | 					end | ||||||
| 				end | 				end | ||||||
| 			end | 			end | ||||||
| 			 |  | ||||||
| 		end | 		end | ||||||
| 		depth = depth + 1 | 		depth = depth + 1 | ||||||
| 	end | 	end | ||||||
| @@ -533,7 +533,7 @@ function mesecon.rules_link_rule_all(output, rule) | |||||||
| 		return {} | 		return {} | ||||||
| 	end | 	end | ||||||
| 	local rules = {} | 	local rules = {} | ||||||
| 	 |  | ||||||
| 	for _, inputrule in ipairs(mesecon.flattenrules(inputrules)) do | 	for _, inputrule in ipairs(mesecon.flattenrules(inputrules)) do | ||||||
| 		-- Check if input accepts from output | 		-- Check if input accepts from output | ||||||
| 		if  mesecon.cmpPos(mesecon.addPosRule(input, inputrule), output) then | 		if  mesecon.cmpPos(mesecon.addPosRule(input, inputrule), output) then | ||||||
| @@ -552,7 +552,7 @@ function mesecon.rules_link_rule_all_inverted(input, rule) | |||||||
| 		return {} | 		return {} | ||||||
| 	end | 	end | ||||||
| 	local rules = {} | 	local rules = {} | ||||||
| 	 |  | ||||||
| 	for _, outputrule in ipairs(mesecon.flattenrules(outputrules)) do | 	for _, outputrule in ipairs(mesecon.flattenrules(outputrules)) do | ||||||
| 		if  mesecon.cmpPos(mesecon.addPosRule(output, outputrule), input) then | 		if  mesecon.cmpPos(mesecon.addPosRule(output, outputrule), input) then | ||||||
| 			table.insert(rules, mesecon.invertRule(outputrule)) | 			table.insert(rules, mesecon.invertRule(outputrule)) | ||||||
| @@ -607,8 +607,8 @@ function mesecon.rotate_rules_right(rules) | |||||||
| 	local nr = {} | 	local nr = {} | ||||||
| 	for i, rule in ipairs(rules) do | 	for i, rule in ipairs(rules) do | ||||||
| 		table.insert(nr, { | 		table.insert(nr, { | ||||||
| 			x = -rule.z,  | 			x = -rule.z, | ||||||
| 			y =  rule.y,  | 			y =  rule.y, | ||||||
| 			z =  rule.x, | 			z =  rule.x, | ||||||
| 			name = rule.name}) | 			name = rule.name}) | ||||||
| 	end | 	end | ||||||
| @@ -619,8 +619,8 @@ function mesecon.rotate_rules_left(rules) | |||||||
| 	local nr = {} | 	local nr = {} | ||||||
| 	for i, rule in ipairs(rules) do | 	for i, rule in ipairs(rules) do | ||||||
| 		table.insert(nr, { | 		table.insert(nr, { | ||||||
| 			x =  rule.z,  | 			x =  rule.z, | ||||||
| 			y =  rule.y,  | 			y =  rule.y, | ||||||
| 			z = -rule.x, | 			z = -rule.x, | ||||||
| 			name = rule.name}) | 			name = rule.name}) | ||||||
| 	end | 	end | ||||||
| @@ -631,8 +631,8 @@ function mesecon.rotate_rules_down(rules) | |||||||
| 	local nr = {} | 	local nr = {} | ||||||
| 	for i, rule in ipairs(rules) do | 	for i, rule in ipairs(rules) do | ||||||
| 		table.insert(nr, { | 		table.insert(nr, { | ||||||
| 			x = -rule.y,  | 			x = -rule.y, | ||||||
| 			y =  rule.x,  | 			y =  rule.x, | ||||||
| 			z =  rule.z, | 			z =  rule.z, | ||||||
| 			name = rule.name}) | 			name = rule.name}) | ||||||
| 	end | 	end | ||||||
| @@ -643,8 +643,8 @@ function mesecon.rotate_rules_up(rules) | |||||||
| 	local nr = {} | 	local nr = {} | ||||||
| 	for i, rule in ipairs(rules) do | 	for i, rule in ipairs(rules) do | ||||||
| 		table.insert(nr, { | 		table.insert(nr, { | ||||||
| 			x =  rule.y,  | 			x =  rule.y, | ||||||
| 			y = -rule.x,  | 			y = -rule.x, | ||||||
| 			z =  rule.z, | 			z =  rule.z, | ||||||
| 			name = rule.name}) | 			name = rule.name}) | ||||||
| 	end | 	end | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ mesecon.rules.buttonlike = | |||||||
| {{x = 1,  y = 0, z = 0}, | {{x = 1,  y = 0, z = 0}, | ||||||
|  {x = 1,  y = 1, z = 0}, |  {x = 1,  y = 1, z = 0}, | ||||||
|  {x = 1,  y =-1, z = 0}, |  {x = 1,  y =-1, z = 0}, | ||||||
|  {x = 1,  y =-1, z = 1},  |  {x = 1,  y =-1, z = 1}, | ||||||
|  {x = 1,  y =-1, z =-1}, |  {x = 1,  y =-1, z =-1}, | ||||||
|  {x = 2,  y = 0, z = 0}} |  {x = 2,  y = 0, z = 0}} | ||||||
|  |  | ||||||
| @@ -38,7 +38,7 @@ mesecon.rules.alldirs = | |||||||
|  {x= 0, y=-1,  z= 0}, |  {x= 0, y=-1,  z= 0}, | ||||||
|  {x= 0, y= 0,  z= 1}, |  {x= 0, y= 0,  z= 1}, | ||||||
|  {x= 0, y= 0,  z=-1}} |  {x= 0, y= 0,  z=-1}} | ||||||
|   |  | ||||||
| mesecon.rules.buttonlike_get = function(node) | mesecon.rules.buttonlike_get = function(node) | ||||||
| 	local rules = mesecon.rules.buttonlike | 	local rules = mesecon.rules.buttonlike | ||||||
| 	if node.param2 == 2 then | 	if node.param2 == 2 then | ||||||
|   | |||||||
| @@ -129,7 +129,7 @@ function mesecon.set_bit(binary,bit,value) | |||||||
| 		end | 		end | ||||||
| 	end | 	end | ||||||
| 	return binary | 	return binary | ||||||
| 	 |  | ||||||
| end | end | ||||||
|  |  | ||||||
| function mesecon.invertRule(r) | function mesecon.invertRule(r) | ||||||
| @@ -203,7 +203,7 @@ function mesecon.flipstate(pos, node) | |||||||
| 	local newstate | 	local newstate | ||||||
| 	if (nodedef.__mesecon_state == "on") then newstate = "off" end | 	if (nodedef.__mesecon_state == "on") then newstate = "off" end | ||||||
| 	if (nodedef.__mesecon_state == "off") then newstate = "on" end | 	if (nodedef.__mesecon_state == "off") then newstate = "on" end | ||||||
| 		 |  | ||||||
| 	minetest.swap_node(pos, {name = nodedef.__mesecon_basename .. "_" .. newstate, | 	minetest.swap_node(pos, {name = nodedef.__mesecon_basename .. "_" .. newstate, | ||||||
| 		param2 = node.param2}) | 		param2 = node.param2}) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -135,7 +135,7 @@ nid_inc = function (nid) | |||||||
| 	end | 	end | ||||||
|  |  | ||||||
| 	-- BUT: Skip impossible nodeids: | 	-- BUT: Skip impossible nodeids: | ||||||
| 	if ((nid[0] == 0 and nid[4] == 1) or (nid[1] == 0 and nid[5] == 1)  | 	if ((nid[0] == 0 and nid[4] == 1) or (nid[1] == 0 and nid[5] == 1) | ||||||
| 	or (nid[2] == 0 and nid[6] == 1) or (nid[3] == 0 and nid[7] == 1)) then | 	or (nid[2] == 0 and nid[6] == 1) or (nid[3] == 0 and nid[7] == 1)) then | ||||||
| 		return nid_inc(nid) | 		return nid_inc(nid) | ||||||
| 	end | 	end | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ end | |||||||
| minetest.register_node("mesecons_button:button_off", { | minetest.register_node("mesecons_button:button_off", { | ||||||
| 	drawtype = "nodebox", | 	drawtype = "nodebox", | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 	"jeija_wall_button_sides.png",	 | 	"jeija_wall_button_sides.png", | ||||||
| 	"jeija_wall_button_sides.png", | 	"jeija_wall_button_sides.png", | ||||||
| 	"jeija_wall_button_sides.png", | 	"jeija_wall_button_sides.png", | ||||||
| 	"jeija_wall_button_sides.png", | 	"jeija_wall_button_sides.png", | ||||||
| @@ -32,7 +32,7 @@ minetest.register_node("mesecons_button:button_off", { | |||||||
| 		fixed = { -6/16, -6/16, 5/16, 6/16, 6/16, 8/16 } | 		fixed = { -6/16, -6/16, 5/16, 6/16, 6/16, 8/16 } | ||||||
| 	}, | 	}, | ||||||
| 	node_box = { | 	node_box = { | ||||||
| 		type = "fixed",	 | 		type = "fixed", | ||||||
| 		fixed = { | 		fixed = { | ||||||
| 		{ -6/16, -6/16, 6/16, 6/16, 6/16, 8/16 },	-- the thin plate behind the button | 		{ -6/16, -6/16, 6/16, 6/16, 6/16, 8/16 },	-- the thin plate behind the button | ||||||
| 		{ -4/16, -2/16, 4/16, 4/16, 2/16, 6/16 }	-- the button itself | 		{ -4/16, -2/16, 4/16, 4/16, 2/16, 6/16 }	-- the button itself | ||||||
|   | |||||||
| @@ -35,7 +35,7 @@ end | |||||||
|  |  | ||||||
| for i = 1, 4 do | for i = 1, 4 do | ||||||
| local groups = {} | local groups = {} | ||||||
| if i == 1 then  | if i == 1 then | ||||||
| 	groups = {bendy=2,snappy=1,dig_immediate=2} | 	groups = {bendy=2,snappy=1,dig_immediate=2} | ||||||
| else | else | ||||||
| 	groups = {bendy=2,snappy=1,dig_immediate=2, not_in_creative_inventory=1} | 	groups = {bendy=2,snappy=1,dig_immediate=2, not_in_creative_inventory=1} | ||||||
|   | |||||||
| @@ -182,10 +182,10 @@ minetest.register_node("mesecons_detector:node_detector_off", { | |||||||
| 	on_receive_fields = node_detector_on_receive_fields, | 	on_receive_fields = node_detector_on_receive_fields, | ||||||
| 	after_place_node = function (pos, placer) | 	after_place_node = function (pos, placer) | ||||||
| 		local placer_pos = placer:getpos() | 		local placer_pos = placer:getpos() | ||||||
| 		 |  | ||||||
| 		--correct for the player's height | 		--correct for the player's height | ||||||
| 		if placer:is_player() then placer_pos.y = placer_pos.y + 1.5 end | 		if placer:is_player() then placer_pos.y = placer_pos.y + 1.5 end | ||||||
| 		 |  | ||||||
| 		--correct for 6d facedir | 		--correct for 6d facedir | ||||||
| 		if placer_pos then | 		if placer_pos then | ||||||
| 			local dir = { | 			local dir = { | ||||||
| @@ -217,10 +217,10 @@ minetest.register_node("mesecons_detector:node_detector_on", { | |||||||
| 	on_receive_fields = node_detector_on_receive_fields, | 	on_receive_fields = node_detector_on_receive_fields, | ||||||
| 	after_place_node = function (pos, placer) | 	after_place_node = function (pos, placer) | ||||||
| 		local placer_pos = placer:getpos() | 		local placer_pos = placer:getpos() | ||||||
| 		 |  | ||||||
| 		--correct for the player's height | 		--correct for the player's height | ||||||
| 		if placer:is_player() then placer_pos.y = placer_pos.y + 1.5 end | 		if placer:is_player() then placer_pos.y = placer_pos.y + 1.5 end | ||||||
| 		 |  | ||||||
| 		--correct for 6d facedir | 		--correct for 6d facedir | ||||||
| 		if placer_pos then | 		if placer_pos then | ||||||
| 			local dir = { | 			local dir = { | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ local corner_selectionbox = { | |||||||
| } | } | ||||||
|  |  | ||||||
| local corner_get_rules = function (node) | local corner_get_rules = function (node) | ||||||
| 	local rules =  | 	local rules = | ||||||
| 	{{x = 1,  y = 0,  z =  0}, | 	{{x = 1,  y = 0,  z =  0}, | ||||||
| 	 {x = 0,  y = 0,  z = -1}} | 	 {x = 0,  y = 0,  z = -1}} | ||||||
|  |  | ||||||
| @@ -39,7 +39,7 @@ minetest.register_node("mesecons_extrawires:corner_on", { | |||||||
| 	node_box = corner_nodebox, | 	node_box = corner_nodebox, | ||||||
| 	groups = {dig_immediate = 3, not_in_creative_inventory = 1}, | 	groups = {dig_immediate = 3, not_in_creative_inventory = 1}, | ||||||
| 	drop = "mesecons_extrawires:corner_off", | 	drop = "mesecons_extrawires:corner_off", | ||||||
| 	mesecons = {conductor =  | 	mesecons = {conductor = | ||||||
| 	{ | 	{ | ||||||
| 		state = mesecon.state.on, | 		state = mesecon.state.on, | ||||||
| 		rules = corner_get_rules, | 		rules = corner_get_rules, | ||||||
| @@ -65,7 +65,7 @@ minetest.register_node("mesecons_extrawires:corner_off", { | |||||||
| 	selection_box = corner_selectionbox, | 	selection_box = corner_selectionbox, | ||||||
| 	node_box = corner_nodebox, | 	node_box = corner_nodebox, | ||||||
| 	groups = {dig_immediate = 3}, | 	groups = {dig_immediate = 3}, | ||||||
| 	mesecons = {conductor =  | 	mesecons = {conductor = | ||||||
| 	{ | 	{ | ||||||
| 		state = mesecon.state.off, | 		state = mesecon.state.off, | ||||||
| 		rules = corner_get_rules, | 		rules = corner_get_rules, | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ local tjunction_selectionbox = { | |||||||
| } | } | ||||||
|  |  | ||||||
| local tjunction_get_rules = function (node) | local tjunction_get_rules = function (node) | ||||||
| 	local rules =  | 	local rules = | ||||||
| 	{{x = 0,  y = 0,  z =  1}, | 	{{x = 0,  y = 0,  z =  1}, | ||||||
| 	 {x = 1,  y = 0,  z =  0}, | 	 {x = 1,  y = 0,  z =  0}, | ||||||
| 	 {x = 0,  y = 0,  z = -1}} | 	 {x = 0,  y = 0,  z = -1}} | ||||||
| @@ -40,7 +40,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", { | |||||||
| 	node_box = tjunction_nodebox, | 	node_box = tjunction_nodebox, | ||||||
| 	groups = {dig_immediate = 3, not_in_creative_inventory = 1}, | 	groups = {dig_immediate = 3, not_in_creative_inventory = 1}, | ||||||
| 	drop = "mesecons_extrawires:tjunction_off", | 	drop = "mesecons_extrawires:tjunction_off", | ||||||
| 	mesecons = {conductor =  | 	mesecons = {conductor = | ||||||
| 	{ | 	{ | ||||||
| 		state = mesecon.state.on, | 		state = mesecon.state.on, | ||||||
| 		rules = tjunction_get_rules, | 		rules = tjunction_get_rules, | ||||||
| @@ -66,7 +66,7 @@ minetest.register_node("mesecons_extrawires:tjunction_off", { | |||||||
| 	selection_box = tjunction_selectionbox, | 	selection_box = tjunction_selectionbox, | ||||||
| 	node_box = tjunction_nodebox, | 	node_box = tjunction_nodebox, | ||||||
| 	groups = {dig_immediate = 3}, | 	groups = {dig_immediate = 3}, | ||||||
| 	mesecons = {conductor =  | 	mesecons = {conductor = | ||||||
| 	{ | 	{ | ||||||
| 		state = mesecon.state.off, | 		state = mesecon.state.off, | ||||||
| 		rules = tjunction_get_rules, | 		rules = tjunction_get_rules, | ||||||
|   | |||||||
| @@ -247,7 +247,7 @@ end | |||||||
|  |  | ||||||
| local safe_globals = { | local safe_globals = { | ||||||
| 	"assert", "error", "ipairs", "next", "pairs", "pcall", "select", | 	"assert", "error", "ipairs", "next", "pairs", "pcall", "select", | ||||||
| 	"tonumber", "tostring", "type", "unpack", "_VERSION", "xpcall",  | 	"tonumber", "tostring", "type", "unpack", "_VERSION", "xpcall", | ||||||
| } | } | ||||||
| local function create_environment(pos, mem, event) | local function create_environment(pos, mem, event) | ||||||
| 	-- Gather variables for the environment | 	-- Gather variables for the environment | ||||||
|   | |||||||
| @@ -262,7 +262,7 @@ function parse_get_command(code, starti) | |||||||
| 		if s == "(" then | 		if s == "(" then | ||||||
| 			return string.sub(code, starti, i-1), i + 1 -- i: ( i+1 after ( | 			return string.sub(code, starti, i-1), i + 1 -- i: ( i+1 after ( | ||||||
| 		end | 		end | ||||||
| 		if s == ";" and starti == i then  | 		if s == ";" and starti == i then | ||||||
| 			starti = starti + 1 | 			starti = starti + 1 | ||||||
| 			i = starti | 			i = starti | ||||||
| 		elseif s == ">" then | 		elseif s == ">" then | ||||||
| @@ -410,7 +410,7 @@ function yc_command_sbi(params, eeprom, L, Lv) | |||||||
| 	--is an eeprom address | 	--is an eeprom address | ||||||
| 	local new_eeprom = ""; | 	local new_eeprom = ""; | ||||||
| 	for i=1, #eeprom do | 	for i=1, #eeprom do | ||||||
| 		if tonumber(params[1])==i then  | 		if tonumber(params[1])==i then | ||||||
| 			new_eeprom = new_eeprom..status | 			new_eeprom = new_eeprom..status | ||||||
| 		else | 		else | ||||||
| 			new_eeprom = new_eeprom..eeprom:sub(i, i) | 			new_eeprom = new_eeprom..eeprom:sub(i, i) | ||||||
| @@ -476,7 +476,7 @@ function yc_command_if_getcondition(code, starti) | |||||||
| 	local brackets = 1 --1 Bracket to close | 	local brackets = 1 --1 Bracket to close | ||||||
| 	while s ~= "" do | 	while s ~= "" do | ||||||
| 		s = string.sub(code, i, i) | 		s = string.sub(code, i, i) | ||||||
| 		 |  | ||||||
| 		if s == ")" then | 		if s == ")" then | ||||||
| 			brackets = brackets - 1 | 			brackets = brackets - 1 | ||||||
| 		end | 		end | ||||||
| @@ -539,7 +539,7 @@ function yc_command_parsecondition(cond, L, eeprom) | |||||||
| 		i = i + 1 | 		i = i + 1 | ||||||
| 	end | 	end | ||||||
|  |  | ||||||
| 	local i = 2  | 	local i = 2 | ||||||
| 	local l = string.len(cond) | 	local l = string.len(cond) | ||||||
| 	while i<=l do | 	while i<=l do | ||||||
| 		local s = cond:sub(i,i) | 		local s = cond:sub(i,i) | ||||||
| @@ -612,12 +612,12 @@ function yc_action_setports(pos, L, Lv) | |||||||
| 		if L.b == true then mesecon.receptor_on(pos, rules) | 		if L.b == true then mesecon.receptor_on(pos, rules) | ||||||
| 		else mesecon.receptor_off(pos, rules) end | 		else mesecon.receptor_off(pos, rules) end | ||||||
| 	end | 	end | ||||||
| 	if Lv.c ~= L.c then  | 	if Lv.c ~= L.c then | ||||||
| 		rules = microc_rules[name.."0100"] | 		rules = microc_rules[name.."0100"] | ||||||
| 		if L.c == true then mesecon.receptor_on(pos, rules) | 		if L.c == true then mesecon.receptor_on(pos, rules) | ||||||
| 		else mesecon.receptor_off(pos, rules) end | 		else mesecon.receptor_off(pos, rules) end | ||||||
| 	end | 	end | ||||||
| 	if Lv.d ~= L.d then  | 	if Lv.d ~= L.d then | ||||||
| 		rules = microc_rules[name.."1000"] | 		rules = microc_rules[name.."1000"] | ||||||
| 		if L.d == true then mesecon.receptor_on(pos, rules) | 		if L.d == true then mesecon.receptor_on(pos, rules) | ||||||
| 		else mesecon.receptor_off(pos, rules) end | 		else mesecon.receptor_off(pos, rules) end | ||||||
|   | |||||||
| @@ -74,7 +74,7 @@ function mesecon.register_movestone(name, def, is_sticky) | |||||||
| 		local maxpush = mesecon.setting("movestone_max_push", 50) | 		local maxpush = mesecon.setting("movestone_max_push", 50) | ||||||
| 		local maxpull = mesecon.setting("movestone_max_pull", 50) | 		local maxpull = mesecon.setting("movestone_max_pull", 50) | ||||||
| 		local success, stack, oldstack = mesecon.mvps_push(frontpos, direction, maxpush) | 		local success, stack, oldstack = mesecon.mvps_push(frontpos, direction, maxpush) | ||||||
| 		if success then  | 		if success then | ||||||
| 			mesecon.mvps_process_stack(stack) | 			mesecon.mvps_process_stack(stack) | ||||||
| 			mesecon.mvps_move_objects(frontpos, direction, oldstack) | 			mesecon.mvps_move_objects(frontpos, direction, oldstack) | ||||||
| 		-- Too large stack/stopper in the way: try again very soon | 		-- Too large stack/stopper in the way: try again very soon | ||||||
|   | |||||||
| @@ -160,11 +160,11 @@ local pistonspec_normal = { | |||||||
| minetest.register_node("mesecons_pistons:piston_normal_off", { | minetest.register_node("mesecons_pistons:piston_normal_off", { | ||||||
| 	description = "Piston", | 	description = "Piston", | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_top.png",  | 		"mesecons_piston_top.png", | ||||||
| 		"mesecons_piston_bottom.png",  | 		"mesecons_piston_bottom.png", | ||||||
| 		"mesecons_piston_left.png",  | 		"mesecons_piston_left.png", | ||||||
| 		"mesecons_piston_right.png",  | 		"mesecons_piston_right.png", | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_pusher_front.png" | 		"mesecons_piston_pusher_front.png" | ||||||
| 		}, | 		}, | ||||||
| 	groups = {cracky = 3}, | 	groups = {cracky = 3}, | ||||||
| @@ -182,11 +182,11 @@ minetest.register_node("mesecons_pistons:piston_normal_off", { | |||||||
| minetest.register_node("mesecons_pistons:piston_normal_on", { | minetest.register_node("mesecons_pistons:piston_normal_on", { | ||||||
| 	drawtype = "nodebox", | 	drawtype = "nodebox", | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_top.png",  | 		"mesecons_piston_top.png", | ||||||
| 		"mesecons_piston_bottom.png",  | 		"mesecons_piston_bottom.png", | ||||||
| 		"mesecons_piston_left.png",  | 		"mesecons_piston_left.png", | ||||||
| 		"mesecons_piston_right.png",  | 		"mesecons_piston_right.png", | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_on_front.png" | 		"mesecons_piston_on_front.png" | ||||||
| 		}, | 		}, | ||||||
| 	inventory_image = "mesecons_piston_top.png", | 	inventory_image = "mesecons_piston_top.png", | ||||||
| @@ -241,11 +241,11 @@ local pistonspec_sticky = { | |||||||
| minetest.register_node("mesecons_pistons:piston_sticky_off", { | minetest.register_node("mesecons_pistons:piston_sticky_off", { | ||||||
| 	description = "Sticky Piston", | 	description = "Sticky Piston", | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_top.png",  | 		"mesecons_piston_top.png", | ||||||
| 		"mesecons_piston_bottom.png",  | 		"mesecons_piston_bottom.png", | ||||||
| 		"mesecons_piston_left.png",  | 		"mesecons_piston_left.png", | ||||||
| 		"mesecons_piston_right.png",  | 		"mesecons_piston_right.png", | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_pusher_front_sticky.png" | 		"mesecons_piston_pusher_front_sticky.png" | ||||||
| 		}, | 		}, | ||||||
| 	groups = {cracky = 3}, | 	groups = {cracky = 3}, | ||||||
| @@ -263,11 +263,11 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", { | |||||||
| minetest.register_node("mesecons_pistons:piston_sticky_on", { | minetest.register_node("mesecons_pistons:piston_sticky_on", { | ||||||
| 	drawtype = "nodebox", | 	drawtype = "nodebox", | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_top.png",  | 		"mesecons_piston_top.png", | ||||||
| 		"mesecons_piston_bottom.png",  | 		"mesecons_piston_bottom.png", | ||||||
| 		"mesecons_piston_left.png",  | 		"mesecons_piston_left.png", | ||||||
| 		"mesecons_piston_right.png",  | 		"mesecons_piston_right.png", | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_on_front.png" | 		"mesecons_piston_on_front.png" | ||||||
| 		}, | 		}, | ||||||
| 	inventory_image = "mesecons_piston_top.png", | 	inventory_image = "mesecons_piston_top.png", | ||||||
| @@ -340,11 +340,11 @@ local pistonspec_normal_up = { | |||||||
| minetest.register_node("mesecons_pistons:piston_up_normal_off", { | minetest.register_node("mesecons_pistons:piston_up_normal_off", { | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_pusher_front.png", | 		"mesecons_piston_pusher_front.png", | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_left.png^[transformR270",  | 		"mesecons_piston_left.png^[transformR270", | ||||||
| 		"mesecons_piston_right.png^[transformR90",  | 		"mesecons_piston_right.png^[transformR90", | ||||||
| 		"mesecons_piston_bottom.png",  | 		"mesecons_piston_bottom.png", | ||||||
| 		"mesecons_piston_top.png^[transformR180",  | 		"mesecons_piston_top.png^[transformR180", | ||||||
| 		}, | 		}, | ||||||
| 	inventory_image = "mesecons_piston_top.png", | 	inventory_image = "mesecons_piston_top.png", | ||||||
| 	wield_image = "mesecons_piston_top.png", | 	wield_image = "mesecons_piston_top.png", | ||||||
| @@ -363,11 +363,11 @@ minetest.register_node("mesecons_pistons:piston_up_normal_on", { | |||||||
| 	drawtype = "nodebox", | 	drawtype = "nodebox", | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_on_front.png", | 		"mesecons_piston_on_front.png", | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_left.png^[transformR270",  | 		"mesecons_piston_left.png^[transformR270", | ||||||
| 		"mesecons_piston_right.png^[transformR90",  | 		"mesecons_piston_right.png^[transformR90", | ||||||
| 		"mesecons_piston_bottom.png",  | 		"mesecons_piston_bottom.png", | ||||||
| 		"mesecons_piston_top.png^[transformR180",  | 		"mesecons_piston_top.png^[transformR180", | ||||||
| 		}, | 		}, | ||||||
| 	inventory_image = "mesecons_piston_top.png", | 	inventory_image = "mesecons_piston_top.png", | ||||||
| 	wield_image = "mesecons_piston_top.png", | 	wield_image = "mesecons_piston_top.png", | ||||||
| @@ -422,11 +422,11 @@ local pistonspec_sticky_up = { | |||||||
| minetest.register_node("mesecons_pistons:piston_up_sticky_off", { | minetest.register_node("mesecons_pistons:piston_up_sticky_off", { | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_pusher_front_sticky.png", | 		"mesecons_piston_pusher_front_sticky.png", | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_left.png^[transformR270",  | 		"mesecons_piston_left.png^[transformR270", | ||||||
| 		"mesecons_piston_right.png^[transformR90",  | 		"mesecons_piston_right.png^[transformR90", | ||||||
| 		"mesecons_piston_bottom.png",  | 		"mesecons_piston_bottom.png", | ||||||
| 		"mesecons_piston_top.png^[transformR180",  | 		"mesecons_piston_top.png^[transformR180", | ||||||
| 		"mesecons_piston_tb.png" | 		"mesecons_piston_tb.png" | ||||||
| 		}, | 		}, | ||||||
| 	inventory_image = "mesecons_piston_top.png", | 	inventory_image = "mesecons_piston_top.png", | ||||||
| @@ -447,11 +447,11 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_on", { | |||||||
| 	drawtype = "nodebox", | 	drawtype = "nodebox", | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_on_front.png", | 		"mesecons_piston_on_front.png", | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_left.png^[transformR270",  | 		"mesecons_piston_left.png^[transformR270", | ||||||
| 		"mesecons_piston_right.png^[transformR90",  | 		"mesecons_piston_right.png^[transformR90", | ||||||
| 		"mesecons_piston_bottom.png",  | 		"mesecons_piston_bottom.png", | ||||||
| 		"mesecons_piston_top.png^[transformR180",  | 		"mesecons_piston_top.png^[transformR180", | ||||||
| 		}, | 		}, | ||||||
| 	inventory_image = "mesecons_piston_top.png", | 	inventory_image = "mesecons_piston_top.png", | ||||||
| 	wield_image = "mesecons_piston_top.png", | 	wield_image = "mesecons_piston_top.png", | ||||||
| @@ -524,12 +524,12 @@ local pistonspec_normal_down = { | |||||||
| -- offstate | -- offstate | ||||||
| minetest.register_node("mesecons_pistons:piston_down_normal_off", { | minetest.register_node("mesecons_pistons:piston_down_normal_off", { | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_pusher_front.png", | 		"mesecons_piston_pusher_front.png", | ||||||
| 		"mesecons_piston_left.png^[transformR90",  | 		"mesecons_piston_left.png^[transformR90", | ||||||
| 		"mesecons_piston_right.png^[transformR270",  | 		"mesecons_piston_right.png^[transformR270", | ||||||
| 		"mesecons_piston_bottom.png^[transformR180",  | 		"mesecons_piston_bottom.png^[transformR180", | ||||||
| 		"mesecons_piston_top.png",  | 		"mesecons_piston_top.png", | ||||||
| 		}, | 		}, | ||||||
| 	inventory_image = "mesecons_piston_top.png", | 	inventory_image = "mesecons_piston_top.png", | ||||||
| 	wield_image = "mesecons_piston_top.png", | 	wield_image = "mesecons_piston_top.png", | ||||||
| @@ -548,12 +548,12 @@ minetest.register_node("mesecons_pistons:piston_down_normal_off", { | |||||||
| minetest.register_node("mesecons_pistons:piston_down_normal_on", { | minetest.register_node("mesecons_pistons:piston_down_normal_on", { | ||||||
| 	drawtype = "nodebox", | 	drawtype = "nodebox", | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_on_front.png", | 		"mesecons_piston_on_front.png", | ||||||
| 		"mesecons_piston_left.png^[transformR90",  | 		"mesecons_piston_left.png^[transformR90", | ||||||
| 		"mesecons_piston_right.png^[transformR270",  | 		"mesecons_piston_right.png^[transformR270", | ||||||
| 		"mesecons_piston_bottom.png^[transformR180",  | 		"mesecons_piston_bottom.png^[transformR180", | ||||||
| 		"mesecons_piston_top.png",  | 		"mesecons_piston_top.png", | ||||||
| 		}, | 		}, | ||||||
| 	inventory_image = "mesecons_piston_top.png", | 	inventory_image = "mesecons_piston_top.png", | ||||||
| 	wield_image = "mesecons_piston_top.png", | 	wield_image = "mesecons_piston_top.png", | ||||||
| @@ -604,12 +604,12 @@ local pistonspec_sticky_down = { | |||||||
| -- offstate | -- offstate | ||||||
| minetest.register_node("mesecons_pistons:piston_down_sticky_off", { | minetest.register_node("mesecons_pistons:piston_down_sticky_off", { | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_pusher_front_sticky.png", | 		"mesecons_piston_pusher_front_sticky.png", | ||||||
| 		"mesecons_piston_left.png^[transformR90",  | 		"mesecons_piston_left.png^[transformR90", | ||||||
| 		"mesecons_piston_right.png^[transformR270",  | 		"mesecons_piston_right.png^[transformR270", | ||||||
| 		"mesecons_piston_bottom.png^[transformR180",  | 		"mesecons_piston_bottom.png^[transformR180", | ||||||
| 		"mesecons_piston_top.png",  | 		"mesecons_piston_top.png", | ||||||
| 		}, | 		}, | ||||||
| 	inventory_image = "mesecons_piston_top.png", | 	inventory_image = "mesecons_piston_top.png", | ||||||
| 	wield_image = "mesecons_piston_top.png", | 	wield_image = "mesecons_piston_top.png", | ||||||
| @@ -628,12 +628,12 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_off", { | |||||||
| minetest.register_node("mesecons_pistons:piston_down_sticky_on", { | minetest.register_node("mesecons_pistons:piston_down_sticky_on", { | ||||||
| 	drawtype = "nodebox", | 	drawtype = "nodebox", | ||||||
| 	tiles = { | 	tiles = { | ||||||
| 		"mesecons_piston_back.png",  | 		"mesecons_piston_back.png", | ||||||
| 		"mesecons_piston_on_front.png", | 		"mesecons_piston_on_front.png", | ||||||
| 		"mesecons_piston_left.png^[transformR90",  | 		"mesecons_piston_left.png^[transformR90", | ||||||
| 		"mesecons_piston_right.png^[transformR270",  | 		"mesecons_piston_right.png^[transformR270", | ||||||
| 		"mesecons_piston_bottom.png^[transformR180",  | 		"mesecons_piston_bottom.png^[transformR180", | ||||||
| 		"mesecons_piston_top.png",  | 		"mesecons_piston_top.png", | ||||||
| 		}, | 		}, | ||||||
| 	inventory_image = "mesecons_piston_top.png", | 	inventory_image = "mesecons_piston_top.png", | ||||||
| 	wield_image = "mesecons_piston_top.png", | 	wield_image = "mesecons_piston_top.png", | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| rcvboxes = { | rcvboxes = { | ||||||
| 	{ -3/16, -3/16, -8/16       , 3/16,  3/16  , -13/32       }, -- the smaller bump	 | 	{ -3/16, -3/16, -8/16       , 3/16,  3/16  , -13/32       }, -- the smaller bump | ||||||
| 	{ -1/32, -1/32, -3/2        , 1/32,  1/32  , -1/2         }, -- the wire through the block | 	{ -1/32, -1/32, -3/2        , 1/32,  1/32  , -1/2         }, -- the wire through the block | ||||||
| 	{ -2/32, -1/2 , -.5         , 2/32,  0     , -.5002+3/32  }, -- the vertical wire bit | 	{ -2/32, -1/2 , -.5         , 2/32,  0     , -.5002+3/32  }, -- the vertical wire bit | ||||||
| 	{ -2/32, -1/2 , -7/16+0.002 , 2/32,  -14/32,  16/32+0.001 }  -- the horizontal wire | 	{ -2/32, -1/2 , -7/16+0.002 , 2/32,  -14/32,  16/32+0.001 }  -- the horizontal wire | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user