Nitroglyserine -> nitroglycerin, fixed Mission.LoadRandom returning null if the missiontype parameter isn't set, cargo is placed at the cargo spawnpoint instead of a random position within the hull it's inside
This commit is contained in:
@@ -69,11 +69,11 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2 position = new Vector2(
|
||||
Rand.Range(cargoRoom.Rect.X + 20, cargoRoom.Rect.Right - 20, false),
|
||||
cargoRoom.Rect.Y - cargoRoom.Rect.Height + 10.0f);
|
||||
//Vector2 position = new Vector2(
|
||||
// Rand.Range(cargoRoom.Rect.X + 20, cargoRoom.Rect.Right - 20, false),
|
||||
// cargoRoom.Rect.Y - cargoRoom.Rect.Height + 10.0f);
|
||||
|
||||
var item = new Item(itemPrefab, position, cargoRoom.Submarine);
|
||||
var item = new Item(itemPrefab, cargoSpawnPos.Position + Rand.Vector(10.0f, false), cargoRoom.Submarine);
|
||||
item.FindHull();
|
||||
items.Add(item);
|
||||
|
||||
|
||||
@@ -137,6 +137,10 @@ namespace Barotrauma
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else if (string.IsNullOrWhiteSpace(missionType))
|
||||
{
|
||||
matchingElements = doc.Root.Elements().ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
matchingElements = doc.Root.Elements().ToList().FindAll(m => m.Name.ToString().ToLowerInvariant().Replace("mission", "") == missionType);
|
||||
|
||||
Reference in New Issue
Block a user