1
0
Fork 0

Merge pull request 'Fix Explosions Griefing Setting' (#3509) from fix_tnt_griefing_setting into master

Reviewed-on: MineClone2/MineClone2#3509
Reviewed-by: 𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 <mrrar@noreply.git.minetest.land>
This commit is contained in:
commit 8d318dfaa2
3 changed files with 6 additions and 5 deletions

View File

@ -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 explosions_griefing = minetest.settings:get_bool("mcl_explosions_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
@ -191,7 +192,7 @@ local function trace_explode(pos, strength, raydirs, radius, info, direct, sourc
local grief_protected = info.grief_protected local grief_protected = info.grief_protected
-- Trace rays for environment destruction -- Trace rays for environment destruction
if info.griefing then if info.griefing and explosions_griefing then
for i = 1, #raydirs do for i = 1, #raydirs do
local rpos_x = pos.x local rpos_x = pos.x
local rpos_y = pos.y local rpos_y = pos.y

View File

@ -1,5 +1,5 @@
local S = minetest.get_translator(minetest.get_current_modname()) local S = minetest.get_translator(minetest.get_current_modname())
local tnt_griefing = minetest.settings:get_bool("mcl_tnt_griefing", true) local explosions_griefing = minetest.settings:get_bool("mcl_explosions_griefing", true)
tnt = {} tnt = {}
@ -61,7 +61,7 @@ if minetest.get_modpath("mesecons") then
end end
local longdesc local longdesc
if tnt_griefing then if explosions_griefing then
longdesc = S("An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals." longdesc = S("An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals."
, TNT_RANGE) , TNT_RANGE)
else else

View File

@ -36,8 +36,8 @@ mcl_weather_dust_particles (Nether dust particles) int 150 0
# Note that blocks never have drops when in Creative Mode. # Note that blocks never have drops when in Creative Mode.
mcl_doTileDrops (Blocks have drops) bool true mcl_doTileDrops (Blocks have drops) bool true
# If enabled, TNT explosions destroy blocks. # If enabled, explosions destroy blocks.
mcl_tnt_griefing (TNT destroys blocks) bool true mcl_explosions_griefing (Explosions destroy blocks) bool true
# Comma separated list of disabled structure names # Comma separated list of disabled structure names
mcl_disabled_structures (Disabled structures) string mcl_disabled_structures (Disabled structures) string