Fix broken explosions griefing setting
This commit adds some lines of code which make sure that nothing gets destroyed when TNT griefing is disabled. Try different fix for broken setting Rename some things This commit renames `tnt_griefing` to `explosions_griefing` to better reflect what this setting now does. Rename some things This commit renames `tnt_griefing` to `explosions_griefing` to better reflect what this setting now does. Rename some things This commit renames `tnt_griefing` to `explosions_griefing` to better reflect what this setting now does.
This commit is contained in:
parent
7a65855c6f
commit
90ae28ff8d
@ -13,6 +13,7 @@ under the LGPLv2.1 license.
|
||||
mcl_explosions = {}
|
||||
|
||||
local mod_fire = minetest.get_modpath("mcl_fire")
|
||||
local explosions_griefing = minetest.settings:get_bool("mcl_explosions_griefing", true)
|
||||
|
||||
-- Saved sphere explosion shapes for various radiuses
|
||||
local sphere_shapes = {}
|
||||
@ -175,7 +176,7 @@ local function trace_explode(pos, strength, raydirs, radius, info, direct, sourc
|
||||
local grief_protected = info.grief_protected
|
||||
|
||||
-- Trace rays for environment destruction
|
||||
if info.griefing then
|
||||
if info.griefing and explosions_griefing then
|
||||
for i = 1, #raydirs do
|
||||
local rpos_x = pos.x
|
||||
local rpos_y = pos.y
|
||||
|
@ -1,5 +1,5 @@
|
||||
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 = {}
|
||||
|
||||
@ -61,7 +61,7 @@ if minetest.get_modpath("mesecons") then
|
||||
end
|
||||
|
||||
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."
|
||||
, TNT_RANGE)
|
||||
else
|
||||
|
@ -36,8 +36,8 @@ mcl_weather_dust_particles (Nether dust particles) int 150 0
|
||||
# Note that blocks never have drops when in Creative Mode.
|
||||
mcl_doTileDrops (Blocks have drops) bool true
|
||||
|
||||
# If enabled, TNT explosions destroy blocks.
|
||||
mcl_tnt_griefing (TNT destroys blocks) bool true
|
||||
# If enabled, explosions destroy blocks.
|
||||
mcl_explosions_griefing (Explosions destroy blocks) bool true
|
||||
|
||||
# Comma separated list of disabled structure names
|
||||
mcl_disabled_structures (Disabled structures) string
|
||||
|
Loading…
x
Reference in New Issue
Block a user