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

@@ -9,14 +9,6 @@ namespace Content.Shared.Flash
base.Initialize();
SubscribeLocalEvent<SharedFlashableComponent, ComponentGetState>(OnFlashableGetState);
SubscribeLocalEvent<SharedFlashableComponent, ComponentGetStateAttemptEvent>(OnGetStateAttempt);
}
private static void OnGetStateAttempt(EntityUid uid, SharedFlashableComponent component, ref ComponentGetStateAttemptEvent args)
{
// Only send state to the player attached to the entity.
if (args.Player.AttachedEntity != uid)
args.Cancelled = true;
}
private static void OnFlashableGetState(EntityUid uid, SharedFlashableComponent component, ref ComponentGetState args)