Add IEquipped and IUnequipped interfaces (#837)
This commit is contained in:
committed by
GitHub
parent
d77dea6498
commit
3fc4725df7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user