(f4acd46ef) Don't enable the "report leaks" button inside ruins

This commit is contained in:
Joonas Rikkonen
2019-05-18 17:29:24 +03:00
parent 6463face3b
commit 75640a321f
9 changed files with 100 additions and 119 deletions
@@ -1350,7 +1350,7 @@ namespace Barotrauma
bool hasFires = Character.Controlled.CurrentHull.FireSources.Count > 0;
ToggleReportButton("reportfire", hasFires);
bool hasLeaks = Character.Controlled.CurrentHull.ConnectedGaps.Any(g => !g.IsRoomToRoom && g.Open > 0.0f);
bool hasLeaks = Character.Controlled.CurrentHull.Submarine != null && Character.Controlled.CurrentHull.ConnectedGaps.Any(g => !g.IsRoomToRoom && g.Open > 0.0f);
ToggleReportButton("reportbreach", hasLeaks);
bool hasIntruders = Character.CharacterList.Any(c => c.CurrentHull == Character.Controlled.CurrentHull && AIObjectiveFightIntruders.IsValidTarget(Character.Controlled, c));