2017-04-14 03:13:30 +02:00
|
|
|
-- Various settings
|
|
|
|
|
|
|
|
local prefix = "pipeworks_"
|
|
|
|
|
|
|
|
local settings = {
|
|
|
|
enable_pipes = true,
|
2017-10-26 10:11:30 +02:00
|
|
|
enable_lowpoly = false,
|
2017-04-14 03:13:30 +02:00
|
|
|
enable_autocrafter = true,
|
|
|
|
enable_deployer = true,
|
|
|
|
enable_dispenser = true,
|
|
|
|
enable_node_breaker = true,
|
|
|
|
enable_teleport_tube = true,
|
|
|
|
enable_pipe_devices = true,
|
|
|
|
enable_redefines = true,
|
|
|
|
enable_mese_tube = true,
|
|
|
|
enable_detector_tube = true,
|
|
|
|
enable_digiline_detector_tube = true,
|
|
|
|
enable_conductor_tube = true,
|
2017-09-26 05:19:35 +02:00
|
|
|
enable_digiline_conductor_tube = true,
|
2017-04-14 03:13:30 +02:00
|
|
|
enable_accelerator_tube = true,
|
|
|
|
enable_crossing_tube = true,
|
|
|
|
enable_sand_tube = true,
|
|
|
|
enable_mese_sand_tube = true,
|
|
|
|
enable_one_way_tube = true,
|
|
|
|
enable_priority_tube = true,
|
2017-09-26 05:21:15 +02:00
|
|
|
enable_lua_tube = true,
|
2017-04-14 03:13:30 +02:00
|
|
|
enable_cyclic_mode = true,
|
|
|
|
drop_on_routing_fail = false,
|
|
|
|
delete_item_on_clearobject = true,
|
2022-05-06 17:25:02 +02:00
|
|
|
use_real_entities = true,
|
2022-05-25 01:13:41 +02:00
|
|
|
entity_update_interval = 0,
|
2017-04-14 03:13:30 +02:00
|
|
|
}
|
|
|
|
|
2017-10-20 23:46:51 +02:00
|
|
|
pipeworks.toggles = {}
|
2017-10-19 22:51:55 +02:00
|
|
|
-- documentation for toggles controlling pressure logic features.
|
|
|
|
-- do not edit this file directly;
|
|
|
|
-- instead, create pipeworks_settings.txt in your world directory,
|
2017-10-20 23:46:51 +02:00
|
|
|
-- and copy the uncommented lines from the block comments below into it.
|
|
|
|
--[[
|
|
|
|
-- flow logic implementation.
|
|
|
|
-- set to one of the following strings.
|
|
|
|
-- "classic": classic mode written by VanessaE
|
|
|
|
-- "pressure": pressure metadata based, written by thetaepsilon.
|
|
|
|
-- has caveats such as water speed issues though.
|
|
|
|
-- setting to nil inhibits all flow logic, useful for debugging ABM crashes,
|
|
|
|
-- or for rendering the pipes purely decorative.
|
|
|
|
]]
|
|
|
|
pipeworks.toggles.pipe_mode = "classic"
|
2017-10-19 22:41:04 +02:00
|
|
|
--[[
|
|
|
|
-- force-enable finite water handling mode.
|
|
|
|
-- this changes the way that water node placement is handled;
|
2017-10-19 22:51:55 +02:00
|
|
|
-- volume will always be preserved,
|
|
|
|
-- and water is assumed to move itself downwards.
|
|
|
|
-- nil (the default) means autodetect from installed finite liquid mods,
|
|
|
|
-- true is force-on, false is force-off.
|
|
|
|
-- note that you should NOT normally explicitly set this to true/false,
|
|
|
|
-- unless the mod you want this for is not covered by auto-detection
|
|
|
|
-- (please see autodetect-finite-water.lua).
|
|
|
|
-- please file an issue if you have a finite water mod not covered there,
|
|
|
|
-- and feel it necessary to explicitly set this toggle
|
2017-10-19 22:41:04 +02:00
|
|
|
pipeworks.toggles.finite_water = nil
|
|
|
|
]]
|
|
|
|
|
2017-04-14 03:13:30 +02:00
|
|
|
for name, value in pairs(settings) do
|
|
|
|
local setting_type = type(value)
|
|
|
|
if setting_type == "boolean" then
|
2022-05-25 01:13:41 +02:00
|
|
|
pipeworks[name] = minetest.settings:get_bool(prefix..name, value)
|
|
|
|
elseif setting_type == "number" then
|
|
|
|
pipeworks[name] = tonumber(minetest.settings:get(prefix..name) or value)
|
2017-04-14 03:13:30 +02:00
|
|
|
else
|
|
|
|
pipeworks[name] = value
|
|
|
|
end
|
|
|
|
end
|