Browse Source

add finite water feature toggle and auto-detect code

tags/20180717
thetaepsilon-gamedev 2 years ago
parent
commit
750612181a
2 changed files with 14 additions and 0 deletions
  1. +9
    -0
      autodetect-finite-water.lua
  2. +5
    -0
      init.lua

+ 9
- 0
autodetect-finite-water.lua View File

@@ -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

+ 5
- 0
init.lua View File

@@ -103,6 +103,11 @@ end
-------------------------------------------
-- Load the various other parts of the mod

-- early auto-detection for finite water mode if not explicitly disabled
if pipeworks.toggles.finite_water == nil then
dofile(pipeworks.modpath.."/autodetect-finite-water.lua")
end

dofile(pipeworks.modpath.."/common.lua")
dofile(pipeworks.modpath.."/models.lua")
dofile(pipeworks.modpath.."/autoplace_pipes.lua")


Loading…
Cancel
Save