Add IEquipped and IUnequipped interfaces (#837)

This commit is contained in:
Víctor Aguilera Puerto
2020-04-21 14:38:35 +02:00
committed by GitHub
parent d77dea6498
commit 3fc4725df7
3 changed files with 168 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ namespace Content.Server.GameObjects
{
[RegisterComponent]
[ComponentReference(typeof(StoreableComponent))]
public class ItemComponent : StoreableComponent, IAttackHand, IExAct
public class ItemComponent : StoreableComponent, IAttackHand, IExAct, IEquipped, IUnequipped
{
public override string Name => "Item";
public override uint? NetID => ContentNetIDs.ITEM;
@@ -69,6 +69,16 @@ namespace Content.Server.GameObjects
}
}
public void Equipped(EquippedEventArgs eventArgs)
{
EquippedToSlot();
}
public void Unequipped(UnequippedEventArgs eventArgs)
{
RemovedFromSlot();
}
public override void ExposeData(ObjectSerializer serializer)
{
base.ExposeData(serializer);