diff options
-rw-r--r-- | attic/deployer.lua (renamed from deployer.lua) | 1 | ||||
-rw-r--r-- | attic/node_breaker.lua (renamed from node_breaker.lua) | 0 | ||||
-rw-r--r-- | autocrafter.lua | 3 | ||||
-rw-r--r-- | crafts.lua | 9 | ||||
-rw-r--r-- | devices.lua | 4 | ||||
-rw-r--r-- | init.lua | 12 | ||||
-rw-r--r-- | item_transport.lua | 17 | ||||
-rw-r--r-- | oldpipes.lua | 4 | ||||
-rw-r--r-- | textures/pipeworks_autocrafter.png | bin | 167 -> 253 bytes | |||
-rw-r--r-- | textures/pipeworks_filter_input.png | bin | 12686 -> 408 bytes | |||
-rw-r--r-- | textures/pipeworks_filter_output.png | bin | 13205 -> 327 bytes | |||
-rw-r--r-- | textures/pipeworks_filter_side.png | bin | 13194 -> 441 bytes | |||
-rw-r--r-- | textures/pipeworks_filter_top.png | bin | 13137 -> 460 bytes | |||
-rw-r--r-- | textures/pipeworks_mese_filter_input.png | bin | 12120 -> 387 bytes | |||
-rw-r--r-- | textures/pipeworks_mese_filter_output.png | bin | 12894 -> 300 bytes | |||
-rw-r--r-- | textures/pipeworks_mese_filter_side.png | bin | 12700 -> 431 bytes | |||
-rw-r--r-- | textures/pipeworks_mese_filter_top.png | bin | 12677 -> 436 bytes | |||
-rw-r--r-- | tubes.lua | 4 |
18 files changed, 42 insertions, 12 deletions
diff --git a/deployer.lua b/attic/deployer.lua index a57a895..fdb4b15 100644 --- a/deployer.lua +++ b/attic/deployer.lua @@ -47,6 +47,7 @@ deployer_on = function(pos, node) local placer={} function placer:get_player_name() return "deployer" end function placer:getpos() return pos end + function placer:get_player_control() return {jump=false,right=false,left=false,LMB=false,RMB=false,sneak=false,aux1=false,down=false,up=false} end local stack2=minetest.item_place(stack,placer,{type="node", under=pos1, above=pos2}) invlist[i]=stack2 inv:set_list("main",invlist) diff --git a/node_breaker.lua b/attic/node_breaker.lua index 3af1902..3af1902 100644 --- a/node_breaker.lua +++ b/attic/node_breaker.lua diff --git a/autocrafter.lua b/autocrafter.lua index ba62c79..a28faec 100644 --- a/autocrafter.lua +++ b/autocrafter.lua @@ -11,6 +11,7 @@ function autocraft(inventory) local input=inventory:get_list("input") if result.item:is_empty() then return end result=result.item + if not inventory:room_for_item("dst", result) then return end local to_use={} for _,item in ipairs(recipe) do if item~=nil and not item:is_empty() then @@ -77,4 +78,4 @@ minetest.register_abm({nodenames={"pipeworks:autocrafter"},interval=1,chance=1, local meta=minetest.env:get_meta(pos) local inv=meta:get_inventory() autocraft(inv) - end})
\ No newline at end of file + end}) @@ -85,6 +85,15 @@ minetest.register_craft( { }, }) +minetest.register_craft( { + output = "pipeworks:autocrafter 2", + recipe = { + { "default:steel_ingot", "default:mese", "default:steel_ingot" }, + { "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting" }, + { "default:steel_ingot", "default:mese", "default:steel_ingot" } + }, +}) + -- The tubes themselves diff --git a/devices.lua b/devices.lua index faa1b86..4c8072c 100644 --- a/devices.lua +++ b/devices.lua @@ -329,9 +329,11 @@ for fill = 0, 10 do if fill == 0 then filldesc="empty" sgroups = {snappy=3, pipe=1, tankfill=fill+1} + image = nil else filldesc=fill.."0% full" sgroups = {snappy=3, pipe=1, tankfill=fill+1, not_in_creative_inventory=1} + image = "pipeworks_storage_tank_fittings.png" end minetest.register_node("pipeworks:expansion_tank_"..fill, { @@ -344,6 +346,7 @@ for fill = 0, 10 do "pipeworks_storage_tank_back.png", pipeworks_liquid_texture.."^pipeworks_storage_tank_front_"..fill..".png" }, + inventory_image = image, paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, tankfill=fill+1, not_in_creative_inventory=1}, @@ -374,6 +377,7 @@ for fill = 0, 10 do "pipeworks_storage_tank_back.png", pipeworks_liquid_texture.."^pipeworks_storage_tank_front_"..fill..".png" }, + inventory_image = image, paramtype = "light", paramtype2 = "facedir", groups = sgroups, @@ -248,15 +248,18 @@ for zp = 0, 1 do if pname ~= "110000" then pgroups = {snappy=3, pipe=1, not_in_creative_inventory=1} pipedesc = "Pipe segment (empty, "..pname..")... You hacker, you." + image = "pipeworks_plain.png" else pgroups = {snappy=3, pipe=1} pipedesc = "Pipe segment" + image = nil end minetest.register_node("pipeworks:pipe_"..pname.."_empty", { description = pipedesc, drawtype = "nodebox", tiles = pipes_fix_image_names(outimgs, "_empty"), + inventory_image = image, paramtype = "light", selection_box = { type = "fixed", @@ -287,6 +290,7 @@ for zp = 0, 1 do description = "Pipe segment (loaded, "..pname..")... You hacker, you.", drawtype = "nodebox", tiles = pipes_fix_image_names(outimgs, "_loaded"), + inventory_image = image, paramtype = "light", selection_box = { type = "fixed", @@ -329,6 +333,10 @@ dofile(minetest.get_modpath("pipeworks").."/flowing_logic.lua") dofile(minetest.get_modpath("pipeworks").."/compat.lua") dofile(minetest.get_modpath("pipeworks").."/item_transport.lua") dofile(minetest.get_modpath("pipeworks").."/autocrafter.lua") -dofile(minetest.get_modpath("pipeworks").."/deployer.lua") -dofile(minetest.get_modpath("pipeworks").."/node_breaker.lua") + +minetest.register_alias("pipeworks:deployer_off", "technic:deployer_off") +minetest.register_alias("pipeworks:deployer_on", "technic:deployer_on") +minetest.register_alias("pipeworks:nodebreaker_off", "technic:node_breaker_off") +minetest.register_alias("pipeworks:nodebreaker_on", "technic:node_breaker_on") + print("Pipeworks loaded!") diff --git a/item_transport.lua b/item_transport.lua index 305a459..3a9943b 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -18,9 +18,9 @@ minetest.register_node("pipeworks:filter", { on_construct = function(pos) local meta = minetest.env:get_meta(pos) meta:set_string("formspec", - "invsize[9,9;]".. - "list[current_name;main;0,2;8,2;]".. - "list[current_player;main;0,5;8,4;]") + "invsize[8,6.5;]".. + "list[current_name;main;0,0;8,2;]".. + "list[current_player;main;0,2.5;8,4;]") meta:set_string("infotext", "Filter") local inv = meta:get_inventory() inv:set_size("main", 8*4) @@ -30,6 +30,9 @@ minetest.register_node("pipeworks:filter", { local inv = meta:get_inventory() return inv:is_empty("main") end, + after_place_node = function(pos) + tube_scanforobjects(pos) + end, mesecons={effector={action_on=function(pos,node) minetest.registered_nodes[node.name].on_punch(pos,node,nil) end}}, @@ -110,9 +113,9 @@ minetest.register_node("pipeworks:mese_filter", { on_construct = function(pos) local meta = minetest.env:get_meta(pos) meta:set_string("formspec", - "invsize[9,9;]".. - "list[current_name;main;0,2;8,2;]".. - "list[current_player;main;0,5;8,4;]") + "invsize[8,6.5;]".. + "list[current_name;main;0,0;8,2;]".. + "list[current_player;main;0,2.5;8,4;]") meta:set_string("infotext", "Mese filter") local inv = meta:get_inventory() inv:set_size("main", 8*4) @@ -470,4 +473,4 @@ function go_next(pos,velocity,stack) velocity.z=chests[n].vect.z*speed end return 1 -end
\ No newline at end of file +end diff --git a/oldpipes.lua b/oldpipes.lua index 90c8a27..0892436 100644 --- a/oldpipes.lua +++ b/oldpipes.lua @@ -311,14 +311,17 @@ for node in ipairs(nodenames) do if node ~= 2 then pgroups = {snappy=3, pipe=1, not_in_creative_inventory=1} + image = "pipeworks_plain.png" else pgroups = {snappy=3, pipe=1} + image = nil end minetest.register_node("pipeworks:"..nodenames[node], { description = "Empty Pipe ("..descriptions[node]..")", drawtype = "nodebox", tiles = fix_image_names(node, "_empty"), + inventory_image = image, paramtype = "light", paramtype2 = "facedir", selection_box = { @@ -340,6 +343,7 @@ for node in ipairs(nodenames) do description = "Loaded Pipe ("..descriptions[node]..")", drawtype = "nodebox", tiles = fix_image_names(node, "_loaded"), + inventory_image = image, paramtype = "light", paramtype2 = "facedir", selection_box = { diff --git a/textures/pipeworks_autocrafter.png b/textures/pipeworks_autocrafter.png Binary files differindex ae5f8d9..1d649b3 100644 --- a/textures/pipeworks_autocrafter.png +++ b/textures/pipeworks_autocrafter.png diff --git a/textures/pipeworks_filter_input.png b/textures/pipeworks_filter_input.png Binary files differindex ce532cb..8e029d4 100644 --- a/textures/pipeworks_filter_input.png +++ b/textures/pipeworks_filter_input.png diff --git a/textures/pipeworks_filter_output.png b/textures/pipeworks_filter_output.png Binary files differindex 4b29690..6104ebd 100644 --- a/textures/pipeworks_filter_output.png +++ b/textures/pipeworks_filter_output.png diff --git a/textures/pipeworks_filter_side.png b/textures/pipeworks_filter_side.png Binary files differindex 00fa44d..ff9f751 100644 --- a/textures/pipeworks_filter_side.png +++ b/textures/pipeworks_filter_side.png diff --git a/textures/pipeworks_filter_top.png b/textures/pipeworks_filter_top.png Binary files differindex dca538e..e628188 100644 --- a/textures/pipeworks_filter_top.png +++ b/textures/pipeworks_filter_top.png diff --git a/textures/pipeworks_mese_filter_input.png b/textures/pipeworks_mese_filter_input.png Binary files differindex b8aed3e..8bf19ea 100644 --- a/textures/pipeworks_mese_filter_input.png +++ b/textures/pipeworks_mese_filter_input.png diff --git a/textures/pipeworks_mese_filter_output.png b/textures/pipeworks_mese_filter_output.png Binary files differindex b2ee77a..e6af1c1 100644 --- a/textures/pipeworks_mese_filter_output.png +++ b/textures/pipeworks_mese_filter_output.png diff --git a/textures/pipeworks_mese_filter_side.png b/textures/pipeworks_mese_filter_side.png Binary files differindex 6bdb507..5868a09 100644 --- a/textures/pipeworks_mese_filter_side.png +++ b/textures/pipeworks_mese_filter_side.png diff --git a/textures/pipeworks_mese_filter_top.png b/textures/pipeworks_mese_filter_top.png Binary files differindex 990116e..4ef95b5 100644 --- a/textures/pipeworks_mese_filter_top.png +++ b/textures/pipeworks_mese_filter_top.png @@ -171,7 +171,7 @@ for zp = 0, 1 do if tname ~= "000000" then tgroups = {snappy=3, tube=1, not_in_creative_inventory=1} tubedesc = desc.." ("..tname..")... You hacker, you." - iimg=nil + iimg=plain_textures[1] wscale = {x=1,y=1,z=1} else tgroups = {snappy=3, tube=1} @@ -496,4 +496,4 @@ minetest.register_abm({nodenames={"group:sand_tube"},interval=1,chance=1, end}) modpath=minetest.get_modpath("pipeworks") -dofile(modpath.."/teleport_tube.lua")
\ No newline at end of file +dofile(modpath.."/teleport_tube.lua") |