Content changes for session specific entity states (#11235)

This commit is contained in:
Leon Friedrich
2022-09-14 21:40:05 +12:00
committed by GitHub
parent 7cd0677708
commit 2908cd994c
12 changed files with 10 additions and 118 deletions

View File

@@ -37,7 +37,6 @@ public abstract class SharedActionsSystem : EntitySystem
SubscribeLocalEvent<ActionsComponent, DidUnequipHandEvent>(OnHandUnequipped);
SubscribeLocalEvent<ActionsComponent, ComponentGetState>(GetState);
SubscribeLocalEvent<ActionsComponent, ComponentGetStateAttemptEvent>(OnCanGetState);
SubscribeAllEvent<RequestPerformActionEvent>(OnActionRequest);
}
@@ -89,12 +88,6 @@ public abstract class SharedActionsSystem : EntitySystem
args.State = new ActionsComponentState(component.Actions.ToList());
}
private void OnCanGetState(EntityUid uid, ActionsComponent component, ref ComponentGetStateAttemptEvent args)
{
// Only send action state data to the relevant player.
if (args.Player.AttachedEntity != uid)
args.Cancelled = true;
}
#endregion
#region Execution