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:
@@ -104,7 +104,7 @@
|
|||||||
</Item>
|
</Item>
|
||||||
|
|
||||||
<Item
|
<Item
|
||||||
name="Nitroglyserine"
|
name="Nitroglycerin"
|
||||||
category="Material"
|
category="Material"
|
||||||
description="A highly unstable liquid that may explode when subjected to heat or physical shock."
|
description="A highly unstable liquid that may explode when subjected to heat or physical shock."
|
||||||
spritecolor="1.0,1.0,1.0,1.0"
|
spritecolor="1.0,1.0,1.0,1.0"
|
||||||
|
|||||||
@@ -129,16 +129,16 @@
|
|||||||
|
|
||||||
<CargoMission
|
<CargoMission
|
||||||
name="Handle with care"
|
name="Handle with care"
|
||||||
description="Local reseachers are offering 2000 credits for delivering a large amount of nitroglycerine to [location2]."
|
description="Local reseachers are offering 2000 credits for delivering a large amount of nitroglycerin to [location2]."
|
||||||
commonness="15"
|
commonness="15"
|
||||||
reward="2000"
|
reward="2000"
|
||||||
successmessage="The chemicals have been successfully delivered.">
|
successmessage="The chemicals have been successfully delivered.">
|
||||||
<Items>
|
<Items>
|
||||||
<Item name="Explosive Crate">
|
<Item name="Explosive Crate">
|
||||||
<Item name="Nitroglyserine" amount="10"/>
|
<Item name="Nitroglycerin" amount="10"/>
|
||||||
</Item>
|
</Item>
|
||||||
<Item name="Explosive Crate">
|
<Item name="Explosive Crate">
|
||||||
<Item name="Nitroglyserine" amount="10"/>
|
<Item name="Nitroglycerin" amount="10"/>
|
||||||
</Item>
|
</Item>
|
||||||
</Items>
|
</Items>
|
||||||
</CargoMission>
|
</CargoMission>
|
||||||
|
|||||||
@@ -69,11 +69,11 @@ namespace Barotrauma
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2 position = new Vector2(
|
//Vector2 position = new Vector2(
|
||||||
Rand.Range(cargoRoom.Rect.X + 20, cargoRoom.Rect.Right - 20, false),
|
// Rand.Range(cargoRoom.Rect.X + 20, cargoRoom.Rect.Right - 20, false),
|
||||||
cargoRoom.Rect.Y - cargoRoom.Rect.Height + 10.0f);
|
// 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();
|
item.FindHull();
|
||||||
items.Add(item);
|
items.Add(item);
|
||||||
|
|
||||||
|
|||||||
@@ -137,6 +137,10 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
else if (string.IsNullOrWhiteSpace(missionType))
|
||||||
|
{
|
||||||
|
matchingElements = doc.Root.Elements().ToList();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
matchingElements = doc.Root.Elements().ToList().FindAll(m => m.Name.ToString().ToLowerInvariant().Replace("mission", "") == missionType);
|
matchingElements = doc.Root.Elements().ToList().FindAll(m => m.Name.ToString().ToLowerInvariant().Replace("mission", "") == missionType);
|
||||||
|
|||||||
Reference in New Issue
Block a user