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;
|
ActiveIndex = cast.ActiveIndex;
|
||||||
|
|
||||||
_gui?.UpdateHandIcons();
|
_gui?.UpdateHandIcons();
|
||||||
|
RefreshInHands();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _setHand(string hand, IEntity entity)
|
private void _setHand(string hand, IEntity entity)
|
||||||
@@ -190,9 +191,6 @@ namespace Content.Client.GameObjects
|
|||||||
case PlayerDetachedMsg _:
|
case PlayerDetachedMsg _:
|
||||||
_gui.Parent?.RemoveChild(_gui);
|
_gui.Parent?.RemoveChild(_gui);
|
||||||
break;
|
break;
|
||||||
case RefreshInHandsMsg _:
|
|
||||||
RefreshInHands();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -406,11 +406,6 @@ namespace Content.Server.GameObjects
|
|||||||
return hands.ContainsKey(index);
|
return hands.ContainsKey(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RefreshInHands()
|
|
||||||
{
|
|
||||||
SendNetworkMessage(new RefreshInHandsMsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the name of the slot passed to the inventory component.
|
/// Get the name of the slot passed to the inventory component.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -191,11 +191,6 @@ namespace Content.Server.Interfaces.GameObjects
|
|||||||
/// <returns>True if the hand exists, false otherwise.</returns>
|
/// <returns>True if the hand exists, false otherwise.</returns>
|
||||||
bool HasHand(string index);
|
bool HasHand(string index);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Refresh all in-hands sprites.
|
|
||||||
/// </summary>
|
|
||||||
void RefreshInHands();
|
|
||||||
|
|
||||||
void HandleSlotModifiedMaybe(ContainerModifiedMessage message);
|
void HandleSlotModifiedMaybe(ContainerModifiedMessage message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,16 +75,4 @@ namespace Content.Shared.GameObjects
|
|||||||
Index = index;
|
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
|
state: stunbaton_off
|
||||||
|
|
||||||
- type: Stunbaton
|
- type: Stunbaton
|
||||||
damage: 0.25
|
damage: 1
|
||||||
range: 0.75
|
range: 0.75
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
arc: default
|
arc: default
|
||||||
|
|||||||
Reference in New Issue
Block a user