Warning message about unlinked vents is only shown once when saving (not for each vent)

This commit is contained in:
Regalis
2017-03-02 19:39:00 +02:00
parent a5017193bf
commit 335ee8c72e
+2 -1
View File
@@ -947,11 +947,12 @@ namespace Barotrauma
foreach (Item item in Item.ItemList) foreach (Item item in Item.ItemList)
{ {
if (item.GetComponent<Barotrauma.Items.Components.Vent>() == null) continue; if (item.GetComponent<Items.Components.Vent>() == null) continue;
if (!item.linkedTo.Any()) if (!item.linkedTo.Any())
{ {
errorMsgs.Add("The submarine contains vents which haven't been linked to an oxygen generator. Select a vent and click an oxygen generator while holding space to link them."); errorMsgs.Add("The submarine contains vents which haven't been linked to an oxygen generator. Select a vent and click an oxygen generator while holding space to link them.");
break;
} }
} }