Client LuaCsForBarotrauma
BarotraumaClient/ClientSource/Items/Components/Scanner.cs
2 
4 {
5  partial class Scanner : ItemComponent, IServerSerializable
6  {
7  partial void UpdateProjSpecific()
8  {
9  if (Holdable != null && Holdable.Attached && (AlwaysDisplayProgressBar || DisplayProgressBar) && !IsScanCompleted)
10  {
11  Character.Controlled?.UpdateHUDProgressBar(this,
14  GUIStyle.Red, GUIStyle.Green,
15  textTag: "progressbar.scanning");
16  }
17  }
18 
19  public void ClientEventRead(IReadMessage msg, float sendingTime)
20  {
21  bool wasScanCompletedPreviously = IsScanCompleted;
22  scanTimer = msg.ReadSingle();
23  if (!wasScanCompletedPreviously && IsScanCompleted)
24  {
25  OnScanCompleted?.Invoke(this);
26  }
27  }
28  }
29 }
bool DisplayProgressBar
Should the progress bar be displayed. Use when AlwaysDisplayProgressBar is set to false.
Interface for entities that the server can send events to the clients