예제 #1
0
 private void OnInventoryFlashAttempt(EntityUid uid, InventoryComponent component, FlashAttemptEvent args)
 {
     // Forward the event to the glasses, if any.
     if (_inventorySystem.TryGetSlotEntity(uid, "eyes", out var slotEntity, component))
     {
         RaiseLocalEvent(slotEntity.Value, args);
     }
 }
예제 #2
0
 private void OnInventoryFlashAttempt(EntityUid uid, InventoryComponent component, FlashAttemptEvent args)
 {
     foreach (var slot in new string[] { "head", "eyes", "mask" })
     {
         if (args.Cancelled)
         {
             break;
         }
         if (_inventorySystem.TryGetSlotEntity(uid, slot, out var item, component))
         {
             RaiseLocalEvent(item.Value, args, true);
         }
     }
 }