Cleanup with resharper (mostly removing redundancies & using collection.Length/Count properties instead of the Count method)
This commit is contained in:
@@ -311,7 +311,7 @@ namespace Barotrauma
|
||||
|
||||
positionsOfInterest.Add(new InterestingPosition(tunnel.Last(), PositionType.Cave));
|
||||
|
||||
if (tunnel.Count() > 4) positionsOfInterest.Add(new InterestingPosition(tunnel[tunnel.Count() / 2], PositionType.Cave));
|
||||
if (tunnel.Count > 4) positionsOfInterest.Add(new InterestingPosition(tunnel[tunnel.Count / 2], PositionType.Cave));
|
||||
|
||||
pathCells.AddRange(newPathCells);
|
||||
}
|
||||
|
||||
@@ -271,8 +271,6 @@ namespace Barotrauma.RuinGeneration
|
||||
|
||||
foreach (Corridor corridor in corridors)
|
||||
{
|
||||
List<Line> corridorWalls = new List<Line>();
|
||||
|
||||
corridor.CreateWalls();
|
||||
|
||||
foreach (BTRoom leaf in rooms)
|
||||
@@ -361,7 +359,7 @@ namespace Barotrauma.RuinGeneration
|
||||
|
||||
var prop = RuinStructure.GetRandom(RuinStructureType.Prop, alignments[Rand.Int(alignments.Length, false)]);
|
||||
|
||||
Vector2 size = (prop.Prefab is StructurePrefab) ? (prop.Prefab as StructurePrefab).Size : Vector2.Zero;
|
||||
Vector2 size = (prop.Prefab is StructurePrefab) ? ((StructurePrefab)prop.Prefab).Size : Vector2.Zero;
|
||||
|
||||
var shape = shapes[Rand.Int(shapes.Count, false)];
|
||||
|
||||
@@ -385,7 +383,7 @@ namespace Barotrauma.RuinGeneration
|
||||
|
||||
if (prop.Prefab is ItemPrefab)
|
||||
{
|
||||
var item = new Item(prop.Prefab as ItemPrefab, position, null);
|
||||
var item = new Item((ItemPrefab)prop.Prefab, position, null);
|
||||
item.MoveWithLevel = true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user