Client LuaCsForBarotrauma
BarotraumaClient/ClientSource/Items/Components/Machines/OutpostTerminal.cs
1 
3 {
4  partial class OutpostTerminal : ItemComponent
5  {
6  private SubmarineSelection selectionUI;
7 
8  public override bool Select(Character character)
9  {
11  {
12  return false;
13  }
14 
15  if (selectionUI == null)
16  {
17  selectionUI = new SubmarineSelection(true, null, GUI.Canvas);
18  }
19 
20  GuiFrame = selectionUI.GuiFrame;
21  selectionUI.RefreshSubmarineDisplay(true, setTransferOptionToTrue: true);
22  IsActive = true;
23  return base.Select(character);
24  }
25 
26  public override void Update(float deltaTime, Camera cam)
27  {
29  {
30  IsActive = false;
31  return;
32  }
33 
34  base.Update(deltaTime, cam);
35 
36  selectionUI?.Update();
37  }
38 
39  protected override void RemoveComponentSpecific()
40  {
41  base.RemoveComponentSpecific();
42  if (selectionUI != null)
43  {
44  selectionUI.GuiFrame.RectTransform.Parent = null;
45  selectionUI = null;
46  }
47  }
48  }
49 }
Item????????? SelectedItem
The primary selected item. It can be any device that character interacts with. This excludes items li...
static GameSession?? GameSession
Definition: GameMain.cs:88
static bool IsLoadedFriendlyOutpost
Is there a loaded level set, and is it a friendly outpost (FriendlyNPC or Team1). Does not take reput...