1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-29 23:00:49 +02:00

refactor pressure logic toggle to act as option enum

This commit is contained in:
thetaepsilon-gamedev
2017-10-20 22:46:51 +01:00
parent 538e33c537
commit 75978a0207
5 changed files with 17 additions and 15 deletions

View File

@ -15,17 +15,13 @@ pipeworks.modpath = minetest.get_modpath("pipeworks")
dofile(pipeworks.modpath.."/default_settings.lua")
-- Read the external config file if it exists.
-- please add any new feature toggles to be a flag in this table...
pipeworks.toggles = {}
local worldsettingspath = pipeworks.worldpath.."/pipeworks_settings.txt"
local worldsettingsfile = io.open(worldsettingspath, "r")
if worldsettingsfile then
worldsettingsfile:close()
dofile(worldsettingspath)
end
if pipeworks.toggles.pressure_logic then
if pipeworks.toggles.pipe_mode == "pressure" then
minetest.log("warning", "pipeworks pressure logic mode comes with caveats and differences in behaviour, you have been warned!")
end