(a17abe3fa) Remove a not so useful loop from a method, which might be used often.
This commit is contained in:
@@ -73,6 +73,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;
|
||||
|
||||
@@ -301,15 +316,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (hull == null) { return true; }
|
||||
string hullName = hull.RoomName?.ToLowerInvariant();
|
||||
bool isForbidden = hullName == "ballast" || hullName == "airlock";
|
||||
foreach (Item item in Item.ItemList)
|
||||
{
|
||||
if (item.CurrentHull == hull && (item.HasTag("ballast") || item.HasTag("airlock")))
|
||||
{
|
||||
isForbidden = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
bool isForbidden = hullName.Contains("ballast") || hullName.Contains("airlock");
|
||||
return isForbidden;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user