From 758d5010b8a6555fc7faedfb06b3d7c0cf3d0c4a Mon Sep 17 00:00:00 2001 From: ezhh Date: Mon, 10 Apr 2017 02:23:00 +0100 Subject: [PATCH] Fire: Disable fire by default in multiplayer --- mods/fire/init.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mods/fire/init.lua b/mods/fire/init.lua index a9ceb9e..2dbf5df 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -292,9 +292,14 @@ minetest.register_abm({ local fire_enabled = minetest.setting_getbool("enable_fire") if fire_enabled == nil then - -- New setting not specified, check for old setting. - -- If old setting is also not specified, 'not nil' is true. - fire_enabled = not minetest.setting_getbool("disable_fire") + -- enable_fire setting not specified, check for disable_fire + local fire_disabled = minetest.setting_getbool("disable_fire") + if fire_disabled == nil then + -- Neither setting specified, check whether singleplayer + fire_enabled = minetest.is_singleplayer() + else + fire_enabled = not fire_disabled + end end if not fire_enabled then