From d4b32d5fa332fe2d3aec8a433bcde3abb80406ff Mon Sep 17 00:00:00 2001 From: thetaepsilon-gamedev Date: Thu, 19 Oct 2017 21:41:04 +0100 Subject: default_settings.lua: document pressure logic settings --- default_settings.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'default_settings.lua') diff --git a/default_settings.lua b/default_settings.lua index 91e511c..5073b7d 100644 --- a/default_settings.lua +++ b/default_settings.lua @@ -29,6 +29,25 @@ local settings = { delete_item_on_clearobject = true, } +-- documentation for toggles controlling pressure logic features +-- do not edit this; +-- instead, copy the uncommented lines into pipeworks_settings.txt in your world directory. +--[[ +-- enable pressure logic mode instead of "classic" mode. +-- WARNING: this changes a few things, most noticeably how pumps work. +-- you'll want to make sure they're fed by an infinite spring. +pipeworks.toggles.pressure_logic = true + +-- force-enable finite water handling mode. +-- this changes the way that water node placement is handled; +-- 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 either true or false, +-- unless the mod you want this for is not covered by autodetect-finite-water.lua. +-- please file an issue if you need to use this for a finite water mod exists not covered there. +pipeworks.toggles.finite_water = nil +]] + for name, value in pairs(settings) do local setting_type = type(value) if setting_type == "boolean" then -- cgit v1.2.3 From 86fa342d85bb589e54ac8ec2b8c14d14c8843c09 Mon Sep 17 00:00:00 2001 From: thetaepsilon-gamedev Date: Thu, 19 Oct 2017 21:51:55 +0100 Subject: default_settings.lua: line wrap length fixes for pressure logic toggle documentation --- default_settings.lua | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'default_settings.lua') diff --git a/default_settings.lua b/default_settings.lua index 5073b7d..c211153 100644 --- a/default_settings.lua +++ b/default_settings.lua @@ -29,9 +29,10 @@ local settings = { delete_item_on_clearobject = true, } --- documentation for toggles controlling pressure logic features --- do not edit this; --- instead, copy the uncommented lines into pipeworks_settings.txt in your world directory. +-- documentation for toggles controlling pressure logic features. +-- do not edit this file directly; +-- instead, create pipeworks_settings.txt in your world directory, +-- and copy the uncommented lines from the block comment below into it. --[[ -- enable pressure logic mode instead of "classic" mode. -- WARNING: this changes a few things, most noticeably how pumps work. @@ -40,11 +41,15 @@ pipeworks.toggles.pressure_logic = true -- force-enable finite water handling mode. -- this changes the way that water node placement is handled; --- 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 either true or false, --- unless the mod you want this for is not covered by autodetect-finite-water.lua. --- please file an issue if you need to use this for a finite water mod exists not covered there. +-- 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 pipeworks.toggles.finite_water = nil ]] -- cgit v1.2.3 From 75978a020751ce5591d0fd0b8adeaa32422b2fe5 Mon Sep 17 00:00:00 2001 From: thetaepsilon-gamedev Date: Fri, 20 Oct 2017 22:46:51 +0100 Subject: refactor pressure logic toggle to act as option enum --- default_settings.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'default_settings.lua') diff --git a/default_settings.lua b/default_settings.lua index c211153..7d8bfd9 100644 --- a/default_settings.lua +++ b/default_settings.lua @@ -29,16 +29,22 @@ local settings = { delete_item_on_clearobject = true, } +pipeworks.toggles = {} -- documentation for toggles controlling pressure logic features. -- do not edit this file directly; -- instead, create pipeworks_settings.txt in your world directory, --- and copy the uncommented lines from the block comment below into it. +-- 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" --[[ --- enable pressure logic mode instead of "classic" mode. --- WARNING: this changes a few things, most noticeably how pumps work. --- you'll want to make sure they're fed by an infinite spring. -pipeworks.toggles.pressure_logic = true - -- force-enable finite water handling mode. -- this changes the way that water node placement is handled; -- volume will always be preserved, -- cgit v1.2.3