private void OnGetStateAttempt(EntityUid uid, SharedFlashableComponent component, ComponentGetStateAttemptEvent args)
 {
     // Only send state to the player attached to the entity.
     if (args.Player.AttachedEntity != uid)
     {
         args.Cancel();
     }
 }
Esempio n. 2
0
        private void OnFlashableGetState(EntityUid uid, SharedFlashableComponent component, ref ComponentGetState args)
        {
            // Only send state to the player attached to the entity.
            if (args.Player.AttachedEntityUid != uid)
            {
                return;
            }

            args.State = new FlashableComponentState(component.Duration, component.LastFlash);
        }
 private void OnFlashableGetState(EntityUid uid, SharedFlashableComponent component, ref ComponentGetState args)
 {
     args.State = new FlashableComponentState(component.Duration, component.LastFlash);
 }