Skip to content

Commit

Permalink
Added Pipe Hole Texture toggle setting, for people who may not like t…
Browse files Browse the repository at this point in the history
…he look of the pipe holes.
  • Loading branch information
JamesClarke7283 committed Jan 14, 2024
1 parent 04df87a commit b5f8616
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
3 changes: 1 addition & 2 deletions compat-chests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

-- Pipeworks Specific
local fs_helpers = pipeworks.fs_helpers
local tube_entry = "^pipeworks_tube_connection_wooden.png"
local tube_entry = pipeworks.pipeworks_pipe_holes_wooden_texture

-- Chest Locals
local open_chests = {}
Expand Down Expand Up @@ -300,4 +300,3 @@ elseif minetest.get_modpath("hades_chests") then
minetest.override_item("hades_chests:chest_locked", override_protected)
--minetest.override_item("hades_chests:chest_locked_open", override_protected_open)
end

3 changes: 1 addition & 2 deletions compat-furnaces.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ elseif minetest.get_modpath("hades_furnaces") then
--def_active = table.copy(minetest.registered_nodes["hades_furnaces:furnace_active"])
end

local tube_entry = "^pipeworks_tube_connection_stony.png"
local tube_entry = pipeworks.pipeworks_pipe_holes_stony_texture

local groups = def.groups
groups["tubedevice"] = 1
Expand Down Expand Up @@ -125,4 +125,3 @@ elseif minetest.get_modpath("hades_furnaces") then
minetest.override_item("hades_furnaces:furnace", override)
minetest.override_item("hades_furnaces:furnace_active", override_active)
end

1 change: 1 addition & 0 deletions default_settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ local settings = {
delete_item_on_clearobject = true,
use_real_entities = true,
entity_update_interval = 0,
show_pipe_holes = true,
}

pipeworks.toggles = {}
Expand Down
4 changes: 4 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ pipeworks = {
}

dofile(pipeworks.modpath.."/default_settings.lua")

pipeworks.pipeworks_pipe_holes_wooden_texture = pipeworks.show_pipe_holes and "^pipeworks_tube_connection_wooden.png" or ""
pipeworks.pipeworks_pipe_holes_stony_texture = pipeworks.show_pipe_holes and "^pipeworks_tube_connection_stony.png" or ""

-- Read the external config file if it exists.
local worldsettingspath = pipeworks.worldpath.."/pipeworks_settings.txt"
local worldsettingsfile = io.open(worldsettingspath, "r")
Expand Down
2 changes: 1 addition & 1 deletion mcl_barrels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- pipeworks.

-- Pipeworks Specific
local tube_entry = "^pipeworks_tube_connection_wooden.png"
local tube_entry = pipeworks.pipeworks_pipe_holes_wooden_texture

-- Original Definitions
local old_barrel = table.copy(minetest.registered_items["mcl_barrels:barrel_closed"])
Expand Down
2 changes: 1 addition & 1 deletion mcl_furnaces.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local old_furnace = table.copy(minetest.registered_nodes["mcl_furnaces:furnace"]
local old_blast_furnace = table.copy(minetest.registered_nodes["mcl_blast_furnace:blast_furnace"])
local old_smoker = table.copy(minetest.registered_nodes["mcl_smoker:smoker"])

local tube_entry = "^pipeworks_tube_connection_stony.png"
local tube_entry = pipeworks.pipeworks_pipe_holes_stony_texture

-- groups
local furnace_groups = old_furnace.groups
Expand Down
3 changes: 3 additions & 0 deletions settingtypes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ pipeworks_drop_on_routing_fail (Drop On Routing Fail) bool false
#Delete item on clearobject.
pipeworks_delete_item_on_clearobject (Delete Item On Clearobject) bool true

# Enable Pipe Holes in supported node textures
pipeworks_show_pipe_holes (Enable Pipe Hole Textures) bool true

#Use real visible entities in tubes within active areas.
#When disabled, tubes are made opaque.
pipeworks_use_real_entities (Use Real Entities) bool true
Expand Down

0 comments on commit b5f8616

Please sign in to comment.