Remove server and shared sprite component (#15917)

This commit is contained in:
Leon Friedrich
2023-04-30 18:09:52 +12:00
committed by GitHub
parent 8f7a217413
commit f99533a7bf
12 changed files with 29 additions and 36 deletions

View File

@@ -19,9 +19,6 @@ public abstract class SharedItemSystem : EntitySystem
{
base.Initialize();
SubscribeLocalEvent<ItemComponent, GetVerbsEvent<InteractionVerb>>(AddPickupVerb);
SubscribeLocalEvent<SharedSpriteComponent, GotEquippedEvent>(OnEquipped);
SubscribeLocalEvent<SharedSpriteComponent, GotUnequippedEvent>(OnUnequipped);
SubscribeLocalEvent<ItemComponent, InteractHandEvent>(OnHandInteract);
SubscribeLocalEvent<ItemComponent, ComponentGetState>(OnGetState);
@@ -92,21 +89,6 @@ public abstract class SharedItemSystem : EntitySystem
args.State = new ItemComponentState(component.Size, component.HeldPrefix);
}
// Although netsync is being set to false for items client can still update these
// Realistically:
// Container should already hide these
// Client is the only thing that matters.
private void OnUnequipped(EntityUid uid, SharedSpriteComponent component, GotUnequippedEvent args)
{
component.Visible = true;
}
private void OnEquipped(EntityUid uid, SharedSpriteComponent component, GotEquippedEvent args)
{
component.Visible = false;
}
private void AddPickupVerb(EntityUid uid, ItemComponent component, GetVerbsEvent<InteractionVerb> args)
{
if (args.Hands == null ||