mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-11 18:40:25 +01:00
Updated 3d_armor and fixed armors' drop
- Fixed a mistake in code from @stujones11 repository about bones' drop : when the function assigned to minetest.after looks for bones, it first looks for a node. If there is a node, it looks for bones, if this node isn't bones, it just does nothing. Howevere, you're sure to get a node, because minetest.get_node will even return air and ignore, so, the else case, where every item is dropped, will never happen.
This commit is contained in:
parent
eaf7d1460e
commit
fe2bf3e822
@ -247,7 +247,7 @@ armor.update_armor = function(self, player, dtime)
|
||||
return
|
||||
end
|
||||
local hp = player:get_hp() or 0
|
||||
if ARMOR_FIRE_PROTECT == true then
|
||||
if ARMOR_FIRE_PROTECT == true and dtime then
|
||||
pos.y = pos.y + 1.4 -- head level
|
||||
local node_head = minetest.get_node(pos).name
|
||||
pos.y = pos.y - 1.2 -- feet level
|
||||
@ -596,8 +596,7 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
||||
if ARMOR_DESTROY == false then
|
||||
minetest.after(ARMOR_BONES_DELAY, function()
|
||||
local node = minetest.get_node(vector.round(pos))
|
||||
if node then
|
||||
if node.name == "bones:bones" then
|
||||
if node and node.name == "bones:bones" then
|
||||
local meta = minetest.get_meta(vector.round(pos))
|
||||
local owner = meta:get_string("owner")
|
||||
local inv = meta:get_inventory()
|
||||
@ -608,7 +607,6 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
||||
armor.drop_armor(pos, stack)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
for _,stack in ipairs(drop) do
|
||||
armor.drop_armor(pos, stack)
|
||||
|
@ -5,6 +5,7 @@ News de FR - MinetestForFun (Survival - PVP - Hardcore)
|
||||
/!\ En effet, nous profitons de cette stabilitée pour préparer une grosse MAJ qui boulversera à jamais le gameplay de Minetest /!\
|
||||
|
||||
---Next merge--- (Remerciements : ???)
|
||||
MaJ de "3d_armor" (drop des armurs fixé)
|
||||
MaJ de "homedecor" (nouveaux panneaux colorés)
|
||||
MaJ de "plantlife"
|
||||
MaJ de "mesecons"
|
||||
|
Loading…
Reference in New Issue
Block a user