From 58348b9b4cc13d44424aff1f802f038ab0565966 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 29 Jan 2017 15:28:48 -0700 Subject: [PATCH] Removing strict dependency on the default mod If one should desire to use this mod for liquid in a non-default-dependent game, I've made the dependency on default optional. Note that the only thing this mod does in that case is define an API, all the rest of its features are moot (since they act on default-defined liquids and mapgen clay). --- depends.txt | 2 +- init.lua | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/depends.txt b/depends.txt index 331d858..21c2521 100644 --- a/depends.txt +++ b/depends.txt @@ -1 +1 @@ -default \ No newline at end of file +default? \ No newline at end of file diff --git a/init.lua b/init.lua index 3005962..c394903 100644 --- a/init.lua +++ b/init.lua @@ -68,6 +68,10 @@ dynamic_liquid.liquid_abm = function(liquid, flowing_liquid, chance) }) end +if not minetest.get_modpath("default") then + return +end + local water = minetest.setting_getbool("dynamic_liquid_water") water = water or water == nil -- default true