Fixed a problem in the armors

This commit is contained in:
npx 2016-12-15 22:10:17 +01:00
parent 7b800a93d9
commit 8f5643fc23
2 changed files with 7 additions and 10 deletions

View File

@ -746,7 +746,7 @@ local function add_drop(drops, item)
end end
end end
local function destroy(drops, npos, cid, c_air, c_fire, on_blast_queue, ignore_protection, ignore_on_blast) local function destroy(drops, npos, cid, c_air, on_blast_queue, ignore_protection, ignore_on_blast)
if not ignore_protection and minetest.is_protected(npos, "") then if not ignore_protection and minetest.is_protected(npos, "") then
return cid return cid
end end
@ -758,8 +758,6 @@ local function destroy(drops, npos, cid, c_air, c_fire, on_blast_queue, ignore_p
elseif not ignore_on_blast and def.on_blast then elseif not ignore_on_blast and def.on_blast then
on_blast_queue[#on_blast_queue + 1] = {pos = vector.new(npos), on_blast = def.on_blast} on_blast_queue[#on_blast_queue + 1] = {pos = vector.new(npos), on_blast = def.on_blast}
return cid return cid
elseif def.flammable then
return c_fire
else else
local node_drops = minetest.get_node_drops(def.name, "") local node_drops = minetest.get_node_drops(def.name, "")
for _, item in pairs(node_drops) do for _, item in pairs(node_drops) do
@ -821,7 +819,6 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, bloc
local drops = {} local drops = {}
local on_blast_queue = {} local on_blast_queue = {}
local c_fire = minetest.get_content_id("fire:basic_flame")
for z = -radius, radius do for z = -radius, radius do
for y = -radius, radius do for y = -radius, radius do
local vi = a:index(pos.x + (-radius), pos.y + y, pos.z + z) local vi = a:index(pos.x + (-radius), pos.y + y, pos.z + z)
@ -831,7 +828,7 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, bloc
local cid = data[vi] local cid = data[vi]
local p = {x = pos.x + x, y = pos.y + y, z = pos.z + z} local p = {x = pos.x + x, y = pos.y + y, z = pos.z + z}
if cid ~= c_air then if cid ~= c_air then
data[vi] = destroy(drops, p, cid, c_air, c_fire, data[vi] = destroy(drops, p, cid, c_air,
on_blast_queue, ignore_protection, on_blast_queue, ignore_protection,
ignore_on_blast) ignore_on_blast)
end end

View File

@ -32,7 +32,7 @@ if minetest.get_modpath("3d_armor") then
duck="nssm:duck_feather", duck="nssm:duck_feather",
black_duck="nssm:black_duck_feather", black_duck="nssm:black_duck_feather",
mor= "nssm:lustful_moranga", mor= "nssm:lustful_moranga",
sandbloco= "nssm:sandbloco_skin", sandbloco= "nssm:sand_bloco_skin",
sandworm="nssm:sandworm_skin", sandworm="nssm:sandworm_skin",
sky="nssm:sky_iron", sky="nssm:sky_iron",
web="nssm:web_string", web="nssm:web_string",
@ -146,7 +146,7 @@ local stats = {
crown ={name="Dukking Crown", armor=2, heal=0, use=50}, crown ={name="Dukking Crown", armor=2, heal=0, use=50},
masticone_crowned ={name="Masticone Crowned Head", armor=6, heal=0, use=20}, masticone_crowned ={name="Masticone Crowned Head", armor=6, heal=0, use=20},
} }
for k, v in pairs(stats) do for k, v in pairs(stats) do
minetest.register_tool("nssm:helmet_"..k, { minetest.register_tool("nssm:helmet_"..k, {
description = v.name.." ", description = v.name.." ",
@ -168,9 +168,9 @@ local stats = {
minetest.register_craft({ minetest.register_craft({
output = "nssm:chestplate_snake", output = "nssm:chestplate_snake",
recipe = { recipe = {
{"default:iron_ingot", "", "default:iron_ingot"}, {"default:steel_ingot", "", "default:steel_ingot"},
{"default:iron_ingot", "nssm:snake_scute", "default:iron_ingot"}, {"default:steel_ingot", "nssm:snake_scute", "default:steel_ingot"},
{"default:iron_ingot", "default:iron_ingot", "default:iron_ingot"}, {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
}, },
}) })
minetest.register_craft({ minetest.register_craft({