Simpler method of checking which items to put in the Additional Cargo menu

This commit is contained in:
Regalis
2016-10-05 20:19:09 +03:00
parent fb28fc8cda
commit 4ebe961024
@@ -503,12 +503,11 @@ namespace Barotrauma.Networking
return true; return true;
}; };
foreach (MapEntityCategory category in Enum.GetValues(typeof(MapEntityCategory)))
{ foreach (MapEntityPrefab pf in MapEntityPrefab.list)
if (category == MapEntityCategory.Machine || category == MapEntityCategory.Structure) continue;
var items = MapEntityPrefab.list.FindAll(ep => ep.Price > 0.0f && ep.Category.HasFlag(category));
foreach (MapEntityPrefab pf in items)
{ {
if (pf.Price <= 0.0f) continue;
GUITextBlock textBlock = new GUITextBlock( GUITextBlock textBlock = new GUITextBlock(
new Rectangle(0, 0, 260, 25), new Rectangle(0, 0, 260, 25),
pf.Name, pf.Name,
@@ -573,7 +572,7 @@ namespace Barotrauma.Networking
return true; return true;
}; };
} }
}
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// server settings // server settings