mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 05:30:55 +01:00
Fix action state handling bug (#25395)
* Rejig action state handling * Fix entity arg * Fix deserialization
This commit is contained in:
@@ -78,10 +78,12 @@ namespace Content.Client.Actions
|
||||
|
||||
private void BaseHandleState<T>(EntityUid uid, BaseActionComponent component, BaseActionComponentState state) where T : BaseActionComponent
|
||||
{
|
||||
// TODO ACTIONS use auto comp states
|
||||
component.Icon = state.Icon;
|
||||
component.IconOn = state.IconOn;
|
||||
component.IconColor = state.IconColor;
|
||||
component.Keywords = new HashSet<string>(state.Keywords);
|
||||
component.Keywords.Clear();
|
||||
component.Keywords.UnionWith(state.Keywords);
|
||||
component.Enabled = state.Enabled;
|
||||
component.Toggled = state.Toggled;
|
||||
component.Cooldown = state.Cooldown;
|
||||
@@ -101,8 +103,7 @@ namespace Content.Client.Actions
|
||||
component.ItemIconStyle = state.ItemIconStyle;
|
||||
component.Sound = state.Sound;
|
||||
|
||||
if (_playerManager.LocalEntity == component.AttachedEntity)
|
||||
ActionsUpdated?.Invoke();
|
||||
UpdateAction(uid, component);
|
||||
}
|
||||
|
||||
protected override void UpdateAction(EntityUid? actionId, BaseActionComponent? action = null)
|
||||
|
||||
Reference in New Issue
Block a user