Client LuaCsForBarotrauma
BarotraumaShared/SharedSource/Events/Missions/GoToMission.cs
1 using System;
2 
3 namespace Barotrauma
4 {
5  partial class GoToMission : Mission
6  {
7  public GoToMission(MissionPrefab prefab, Location[] locations, Submarine sub)
8  : base(prefab, locations, sub)
9  {
10  }
11 
12  protected override void UpdateMissionSpecific(float deltaTime)
13  {
14  if (Level.Loaded?.Type == LevelData.LevelType.Outpost)
15  {
16  State = Math.Max(1, State);
17  }
18  }
19 
20  protected override bool DetermineCompleted()
21  {
22  if (Level.Loaded?.Type == LevelData.LevelType.Outpost)
23  {
24  return true;
25  }
26  else
27  {
28  return Submarine.MainSub is { AtEndExit: true };
29  }
30  }
31  }
32 }
GoToMission(MissionPrefab prefab, Location[] locations, Submarine sub)