Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
         }
     }
 }