Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)

This commit is contained in:
Kamron Batman 2019-03-11 14:29:59 -07:00 • committed by GitHub
parent e748af4430
commit 513e54f70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1094 changed files with 15913 additions and 21892 deletions

View file

@ -27,12 +27,7 @@ namespace Server.Engines.Doom
private Timer m_Timer;
[Constructible]
public GauntletSpawner() : this(null)
{
}
[Constructible]
public GauntletSpawner(string typeName) : base(0x36FE)
public GauntletSpawner(string typeName = null) : base(0x36FE)
{
Visible = false;
Movable = false;
@ -334,7 +329,7 @@ namespace Server.Engines.Doom
{
State = GauntletSpawnerState.InSequence;
if (Sequence != null && !Sequence.Deleted)
if (Sequence?.Deleted == false)
Sequence.RecurseReset();
}
}
@ -353,7 +348,7 @@ namespace Server.Engines.Doom
{
State = GauntletSpawnerState.Completed;
if (Sequence != null && !Sequence.Deleted)
if (Sequence?.Deleted == false)
{
if (Sequence.State == GauntletSpawnerState.Completed)
RecurseReset();
@ -428,7 +423,7 @@ namespace Server.Engines.Doom
public static void CreateTeleporter(int xFrom, int yFrom, int xTo, int yTo)
{
Static telePad = new Static(0x1822);
Teleporter teleItem = new Teleporter(new Point3D(xTo, yTo, -1), Map.Malas, false);
Teleporter teleItem = new Teleporter(new Point3D(xTo, yTo, -1), Map.Malas);
telePad.Hue = 0x482;
telePad.MoveToWorld(new Point3D(xFrom, yFrom, -1), Map.Malas);
@ -652,4 +647,4 @@ namespace Server.Engines.Doom
{
}
}
}
}