Client LuaCsForBarotrauma
BarotraumaClient/ClientSource/Items/ItemEventData.cs
1 using System;
2 
3 namespace Barotrauma
4 {
5  partial class Item
6  {
7  private readonly struct CombineEventData : IEventData
8  {
9  public EventType EventType => EventType.Combine;
10  public readonly Item CombineTarget;
11 
12  public CombineEventData(Item combineTarget)
13  {
14  CombineTarget = combineTarget;
15  }
16  }
17 
18  private readonly struct TreatmentEventData : IEventData
19  {
20  public EventType EventType => EventType.Treatment;
21  public readonly Character TargetCharacter;
22  public readonly Limb TargetLimb;
23  public byte LimbIndex
24  => TargetCharacter?.AnimController?.Limbs is { } limbs
25  ? (byte)Array.IndexOf(limbs, TargetLimb)
26  : byte.MaxValue;
27 
28  public TreatmentEventData(Character targetCharacter, Limb targetLimb)
29  {
30  TargetCharacter = targetCharacter;
31  TargetLimb = targetLimb;
32  }
33  }
34  }
35 }
Item(ItemPrefab itemPrefab, Vector2 position, Submarine submarine, ushort id=Entity.NullEntityID, bool callOnItemLoaded=true)