1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2025-06-29 23:00:55 +02:00

Reverse order of stack and index in callbacks for consistency

This commit is contained in:
stujones11
2017-04-15 20:37:32 +01:00
parent a2ec13e28d
commit 99bc8cf2d3
4 changed files with 39 additions and 39 deletions

View File

@ -63,7 +63,7 @@ armor.formspec = armor.formspec..
if armor.config.fire_protect then
armor.formspec = armor.formspec.."label[5,2;"..S("Fire")..": armor_fire]"
end
armor:register_on_destroy(function(player, stack)
armor:register_on_destroy(function(player, index, stack)
local name = player:get_player_name()
local def = stack:get_definition()
if name and def and def.description then
@ -164,7 +164,7 @@ if armor.config.drop == true or armor.config.destroy == true then
if stack:get_count() > 0 then
table.insert(drop, stack)
armor:set_inventory_stack(player, i, nil)
armor:run_callbacks("on_unequip", player, stack, i)
armor:run_callbacks("on_unequip", player, i, stack)
end
end
armor:set_player_armor(player)