mirror of
https://github.com/luanti-org/minetest_game.git
synced 2026-01-08 18:25:52 +01:00
Fix confusing defaults for enable_fire and enable_tnt (#3221)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
# empty, Minetest Game does not need any defaults.
|
||||
|
||||
@@ -26,10 +26,12 @@
|
||||
# Inform player of condition and location of new bones.
|
||||
#bones_position_message = false
|
||||
|
||||
# Whether fire should be enabled. If disabled, 'basic_flame' nodes will
|
||||
# disappear.
|
||||
# 'permanent_flame' nodes will remain with either setting.
|
||||
#enable_fire = true
|
||||
# Flammable nodes will be ignited by nearby igniters. Spreading fire may
|
||||
# cause severe destruction.
|
||||
# Spreading fire nodes will disappear when fire is disabled, but
|
||||
# 'permanent_flame' nodes are unaffected.
|
||||
# If set to "auto", it will be enabled only in singleplayer.
|
||||
#enable_fire = auto
|
||||
|
||||
# Enable flame sound.
|
||||
#flame_sound = true
|
||||
@@ -42,8 +44,10 @@
|
||||
#initial_stuff = default:pick_steel,default:axe_steel,default:shovel_steel,
|
||||
default:torch 99,default:cobble 99
|
||||
|
||||
# Whether the TNT mod should be enabled.
|
||||
#enable_tnt = <true in singleplayer, false in multiplayer>
|
||||
# When TNT explodes, it destroys nearby nodes and damages nearby players.
|
||||
# This setting is disabled by default on servers.
|
||||
# If set to "auto", it will be enabled only in singleplayer.
|
||||
#enable_tnt = auto
|
||||
|
||||
# The radius of a TNT explosion.
|
||||
#tnt_radius = 3
|
||||
|
||||
@@ -3,20 +3,17 @@
|
||||
-- Global namespace for functions
|
||||
fire = {}
|
||||
|
||||
-- Load support for MT game translation.
|
||||
local S = minetest.get_translator("fire")
|
||||
|
||||
-- 'Enable fire' setting
|
||||
local fire_enabled = minetest.settings:get_bool("enable_fire")
|
||||
if fire_enabled == nil then
|
||||
-- enable_fire setting not specified, check for disable_fire
|
||||
local fire_disabled = minetest.settings:get_bool("disable_fire")
|
||||
if fire_disabled == nil then
|
||||
-- Neither setting specified, check whether singleplayer
|
||||
fire_enabled = minetest.is_singleplayer()
|
||||
else
|
||||
fire_enabled = not fire_disabled
|
||||
-- Default to enabled in singleplayer
|
||||
local fire_enabled = minetest.settings:get("enable_fire") or "auto"
|
||||
if fire_enabled == "auto" then
|
||||
fire_enabled = minetest.is_singleplayer()
|
||||
if minetest.settings:get_bool("disable_fire") then -- this is undocumented...?
|
||||
fire_enabled = false
|
||||
end
|
||||
else
|
||||
fire_enabled = minetest.is_yes(fire_enabled)
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
@@ -2,19 +2,20 @@
|
||||
|
||||
tnt = {}
|
||||
|
||||
-- Load support for MT game translation.
|
||||
local S = minetest.get_translator("tnt")
|
||||
|
||||
|
||||
-- Default to enabled when in singleplayer
|
||||
local enable_tnt = minetest.settings:get_bool("enable_tnt")
|
||||
if enable_tnt == nil then
|
||||
-- Default to enabled in singleplayer
|
||||
local enable_tnt = minetest.settings:get("enable_tnt") or "auto"
|
||||
if enable_tnt == "auto" then
|
||||
enable_tnt = minetest.is_singleplayer()
|
||||
else
|
||||
enable_tnt = minetest.is_yes(enable_tnt)
|
||||
end
|
||||
|
||||
local tnt_radius = tonumber(minetest.settings:get("tnt_radius") or 3)
|
||||
|
||||
-- Fill a list with data for content IDs, after all nodes are registered
|
||||
-- Fill a table with data for all content IDs, after all nodes are registered
|
||||
local cid_data = {}
|
||||
minetest.register_on_mods_loaded(function()
|
||||
for name, def in pairs(minetest.registered_nodes) do
|
||||
|
||||
@@ -11,7 +11,8 @@ creative_mode (Creative mode) bool false
|
||||
# cause severe destruction.
|
||||
# Spreading fire nodes will disappear when fire is disabled, but
|
||||
# 'permanent_flame' nodes are unaffected.
|
||||
enable_fire (Fire) bool true
|
||||
# If set to "auto", it will be enabled only in singleplayer.
|
||||
enable_fire (Fire) enum auto auto,true,false
|
||||
|
||||
# Enable flame sound.
|
||||
flame_sound (Flame sound) bool true
|
||||
@@ -37,7 +38,8 @@ enable_fence_tall (Tall fences and walls) bool false
|
||||
|
||||
# When TNT explodes, it destroys nearby nodes and damages nearby players.
|
||||
# This setting is disabled by default on servers.
|
||||
enable_tnt (TNT) bool true
|
||||
# If set to "auto", it will be enabled only in singleplayer.
|
||||
enable_tnt (TNT) enum auto auto,true,false
|
||||
|
||||
# The radius in which nodes will be destroyed by a TNT explosion.
|
||||
tnt_radius (TNT radius) int 3 0
|
||||
|
||||
Reference in New Issue
Block a user