コード例 #1
0
 private void OnSlipAttemptEvent(EntityUid uid, InventoryComponent component, SlipAttemptEvent args)
 {
     if (component.TryGetSlotItem(EquipmentSlotDefines.Slots.SHOES, out ItemComponent? shoes))
     {
         RaiseLocalEvent(shoes.Owner, args, false);
     }
 }
コード例 #2
0
 private void OnSlipAttempt(EntityUid uid, MagbootsComponent component, SlipAttemptEvent args)
 {
     if (component.On)
     {
         args.Cancel();
     }
 }
コード例 #3
0
 // jesus christ, this is duplicated to server/client, should really just be shared..
 private void OnSlipAttemptEvent(EntityUid uid, ClientInventoryComponent component, SlipAttemptEvent args)
 {
     if (component.TryGetSlot(EquipmentSlotDefines.Slots.SHOES, out EntityUid? shoes))
     {
         RaiseLocalEvent(shoes.Value, args, false);
     }
 }