Remove server-side RefreshInHands, refresh them on component state update
This commit is contained in:
@@ -101,6 +101,7 @@ namespace Content.Client.GameObjects
|
||||
ActiveIndex = cast.ActiveIndex;
|
||||
|
||||
_gui?.UpdateHandIcons();
|
||||
RefreshInHands();
|
||||
}
|
||||
|
||||
private void _setHand(string hand, IEntity entity)
|
||||
@@ -190,9 +191,6 @@ namespace Content.Client.GameObjects
|
||||
case PlayerDetachedMsg _:
|
||||
_gui.Parent?.RemoveChild(_gui);
|
||||
break;
|
||||
case RefreshInHandsMsg _:
|
||||
RefreshInHands();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -406,11 +406,6 @@ namespace Content.Server.GameObjects
|
||||
return hands.ContainsKey(index);
|
||||
}
|
||||
|
||||
public void RefreshInHands()
|
||||
{
|
||||
SendNetworkMessage(new RefreshInHandsMsg());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the name of the slot passed to the inventory component.
|
||||
/// </summary>
|
||||
|
||||
@@ -191,11 +191,6 @@ namespace Content.Server.Interfaces.GameObjects
|
||||
/// <returns>True if the hand exists, false otherwise.</returns>
|
||||
bool HasHand(string index);
|
||||
|
||||
/// <summary>
|
||||
/// Refresh all in-hands sprites.
|
||||
/// </summary>
|
||||
void RefreshInHands();
|
||||
|
||||
void HandleSlotModifiedMaybe(ContainerModifiedMessage message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,16 +75,4 @@ namespace Content.Shared.GameObjects
|
||||
Index = index;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A message that tells the client to refresh in-hands.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public class RefreshInHandsMsg : ComponentMessage
|
||||
{
|
||||
public RefreshInHandsMsg()
|
||||
{
|
||||
Directed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
state: stunbaton_off
|
||||
|
||||
- type: Stunbaton
|
||||
damage: 0.25
|
||||
damage: 1
|
||||
range: 0.75
|
||||
arcwidth: 0
|
||||
arc: default
|
||||
|
||||
Reference in New Issue
Block a user