From 6c23dadfd483d3baa61c52e81ee828a0d4e677a7 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Sun, 18 Oct 2015 17:24:16 +0200 Subject: [PATCH 1/2] Add settingtypes.txt Rename disable_fire to enable_fire --- minetest.conf.example | 4 ++-- mods/fire/init.lua | 11 +++++++++-- settingtypes.txt | 24 ++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 settingtypes.txt diff --git a/minetest.conf.example b/minetest.conf.example index 0e3c2c55..9a912077 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -9,8 +9,8 @@ # 0 to disable #share_bones_time = 1200 -# Whether fire should be disabled (all fire nodes will instantly disappear) -#disable_fire = false +# Whether fire should be enabled (if disabled, all fire nodes will instantly disappear) +#enable_fire = false # Whether steel tools, torches and cobblestone should be given to new players #give_initial_stuff = false diff --git a/mods/fire/init.lua b/mods/fire/init.lua index f3f6369a..41b3237e 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -129,9 +129,16 @@ function fire.flame_should_extinguish(pos) end --- Enable ABMs according to 'disable fire' setting +-- Enable ABMs according to 'enable fire' setting -if minetest.setting_getbool("disable_fire") then +local fire_enabled = minetest.setting_getbool("enable_fire") +if fire_enabled == nil then + -- Check disable_fire for legacy reasons + -- Check for false explicitly, so fire is enabled by default + fire_enabled = minetest.setting_getbool("disable_fire") == false +end + +if fire_enabled then -- Extinguish flames quickly with dedicated ABM diff --git a/settingtypes.txt b/settingtypes.txt new file mode 100644 index 00000000..e435c100 --- /dev/null +++ b/settingtypes.txt @@ -0,0 +1,24 @@ +# This file contains settings of minetest_game that can be changed in +# minetest.conf + +# In creative mode players are able to dig all kind of blocks nearly instantly, +# and have access to unlimited resources. +creative_mode (Creative mode) bool false + +# Flammable nodes will be ignited by nearby igniters. Spreading fire may cause sever harm. +# All fire nodes with instantly disappear when fire is disabled. +enable_fire (Fire) bool true + +# If enabled, steel tools, torches and cobblestone will be given to new players. +give_initial_stuff (Give initial items) bool false + +# When TNT explodes it destroys nearby nodes, possibl causing a lot of harm on servers. +# This setting is disabled by default on servers. +enable_tnt (TNT) bool true + +# The radius in which nodes will be destroyed by a TNT explosion. +tnt_radius (TNT radius) int 3 0 + +# The time in seconds after which the bones of a dead player can be looted by everyone. +# Setting this to 0 will disable sharing of bones completly. +share_bones_time (Bone share time) int 1200 0 From 16ef0f9001ae845d030cc8eeee5bcc98eecf36a7 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Sun, 18 Oct 2015 19:07:19 +0200 Subject: [PATCH 2/2] Document all settings in settingtypes.txt --- settingtypes.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/settingtypes.txt b/settingtypes.txt index e435c100..e26eccea 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -3,6 +3,7 @@ # In creative mode players are able to dig all kind of blocks nearly instantly, # and have access to unlimited resources. +# Some of the functionality is only available if this setting is present at startup. creative_mode (Creative mode) bool false # Flammable nodes will be ignited by nearby igniters. Spreading fire may cause sever harm. @@ -12,6 +13,13 @@ enable_fire (Fire) bool true # If enabled, steel tools, torches and cobblestone will be given to new players. give_initial_stuff (Give initial items) bool false +# If enabled, players respawn at the bed they last slept at instead of normal spawn. +# This setting is only read at startup. +enable_bed_respawn (Respawn at bed) bool true + +# If enabled, the night can be skipped if more than half of the players are in beds. +enable_bed_night_skip (Skip night when sleeping) bool true + # When TNT explodes it destroys nearby nodes, possibl causing a lot of harm on servers. # This setting is disabled by default on servers. enable_tnt (TNT) bool true @@ -22,3 +30,6 @@ tnt_radius (TNT radius) int 3 0 # The time in seconds after which the bones of a dead player can be looted by everyone. # Setting this to 0 will disable sharing of bones completly. share_bones_time (Bone share time) int 1200 0 + +# Replaces old stairs with new ones. Only required for older worlds. +enable_stairs_replace_abm (Replace old stairs) bool false