Track LocalMods as part of monolith
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using Barotrauma;
|
||||
using MoreLevelContent.Shared.Data;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace MoreLevelContent.Missions
|
||||
{
|
||||
// Shared
|
||||
abstract partial class DistressMission : Mission
|
||||
{
|
||||
protected bool DisplayReward;
|
||||
public DistressMission(MissionPrefab prefab, Location[] locations, Submarine sub) : base(prefab, locations, sub) => DisplayReward = prefab.ConfigElement.GetAttributeBool("displayreward", false);
|
||||
|
||||
public override void EndMissionSpecific(bool completed)
|
||||
{
|
||||
failed = !completed;
|
||||
if (completed || Submarine.MainSub.AtEndExit || Submarine.MainSub.AtStartExit)
|
||||
{
|
||||
if (level?.LevelData != null && Prefab.Tags.Contains("distress"))
|
||||
{
|
||||
level.LevelData.MLC().HasDistress = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user