(c5137ce8c) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:28:06 +03:00
parent e39043dbf5
commit 70ff950d38
11 changed files with 333 additions and 117 deletions
@@ -88,6 +88,21 @@ namespace Barotrauma
}
}
public override void Update(float deltaTime)
{
if (objectiveManager.CurrentObjective == this)
{
if (randomTimer > 0)
{
randomTimer -= deltaTime;
}
else
{
SetRandom();
}
}
}
public override bool IsCompleted() => false;
public override bool CanBeCompleted => true;
@@ -316,8 +331,8 @@ namespace Barotrauma
{
if (hull == null) { return true; }
string hullName = hull.RoomName?.ToLowerInvariant();
bool isForbidden = hullName.Contains("ballast") || hullName.Contains("airlock");
return isForbidden;
if (hullName == null) { return false; }
return hullName.Contains("ballast") || hullName.Contains("airlock");
}
public override bool IsDuplicate(AIObjective otherObjective)