Version MFF.
							
								
								
									
										0
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										9
									
								
								autocrafter.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -183,7 +183,14 @@ local function update_meta(meta, enabled) | ||||
| 			default.gui_bg_img.. | ||||
| 			default.gui_slots.. | ||||
| 			default.get_hotbar_bg(0,7) .. | ||||
| 			"list[current_player;main;0,7;8,4;]") | ||||
| 			"list[current_player;main;0,7;8,4;]" .. | ||||
| 			"listring[current_player;main]".. | ||||
| 			"listring[context;src]" .. | ||||
| 			"listring[context;dst]" .. | ||||
| 			"listring[current_player;main]".. | ||||
| 			"listring[context;recipe]" .. | ||||
| 			"listring[context;output]" | ||||
| 			) | ||||
|  | ||||
| 	-- toggling the button doesn't quite call for running a recipe change check | ||||
| 	-- so instead we run a minimal version for infotext setting only | ||||
|   | ||||
							
								
								
									
										0
									
								
								autoplace_pipes.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								autoplace_tubes.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								changelog.txt
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								common.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								compat.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								crafts.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								decorative_tubes.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								default_settings.txt
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								depends.txt
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										26
									
								
								devices.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -35,6 +35,8 @@ local pipes_devicelist = { | ||||
| 	"storage_tank_10" | ||||
| } | ||||
|  | ||||
| local rules = pipeworks.mesecons_rules -- Enough with the undefined global variable // MFF (Mg|01/07/2016 for #68) | ||||
|  | ||||
| -- Now define the nodes. | ||||
|  | ||||
| local states = { "on", "off" } | ||||
| @@ -67,10 +69,10 @@ for s in ipairs(states) do | ||||
| 		drop = "pipeworks:pump_off", | ||||
| 		mesecons = {effector = { | ||||
| 			action_on = function (pos, node) | ||||
| 				minetest.add_node(pos,{name="pipeworks:pump_on", param2 = node.param2})  | ||||
| 				minetest.add_node(pos,{name="pipeworks:pump_on", param2 = node.param2}) | ||||
| 			end, | ||||
| 			action_off = function (pos, node) | ||||
| 				minetest.add_node(pos,{name="pipeworks:pump_off", param2 = node.param2})  | ||||
| 				minetest.add_node(pos,{name="pipeworks:pump_off", param2 = node.param2}) | ||||
| 			end | ||||
| 		}}, | ||||
| 		on_punch = function(pos, node, puncher) | ||||
| @@ -78,7 +80,7 @@ for s in ipairs(states) do | ||||
| 			minetest.add_node(pos, { name = "pipeworks:pump_"..states[3-s], param2 = fdir }) | ||||
| 		end | ||||
| 	}) | ||||
| 	 | ||||
|  | ||||
| 	minetest.register_node("pipeworks:valve_"..states[s].."_empty", { | ||||
| 		description = "Valve", | ||||
| 		drawtype = "mesh", | ||||
| @@ -107,10 +109,10 @@ for s in ipairs(states) do | ||||
| 	drop = "pipeworks:valve_off_empty", | ||||
| 		mesecons = {effector = { | ||||
| 			action_on = function (pos, node) | ||||
| 				minetest.add_node(pos,{name="pipeworks:valve_on_empty", param2 = node.param2})  | ||||
| 				minetest.add_node(pos,{name="pipeworks:valve_on_empty", param2 = node.param2}) | ||||
| 			end, | ||||
| 			action_off = function (pos, node) | ||||
| 				minetest.add_node(pos,{name="pipeworks:valve_off_empty", param2 = node.param2})  | ||||
| 				minetest.add_node(pos,{name="pipeworks:valve_off_empty", param2 = node.param2}) | ||||
| 			end | ||||
| 		}}, | ||||
| 		on_punch = function(pos, node, puncher) | ||||
| @@ -148,10 +150,10 @@ minetest.register_node("pipeworks:valve_on_loaded", { | ||||
| 	drop = "pipeworks:valve_off_empty", | ||||
| 	mesecons = {effector = { | ||||
| 		action_on = function (pos, node) | ||||
| 			minetest.add_node(pos,{name="pipeworks:valve_on_empty", param2 = node.param2})  | ||||
| 			minetest.add_node(pos,{name="pipeworks:valve_on_empty", param2 = node.param2}) | ||||
| 		end, | ||||
| 		action_off = function (pos, node) | ||||
| 			minetest.add_node(pos,{name="pipeworks:valve_off_empty", param2 = node.param2})  | ||||
| 			minetest.add_node(pos,{name="pipeworks:valve_off_empty", param2 = node.param2}) | ||||
| 		end | ||||
| 	}}, | ||||
| 	on_punch = function(pos, node, puncher) | ||||
| @@ -284,7 +286,7 @@ minetest.register_node("pipeworks:entry_panel_empty", { | ||||
| 	collision_box = panel_cbox, | ||||
| 	on_place = function(itemstack, placer, pointed_thing) | ||||
| 		local playername = placer:get_player_name() | ||||
| 		if not minetest.is_protected(pointed_thing.under, playername)  | ||||
| 		if not minetest.is_protected(pointed_thing.under, playername) | ||||
| 		   and not minetest.is_protected(pointed_thing.above, playername) then | ||||
| 			local node = minetest.get_node(pointed_thing.under) | ||||
|  | ||||
| @@ -376,7 +378,7 @@ minetest.register_node("pipeworks:flow_sensor_empty", { | ||||
| 	end, | ||||
| 	on_construct = function(pos) | ||||
| 		if mesecon then | ||||
| 			mesecon.receptor_off(pos, rules)  | ||||
| 			mesecon.receptor_off(pos, rules) | ||||
| 		end | ||||
| 	end, | ||||
| 	selection_box = { | ||||
| @@ -415,7 +417,7 @@ minetest.register_node("pipeworks:flow_sensor_loaded", { | ||||
| 	end, | ||||
| 	on_construct = function(pos) | ||||
| 		if mesecon then | ||||
| 			mesecon.receptor_on(pos, rules)  | ||||
| 			mesecon.receptor_on(pos, rules) | ||||
| 		end | ||||
| 	end, | ||||
| 	selection_box = { | ||||
| @@ -522,7 +524,7 @@ minetest.register_node("pipeworks:fountainhead", { | ||||
| 	end, | ||||
| 	on_construct = function(pos) | ||||
| 		if mesecon then | ||||
| 			mesecon.receptor_on(pos, rules)  | ||||
| 			mesecon.receptor_on(pos, rules) | ||||
| 		end | ||||
| 	end, | ||||
| 	selection_box = { | ||||
| @@ -553,7 +555,7 @@ minetest.register_node("pipeworks:fountainhead_pouring", { | ||||
| 	end, | ||||
| 	on_construct = function(pos) | ||||
| 		if mesecon then | ||||
| 			mesecon.receptor_on(pos, rules)  | ||||
| 			mesecon.receptor_on(pos, rules) | ||||
| 		end | ||||
| 	end, | ||||
| 	selection_box = { | ||||
|   | ||||
							
								
								
									
										14
									
								
								filter-injector.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -45,7 +45,8 @@ local function set_filter_formspec(data, meta) | ||||
| 				 "Sequence slots Randomly", | ||||
| 				 "Sequence slots by Rotation"}).. | ||||
| 			exmatch_button.. | ||||
| 			"list[current_player;main;0,4.5;8,4;]" | ||||
| 			"list[current_player;main;0,4.5;8,4;]" .. | ||||
| 			"listring[]" | ||||
| 	end | ||||
| 	meta:set_string("formspec", formspec) | ||||
| end | ||||
| @@ -143,6 +144,17 @@ local function punch_filter(data, filtpos, filtnode, msg) | ||||
| 	local dir = minetest.facedir_to_right_dir(filtnode.param2) | ||||
| 	local frompos = vector.subtract(filtpos, dir) | ||||
| 	local fromnode = minetest.get_node(frompos) | ||||
|  | ||||
| 	-- Fix crash with connected_chests (sys4 fix for MFF) | ||||
| 	if fromnode and fromnode.name == "connected_chests:chest_right" then | ||||
| 		local v_mul = vector.multiply(dir, 2) | ||||
| 		frompos = vector.subtract(filtpos, v_mul) | ||||
| 		fromnode = minetest.get_node(frompos) | ||||
| 		if fromnode and fromnode.name ~= "connected_chests:chest_left" then | ||||
| 			return | ||||
| 		end | ||||
| 	end | ||||
| 	 | ||||
| 	if not fromnode then return end | ||||
| 	local fromdef = minetest.registered_nodes[fromnode.name] | ||||
| 	if not fromdef then return end | ||||
|   | ||||
							
								
								
									
										12
									
								
								flowing_logic.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -46,8 +46,8 @@ pipeworks.check_for_inflows = function(pos,node) | ||||
| 			source = {x=coords[i].x,y=coords[i].y,z=coords[i].z} | ||||
| 		end | ||||
| 	end | ||||
| 	if newnode then  | ||||
| 		minetest.add_node(pos,{name=newnode, param2 = node.param2})  | ||||
| 	if newnode then | ||||
| 		minetest.add_node(pos,{name=newnode, param2 = node.param2}) | ||||
| 		minetest.get_meta(pos):set_string("source",minetest.pos_to_string(source)) | ||||
| 	end | ||||
| end | ||||
| @@ -61,15 +61,15 @@ pipeworks.check_sources = function(pos,node) | ||||
| 		newnode = string.gsub(node.name,"loaded","empty") | ||||
| 	end | ||||
|  | ||||
| 	if newnode then  | ||||
| 		minetest.add_node(pos,{name=newnode, param2 = node.param2})  | ||||
| 	if newnode then | ||||
| 		minetest.add_node(pos,{name=newnode, param2 = node.param2}) | ||||
| 		minetest.get_meta(pos):set_string("source","") | ||||
| 	end | ||||
| end | ||||
|  | ||||
| pipeworks.spigot_check = function(pos, node) | ||||
| 	local belowname = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name | ||||
| 	if belowname and (belowname == "air" or belowname == "default:water_flowing" or belowname == "default:water_source") then  | ||||
| 	if belowname and (belowname == "air" or belowname == "default:water_flowing" or belowname == "default:water_source") then | ||||
| 		local spigotname = minetest.get_node(pos).name | ||||
| 		local fdir=node.param2 % 4 | ||||
| 		local check = { | ||||
| @@ -99,7 +99,7 @@ end | ||||
|  | ||||
| pipeworks.fountainhead_check = function(pos, node) | ||||
| 	local abovename = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}).name | ||||
| 	if abovename and (abovename == "air" or abovename == "default:water_flowing" or abovename == "default:water_source") then  | ||||
| 	if abovename and (abovename == "air" or abovename == "default:water_flowing" or abovename == "default:water_source") then | ||||
| 		local fountainhead_name = minetest.get_node(pos).name | ||||
| 		local near_node = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}) | ||||
| 		if near_node and string.find(near_node.name, "_loaded") then | ||||
|   | ||||
							
								
								
									
										2
									
								
								init.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -113,5 +113,5 @@ if pipeworks.enable_autocrafter then dofile(pipeworks.modpath.."/autocrafter.lua | ||||
|  | ||||
| minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty") | ||||
|  | ||||
| print("Pipeworks loaded!") | ||||
| minetest.log("Pipeworks loaded!") | ||||
|  | ||||
|   | ||||
							
								
								
									
										2
									
								
								item_transport.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -252,7 +252,7 @@ luaentity.register_entity("pipeworks:tubed_item", { | ||||
| 					-- Using add_item instead of item_drop since this makes pipeworks backward | ||||
| 					-- compatible with Minetest 0.4.13. | ||||
| 					-- Using item_drop here makes Minetest 0.4.13 crash. | ||||
| 					minetest.add_item(drop_pos, stack) | ||||
| 					--minetest.add_item(drop_pos, stack) --Don't drop pipeworks items to reduce lag. | ||||
| 					self:remove() | ||||
| 					return | ||||
| 				end | ||||
|   | ||||
							
								
								
									
										6
									
								
								legacy.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -1,5 +1,5 @@ | ||||
|  | ||||
| if not minetest.get_modpath("auto_tree_tap") and  | ||||
| if not minetest.get_modpath("auto_tree_tap") and | ||||
|   minetest.get_modpath("technic") then | ||||
|  | ||||
| 	minetest.register_abm({ | ||||
| @@ -37,10 +37,10 @@ if not minetest.get_modpath("auto_tree_tap") and | ||||
| 		after_place_node = function (pos, placer) | ||||
| 			pipeworks.scan_for_tube_objects(pos, placer) | ||||
| 			local placer_pos = placer:getpos() | ||||
| 		 | ||||
|  | ||||
| 			--correct for the player's height | ||||
| 			if placer:is_player() then placer_pos.y = placer_pos.y + 1.5 end | ||||
| 		 | ||||
|  | ||||
| 			--correct for 6d facedir | ||||
| 			if placer_pos then | ||||
| 				local dir = { | ||||
|   | ||||
							
								
								
									
										48
									
								
								luaentity.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -29,7 +29,7 @@ local function read_entities() | ||||
| end | ||||
|  | ||||
| local function write_entities() | ||||
| 	for _, entity in pairs(luaentity.entities) do | ||||
| 	for _, entity in pairs(luaentity.entities or {}) do | ||||
| 		setmetatable(entity, nil) | ||||
| 		for _, attached in pairs(entity._attached_entities) do | ||||
| 			if attached.entity then | ||||
| @@ -53,31 +53,29 @@ end | ||||
|  | ||||
| local active_blocks = {} -- These only contain active blocks near players (i.e., not forceloaded ones) | ||||
| local handle_active_blocks_step = 2 | ||||
| local handle_active_blocks_timer = 0 | ||||
| minetest.register_globalstep(function(dtime) | ||||
| 	handle_active_blocks_timer = handle_active_blocks_timer + dtime | ||||
| 	if handle_active_blocks_timer >= handle_active_blocks_step then | ||||
| 		handle_active_blocks_timer = handle_active_blocks_timer - handle_active_blocks_step | ||||
| 		local active_block_range = tonumber(minetest.setting_get("active_block_range")) or 2 | ||||
| 		local new_active_blocks = {} | ||||
| 		for _, player in ipairs(minetest.get_connected_players()) do | ||||
| 			local blockpos = get_blockpos(player:getpos()) | ||||
| 			local minp = vector.subtract(blockpos, active_block_range) | ||||
| 			local maxp = vector.add(blockpos, active_block_range) | ||||
| local function active_blocks_step() | ||||
| 	local active_block_range = tonumber(minetest.setting_get("active_block_range")) or 2 | ||||
| 	local new_active_blocks = {} | ||||
| 	for _, player in ipairs(minetest.get_connected_players()) do | ||||
| 		local blockpos = get_blockpos(player:getpos()) | ||||
| 		local minp = vector.subtract(blockpos, active_block_range) | ||||
| 		local maxp = vector.add(blockpos, active_block_range) | ||||
|  | ||||
| 			for x = minp.x, maxp.x do | ||||
| 			for y = minp.y, maxp.y do | ||||
| 			for z = minp.z, maxp.z do | ||||
| 				local pos = {x = x, y = y, z = z} | ||||
| 				new_active_blocks[minetest.hash_node_position(pos)] = pos | ||||
| 			end | ||||
| 			end | ||||
| 			end | ||||
| 		for x = minp.x, maxp.x do | ||||
| 		for y = minp.y, maxp.y do | ||||
| 		for z = minp.z, maxp.z do | ||||
| 			local pos = {x = x, y = y, z = z} | ||||
| 			new_active_blocks[minetest.hash_node_position(pos)] = pos | ||||
| 		end | ||||
| 		end | ||||
| 		end | ||||
| 		active_blocks = new_active_blocks | ||||
| 		-- todo: callbacks on block load/unload | ||||
| 	end | ||||
| end) | ||||
| 	active_blocks = new_active_blocks | ||||
| 	-- todo: callbacks on block load/unload | ||||
|  | ||||
| 	minetest.after(handle_active_blocks_step, active_blocks_step) | ||||
| end | ||||
| minetest.after(0, active_blocks_step) | ||||
|  | ||||
| local function is_active(pos) | ||||
| 	return active_blocks[minetest.hash_node_position(get_blockpos(pos))] ~= nil | ||||
| @@ -194,7 +192,7 @@ local entitydef_default = { | ||||
| 		end | ||||
| 	end, | ||||
| 	getvelocity = function(self) | ||||
| 		return vector.new(self._velocity)	 | ||||
| 		return vector.new(self._velocity) | ||||
| 	end, | ||||
| 	setvelocity = function(self, velocity) | ||||
| 		self._velocity = vector.new(velocity) | ||||
| @@ -272,7 +270,7 @@ function luaentity.add_entity(pos, name) | ||||
| 		_acceleration = {x = 0, y = 0, z = 0}, | ||||
| 		_attached_entities = {}, | ||||
| 	} | ||||
| 	 | ||||
|  | ||||
| 	local prototype = luaentity.registered_entities[name] | ||||
| 	setmetatable(entity, prototype) -- Default to prototype for other methods | ||||
| 	luaentity.entities[index] = entity | ||||
|   | ||||
							
								
								
									
										2
									
								
								models.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -34,7 +34,7 @@ pipeworks.tube_frontstub = { | ||||
|  | ||||
| pipeworks.tube_backstub = { | ||||
| 	{ -9/64, -9/64, -9/64,   9/64, 9/64, 32/64 },	-- tube segment against -Z face | ||||
| }  | ||||
| } | ||||
|  | ||||
| pipeworks.tube_boxes = {pipeworks.tube_leftstub, pipeworks.tube_rightstub, pipeworks.tube_bottomstub, pipeworks.tube_topstub, pipeworks.tube_frontstub, pipeworks.tube_backstub} | ||||
|  | ||||
|   | ||||
							
								
								
									
										0
									
								
								models/pipeworks_entry_panel.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_flow_sensor.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_fountainhead.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_pipe_10.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_pipe_2.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_pipe_3.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_pipe_4.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_pipe_5.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_pipe_6.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_pipe_7.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_pipe_8.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_pipe_9.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_pump.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_spigot.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_spigot_pouring.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_valve_off.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								models/pipeworks_valve_on.obj
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										16
									
								
								pipes.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -9,7 +9,7 @@ local vti = {4, 3, 2, 1, 6, 5} | ||||
| local cconnects = {{}, {1}, {1, 2}, {1, 3}, {1, 3, 5}, {1, 2, 3}, {1, 2, 3, 5}, {1, 2, 3, 4}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5, 6}} | ||||
| for index, connects in ipairs(cconnects) do | ||||
| 	local outsel = {} | ||||
| 	 | ||||
|  | ||||
| 	local jx = 0 | ||||
| 	local jy = 0 | ||||
| 	local jz = 0 | ||||
| @@ -28,7 +28,7 @@ for index, connects in ipairs(cconnects) do | ||||
| 		local v = connects[1] | ||||
| 		v = v-1 + 2*(v%2) -- Opposite side | ||||
| 	end | ||||
| 	 | ||||
|  | ||||
| 	local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1} | ||||
| 	local pipedesc = "Pipe segement".." "..dump(connects).."... You hacker, you." | ||||
| 	local image = nil | ||||
| @@ -38,11 +38,11 @@ for index, connects in ipairs(cconnects) do | ||||
| 		pipedesc = "Pipe segment" | ||||
| 		image = "pipeworks_pipe_inv.png" | ||||
| 	end | ||||
| 	 | ||||
|  | ||||
| 	local outimg_e = { "pipeworks_pipe_plain.png" } | ||||
| 	local outimg_l = { "pipeworks_pipe_plain.png" } | ||||
|  | ||||
| 	if index == 3 then  | ||||
| 	if index == 3 then | ||||
| 		outimg_e = { "pipeworks_pipe_3_empty.png" } | ||||
| 		outimg_l = { "pipeworks_pipe_3_loaded.png" } | ||||
| 	end | ||||
| @@ -82,7 +82,7 @@ for index, connects in ipairs(cconnects) do | ||||
| 			pipeworks.scan_for_pipe_objects(pos) | ||||
| 		end | ||||
| 	}) | ||||
| 	 | ||||
|  | ||||
| 	local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1} | ||||
|  | ||||
| 	minetest.register_node("pipeworks:pipe_"..index.."_loaded", { | ||||
| @@ -112,7 +112,7 @@ for index, connects in ipairs(cconnects) do | ||||
| 			pipeworks.scan_for_pipe_objects(pos) | ||||
| 		end | ||||
| 	}) | ||||
| 	 | ||||
|  | ||||
| 	table.insert(pipes_empty_nodenames, "pipeworks:pipe_"..index.."_empty") | ||||
| 	table.insert(pipes_full_nodenames,  "pipeworks:pipe_"..index.."_loaded") | ||||
| end | ||||
| @@ -206,7 +206,7 @@ minetest.register_abm({ | ||||
| 	nodenames = {"pipeworks:spigot","pipeworks:spigot_pouring"}, | ||||
| 	interval = 1, | ||||
| 	chance = 1, | ||||
| 	action = function(pos, node, active_object_count, active_object_count_wider)  | ||||
| 	action = function(pos, node, active_object_count, active_object_count_wider) | ||||
| 		pipeworks.spigot_check(pos,node) | ||||
| 	end | ||||
| }) | ||||
| @@ -215,7 +215,7 @@ minetest.register_abm({ | ||||
| 	nodenames = {"pipeworks:fountainhead","pipeworks:fountainhead_pouring"}, | ||||
| 	interval = 1, | ||||
| 	chance = 1, | ||||
| 	action = function(pos, node, active_object_count, active_object_count_wider)  | ||||
| 	action = function(pos, node, active_object_count, active_object_count_wider) | ||||
| 		pipeworks.fountainhead_check(pos,node) | ||||
| 	end | ||||
| }) | ||||
|   | ||||
							
								
								
									
										0
									
								
								routing_tubes.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										2
									
								
								signal_tubes.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -1,5 +1,5 @@ | ||||
| if pipeworks.enable_detector_tube then | ||||
| 	local detector_tube_step = 2 * tonumber(minetest.setting_get("dedicated_server_step")) | ||||
| 	local detector_tube_step = 1 --MFF crabman(2/1/2016 bug,step too short) 2 * tonumber(minetest.setting_get("dedicated_server_step")) | ||||
| 	pipeworks.register_tube("pipeworks:detector_tube_on", { | ||||
| 			description = "Detecting Pneumatic Tube Segment on (you hacker you)", | ||||
| 			inventory_image = "pipeworks_detector_tube_inv.png", | ||||
|   | ||||
							
								
								
									
										0
									
								
								sorting_tubes.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										2
									
								
								teleport_tube.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -173,7 +173,7 @@ pipeworks.register_tube("pipeworks:teleport_tube", { | ||||
| 					if mode == ":" then | ||||
| 						minetest.chat_send_player(sender_name, "Sorry, channel '"..new_channel.."' is reserved for exclusive use by "..name) | ||||
| 						return | ||||
| 				 | ||||
|  | ||||
| 					--channels starting with '[name];' can be used by other players, but cannot be received from | ||||
| 					elseif mode == ";" and (fields.cr1 or (can_receive ~= 0 and not fields.cr0)) then | ||||
| 						minetest.chat_send_player(sender_name, "Sorry, receiving from channel '"..new_channel.."' is reserved for "..name) | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								textures/homedecor_oil_extract.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 285 B After Width: | Height: | Size: 289 B | 
							
								
								
									
										0
									
								
								textures/homedecor_paraffin.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 345 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/homedecor_plastic_sheeting.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 293 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_accelerator_tube_end.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_accelerator_tube_inv.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 665 B After Width: | Height: | Size: 665 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_accelerator_tube_noctr.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_accelerator_tube_plain.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_accelerator_tube_short.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 661 B After Width: | Height: | Size: 661 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_autocrafter.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 140 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_black.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 83 B After Width: | Height: | Size: 83 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_blue.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 83 B After Width: | Height: | Size: 83 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_button_interm.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_button_off.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_button_on.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_conductor_tube_end.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_conductor_tube_inv.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_conductor_tube_noctr.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_conductor_tube_on_end.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_conductor_tube_on_noctr.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_conductor_tube_on_plain.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_conductor_tube_plain.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_conductor_tube_short.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 839 B After Width: | Height: | Size: 839 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_crossing_tube_end.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_crossing_tube_inv.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 535 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_crossing_tube_noctr.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1005 B After Width: | Height: | Size: 1005 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_crossing_tube_plain.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_crossing_tube_short.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 575 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_deployer_back.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 275 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/pipeworks_deployer_bottom.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 801 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_deployer_front_off.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 669 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_deployer_front_on.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/pipeworks_deployer_side.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 823 B After Width: | Height: | Size: 823 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/pipeworks_deployer_side1.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 823 B After Width: | Height: | Size: 823 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/pipeworks_deployer_side2.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 823 B After Width: | Height: | Size: 823 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_deployer_top.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 800 B After Width: | Height: | Size: 800 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_detector_tube_end.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_detector_tube_inv.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 795 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_detector_tube_noctr.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 892 B After Width: | Height: | Size: 892 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_detector_tube_plain.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_detector_tube_short.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_dispenser_back.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_dispenser_bottom.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_dispenser_front_off.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_dispenser_front_on.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_dispenser_side1.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_dispenser_side2.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_dispenser_top.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB | 
							
								
								
									
										
											BIN
										
									
								
								textures/pipeworks_entry_panel.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_filter_input.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_filter_output.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 175 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_filter_side.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B | 
							
								
								
									
										0
									
								
								textures/pipeworks_filter_top.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/pipeworks_flow_sensor_off.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB | 
							
								
								
									
										
											BIN
										
									
								
								textures/pipeworks_flow_sensor_on.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_fountainhead.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_grating_sides.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
							
								
								
									
										0
									
								
								textures/pipeworks_grating_top.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |