summaryrefslogtreecommitdiff
path: root/autodetect-finite-water.lua
diff options
context:
space:
mode:
authorthetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com>2017-10-03 20:53:49 +0100
committerthetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com>2017-10-03 20:53:49 +0100
commit750612181a67b9bf4ad4bd01c2d90472e8a41a6d (patch)
tree639ecdf5368fa55496297d0a707a2fe9f9eb1edc /autodetect-finite-water.lua
parent894ea5174fb8c3be9038698cb119b24acbec8cea (diff)
downloadpipeworks-750612181a67b9bf4ad4bd01c2d90472e8a41a6d.tar
pipeworks-750612181a67b9bf4ad4bd01c2d90472e8a41a6d.tar.gz
pipeworks-750612181a67b9bf4ad4bd01c2d90472e8a41a6d.tar.bz2
pipeworks-750612181a67b9bf4ad4bd01c2d90472e8a41a6d.tar.xz
pipeworks-750612181a67b9bf4ad4bd01c2d90472e8a41a6d.zip
add finite water feature toggle and auto-detect code
Diffstat (limited to 'autodetect-finite-water.lua')
-rw-r--r--autodetect-finite-water.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/autodetect-finite-water.lua b/autodetect-finite-water.lua
new file mode 100644
index 0000000..d218e80
--- /dev/null
+++ b/autodetect-finite-water.lua
@@ -0,0 +1,9 @@
+-- enable finite liquid in the presence of dynamic liquid to preserve water volume.
+local enable = false
+
+if minetest.get_modpath("dynamic_liquid") then
+ pipeworks.logger("detected mod dynamic_liquid, enabling finite liquid flag")
+ enable = true
+end
+
+pipeworks.toggles.finite_water = enable