From 8817918a53854882b57683a00350baca643ec1b4 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Thu, 26 Oct 2017 04:11:30 -0400 Subject: add low-poly mode to enable, set pipeworks_enable_lowpoly = true in minetest.conf --- pipes.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pipes.lua') diff --git a/pipes.lua b/pipes.lua index 602daab..01efef3 100644 --- a/pipes.lua +++ b/pipes.lua @@ -7,6 +7,9 @@ local pipes_full_nodenames = {} local new_flow_logic_register = pipeworks.flowables.register +local polys = "" +if pipeworks.enable_lowpoly then polys = "_lowpoly" end + 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 @@ -49,10 +52,10 @@ for index, connects in ipairs(cconnects) do outimg_l = { "pipeworks_pipe_3_loaded.png" } end - local mesh = "pipeworks_pipe_"..index..".obj" + local mesh = "pipeworks_pipe_"..index..polys..".obj" if index == 1 then - mesh = "pipeworks_pipe_3.obj" + mesh = "pipeworks_pipe_3"..polys..".obj" end minetest.register_node("pipeworks:pipe_"..index.."_empty", { -- cgit v1.2.3 From ee0c276900dd6c15fac3ed21247f31982c206053 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 3 Nov 2017 22:09:25 -0400 Subject: added straight-only pipe (for situations where one might want to run several closely-spaced parallel pipelines) Also fixed a bug where a pipe "entry panel" would report full of water if a pipe next to it (but not connecting) was also full of water Only tested under "classic" flowing logic mode. --- pipes.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'pipes.lua') diff --git a/pipes.lua b/pipes.lua index 01efef3..3132b65 100644 --- a/pipes.lua +++ b/pipes.lua @@ -191,35 +191,32 @@ if REGISTER_COMPATIBILITY then }) end - - local valve_on = "pipeworks:valve_on_empty" local valve_off = "pipeworks:valve_off_empty" local entry_panel_empty = "pipeworks:entry_panel_empty" local flow_sensor_empty = "pipeworks:flow_sensor_empty" +local sp_empty = "pipeworks:straight_pipe_empty" -- XXX: why aren't these in devices.lua!? table.insert(pipes_empty_nodenames, valve_on) table.insert(pipes_empty_nodenames, valve_off) table.insert(pipes_empty_nodenames, entry_panel_empty) table.insert(pipes_empty_nodenames, flow_sensor_empty) +table.insert(pipes_empty_nodenames, sp_empty) local valve_on_loaded = "pipeworks:valve_on_loaded" local entry_panel_loaded = "pipeworks:entry_panel_loaded" local flow_sensor_loaded = "pipeworks:flow_sensor_loaded" +local sp_loaded = "pipeworks:straight_pipe_loaded" table.insert(pipes_full_nodenames, valve_on_loaded) table.insert(pipes_full_nodenames, entry_panel_loaded) table.insert(pipes_full_nodenames, flow_sensor_loaded) +table.insert(pipes_full_nodenames, sp_loaded) pipeworks.pipes_full_nodenames = pipes_full_nodenames pipeworks.pipes_empty_nodenames = pipes_empty_nodenames - - - if pipeworks.toggles.pipe_mode == "classic" then - - minetest.register_abm({ nodenames = pipes_empty_nodenames, interval = 1, -- cgit v1.2.3 From 8fa259c93fbef467822f710a33537a76f608b7cb Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 10 Nov 2017 22:23:01 -0500 Subject: remove regular pipe inventory image --- pipes.lua | 7 ------- 1 file changed, 7 deletions(-) (limited to 'pipes.lua') diff --git a/pipes.lua b/pipes.lua index 3132b65..82fadb1 100644 --- a/pipes.lua +++ b/pipes.lua @@ -36,12 +36,10 @@ for index, connects in ipairs(cconnects) do local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1} local pipedesc = "Pipe segement".." "..dump(connects).."... You hacker, you." - local image = nil if #connects == 0 then pgroups = {snappy = 3, tube = 1} pipedesc = "Pipe segment" - image = "pipeworks_pipe_inv.png" end local outimg_e = { "pipeworks_pipe_plain.png" } @@ -64,8 +62,6 @@ for index, connects in ipairs(cconnects) do mesh = mesh, tiles = outimg_e, sunlight_propagates = true, - inventory_image = image, - wield_image = image, paramtype = "light", paramtype2 = "facedir", selection_box = { @@ -138,8 +134,6 @@ if REGISTER_COMPATIBILITY then drawtype = "airlike", sunlight_propagates = true, paramtype = "light", - inventory_image = "pipeworks_pipe_inv.png", - wield_image = "pipeworks_pipe_inv.png", description = "Pipe Segment (legacy)", groups = {not_in_creative_inventory = 1, pipe_to_update = 1}, drop = "pipeworks:pipe_1_empty", @@ -153,7 +147,6 @@ if REGISTER_COMPATIBILITY then drawtype = "airlike", sunlight_propagates = true, paramtype = "light", - inventory_image = "pipeworks_pipe_inv.png", groups = {not_in_creative_inventory = 1, pipe_to_update = 1}, drop = "pipeworks:pipe_1_empty", after_place_node = function(pos) -- cgit v1.2.3