Client LuaCsForBarotrauma
BallastFloraEventData.cs
2 
4 {
5  internal partial class BallastFloraBehavior
6  {
7  public interface IEventData : NetEntityEvent.IData
8  {
9  public NetworkHeader NetworkHeader { get; }
10  }
11 
12  public readonly struct SpawnEventData : IEventData
13  {
14  public NetworkHeader NetworkHeader => NetworkHeader.Spawn;
15  }
16 
17  private readonly struct KillEventData : IEventData
18  {
19  public NetworkHeader NetworkHeader => NetworkHeader.Kill;
20  }
21 
22  private readonly struct RemoveEventData : IEventData
23  {
24  public NetworkHeader NetworkHeader => NetworkHeader.Remove;
25  }
26 
27  private readonly struct BranchCreateEventData : IEventData
28  {
29  public NetworkHeader NetworkHeader => NetworkHeader.BranchCreate;
30  public readonly BallastFloraBranch NewBranch;
31  public readonly BallastFloraBranch Parent;
32 
33  public BranchCreateEventData(BallastFloraBranch newBranch, BallastFloraBranch parent)
34  {
35  NewBranch = newBranch;
36  Parent = parent;
37  }
38  }
39 
40  private readonly struct BranchRemoveEventData : IEventData
41  {
42  public NetworkHeader NetworkHeader => NetworkHeader.BranchRemove;
43  public readonly BallastFloraBranch Branch;
44 
45  public BranchRemoveEventData(BallastFloraBranch branch)
46  {
47  Branch = branch;
48  }
49  }
50 
51  private readonly struct BranchDamageEventData : IEventData
52  {
53  public NetworkHeader NetworkHeader => NetworkHeader.BranchDamage;
54  public readonly BallastFloraBranch Branch;
55 
56  public BranchDamageEventData(BallastFloraBranch branch)
57  {
58  Branch = branch;
59  }
60  }
61 
62  private readonly struct InfectEventData : IEventData
63  {
64  public enum InfectState { Yes, No }
65 
66  public NetworkHeader NetworkHeader => NetworkHeader.Infect;
67  public readonly Item Item;
68  public readonly InfectState Infect;
69  public readonly BallastFloraBranch Infector;
70 
71  public InfectEventData(Item item, InfectState infect, BallastFloraBranch infector)
72  {
73  Item = item;
74  Infect = infect;
75  Infector = infector;
76  }
77  }
78  }
79 }