Added the possibility to wear the armor on rightclick (#16)

* Added the possibility to wear the armor on rightclick
* Added equip, unequip and get_weared_armor_elements functions

Co-authored-by: Giov4 <brancacciogiovanni1@gmail.com>
This commit is contained in:
Giov4
2020-09-22 07:45:39 +02:00
committed by GitHub
parent 9459400474
commit 294338d3b0
2 changed files with 81 additions and 3 deletions

View File

@ -164,6 +164,14 @@ armor:remove_all(player)
Removes all armors from the player's inventory without triggering any callback.
armor:equip(player, armor_name)
Equip the armor, removing the itemstack from the main inventory if there's one.
armor:unequip(player, armor_name)
Unequip the armor, adding the itemstack to the main inventory.
Item Callbacks:
on_equip = func(player, index, stack)