Files
LuaCsForBarotraumaEP/Barotrauma/BarotraumaShared/SharedSource/Events/Missions/GoToMission.cs
Markus Isberg 9470edead3 Build 1.1.4.0
2023-03-31 18:40:44 +03:00

33 lines
783 B
C#

using System;
namespace Barotrauma
{
partial class GoToMission : Mission
{
public GoToMission(MissionPrefab prefab, Location[] locations, Submarine sub)
: base(prefab, locations, sub)
{
}
protected override void UpdateMissionSpecific(float deltaTime)
{
if (Level.Loaded?.Type == LevelData.LevelType.Outpost)
{
State = Math.Max(1, State);
}
}
protected override bool DetermineCompleted()
{
if (Level.Loaded?.Type == LevelData.LevelType.Outpost)
{
return true;
}
else
{
return Submarine.MainSub is { AtEndExit: true };
}
}
}
}