mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-18 00:51:06 +01:00
Fix broken setting
This commit adds some lines of code which make sure that nothing gets destroyed when TNT griefing is disabled.
This commit is contained in:
parent
e15d0cd5a0
commit
8b0d195906
1 changed files with 6 additions and 1 deletions
|
@ -13,6 +13,7 @@ under the LGPLv2.1 license.
|
||||||
mcl_explosions = {}
|
mcl_explosions = {}
|
||||||
|
|
||||||
local mod_fire = minetest.get_modpath("mcl_fire")
|
local mod_fire = minetest.get_modpath("mcl_fire")
|
||||||
|
local tnt_griefing = minetest.settings:get_bool("mcl_tnt_griefing", true)
|
||||||
--local CONTENT_FIRE = minetest.get_content_id("mcl_fire:fire")
|
--local CONTENT_FIRE = minetest.get_content_id("mcl_fire:fire")
|
||||||
|
|
||||||
local math = math
|
local math = math
|
||||||
|
@ -359,7 +360,11 @@ local function trace_explode(pos, strength, raydirs, radius, info, direct, sourc
|
||||||
for hash, idx in pairs(destroy) do
|
for hash, idx in pairs(destroy) do
|
||||||
local do_drop = math.random() <= drop_chance
|
local do_drop = math.random() <= drop_chance
|
||||||
local on_blast = node_on_blast[data[idx]]
|
local on_blast = node_on_blast[data[idx]]
|
||||||
local remove = true
|
if (not tnt_griefing) and info.is_tnt ~= false then
|
||||||
|
local remove = false
|
||||||
|
else
|
||||||
|
local remove = true
|
||||||
|
end
|
||||||
|
|
||||||
if do_drop or on_blast then
|
if do_drop or on_blast then
|
||||||
local npos = get_position_from_hash(hash)
|
local npos = get_position_from_hash(hash)
|
||||||
|
|
Loading…
Reference in a new issue