don't run the damage ABM if damage is disabled on the server.

This commit is contained in:
Vanessa Ezekowitz 2015-03-15 18:15:43 -04:00
parent cf75916ea7
commit b00e942824

View File

@ -569,7 +569,11 @@ end
local assumed_abdomen_offset = vector.new(0, 1, 0)
local assumed_abdomen_offset_length = vector.length(assumed_abdomen_offset)
local cache_scaled_shielding = {}
minetest.register_abm({
local damage_enabled = minetest.setting_getbool("enable_damage")
if damage_enabled then
minetest.register_abm({
nodenames = {"group:radioactive"},
interval = 1,
chance = 1,
@ -609,7 +613,8 @@ minetest.register_abm({
end
end
end,
})
})
end
-- radioactive materials that can result from destroying a reactor