(bcb06cc5c) Unstable v0.9.9.0

This commit is contained in:
Juan Pablo Arce
2020-03-27 15:22:59 -03:00
parent c81486a993
commit b143329701
326 changed files with 9692 additions and 4364 deletions
@@ -277,7 +277,7 @@ namespace Barotrauma.RuinGeneration
{
foreach (XElement subElement in element2.Elements())
{
if (subElement.Name.ToString().ToLowerInvariant() == "chooseone")
if (subElement.Name.ToString().Equals("chooseone", StringComparison.OrdinalIgnoreCase))
{
groupIndex++;
LoadEntities(subElement, ref groupIndex);
@@ -390,7 +390,7 @@ namespace Barotrauma.RuinGeneration
SourceEntityIdentifier = element.GetAttributeString("sourceentity", "");
foreach (XElement subElement in element.Elements())
{
if (subElement.Name.ToString().ToLowerInvariant() == "wire")
if (subElement.Name.ToString().Equals("wire", StringComparison.OrdinalIgnoreCase))
{
WireConnection = new Pair<string, string>(
subElement.GetAttributeString("from", ""),
@@ -721,8 +721,10 @@ namespace Barotrauma.RuinGeneration
//doors create their own gaps, don't create an additional one if there's a door at this
bool doorFound = false;
foreach (Door door in doors)
foreach (Item item in Item.ItemList)
{
var door = item.GetComponent<Door>();
if (door == null) { continue; }
if (Math.Abs(door.Item.WorldPosition.X - gapRect.Value.Center.X) < 5 &&
Math.Abs(door.Item.WorldPosition.Y - gapRect.Value.Center.Y) < 5)
{