(18af6c22d) Fixed: On/Off switches not being highlighted in mechanic tutorial

This commit is contained in:
Joonas Rikkonen
2019-05-20 20:17:59 +03:00
parent 1101252ad2
commit 1340780205
10 changed files with 87 additions and 102 deletions
@@ -318,7 +318,7 @@ namespace Barotrauma.Tutorials
do
{
yield return null;
if (IsSelectedItem(mechanic_brokenPump.Item))
if (IsSelectedItem(mechanic_workingPump.Item))
{
if (mechanic_workingPump.IsActiveSlider.FlashTimer <= 0)
{
@@ -527,6 +527,16 @@ namespace Barotrauma.Tutorials
}
}
}
else
{
if (IsSelectedItem(mechanic_brokenPump.Item))
{
if (mechanic_brokenPump.IsActiveSlider.FlashTimer <= 0)
{
mechanic_brokenPump.IsActiveSlider.Flash(uiHighlightColor, 1.5f, true);
}
}
}
} while (!mechanic_brokenPump.Item.IsFullCondition || mechanic_brokenPump.FlowPercentage >= 0 || !mechanic_brokenPump.IsActive);
RemoveCompletedObjective(segments[9]);
SetHighlight(mechanic_brokenPump.Item, false);