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

@ -4,12 +4,7 @@ namespace Server.Items
public class Axle : Item
{
[Constructible]
public Axle() : this(1)
{
}
[Constructible]
public Axle(int amount) : base(0x105B)
public Axle(int amount = 1) : base(0x105B)
{
Stackable = true;
Amount = amount;
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -4,12 +4,7 @@ namespace Server.Items
public class AxleGears : Item
{
[Constructible]
public AxleGears() : this(1)
{
}
[Constructible]
public AxleGears(int amount) : base(0x1051)
public AxleGears(int amount = 1) : base(0x1051)
{
Stackable = true;
Amount = amount;
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -4,12 +4,7 @@ namespace Server.Items
public class ClockFrame : Item
{
[Constructible]
public ClockFrame() : this(1)
{
}
[Constructible]
public ClockFrame(int amount) : base(0x104D)
public ClockFrame(int amount = 1) : base(0x104D)
{
Stackable = true;
Amount = amount;
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -4,12 +4,7 @@ namespace Server.Items
public class ClockParts : Item
{
[Constructible]
public ClockParts() : this(1)
{
}
[Constructible]
public ClockParts(int amount) : base(0x104F)
public ClockParts(int amount = 1) : base(0x104F)
{
Stackable = true;
Amount = amount;
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -23,12 +23,7 @@ namespace Server.Items
private static DateTime WorldStart = new DateTime(1997, 9, 1);
[Constructible]
public Clock() : this(0x104B)
{
}
[Constructible]
public Clock(int itemID) : base(itemID)
public Clock(int itemID = 0x104B) : base(itemID)
{
Weight = 3.0;
}
@ -149,11 +144,6 @@ namespace Server.Items
[Flippable(0x104B, 0x104C)]
public class ClockRight : Clock
{
[Constructible]
public ClockRight() : base(0x104B)
{
}
public ClockRight(Serial serial) : base(serial)
{
}
@ -199,4 +189,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -4,12 +4,7 @@ namespace Server.Items
public class Gears : Item
{
[Constructible]
public Gears() : this(1)
{
}
[Constructible]
public Gears(int amount) : base(0x1053)
public Gears(int amount = 1) : base(0x1053)
{
Stackable = true;
Amount = amount;
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -4,12 +4,7 @@ namespace Server.Items
public class Hinge : Item
{
[Constructible]
public Hinge() : this(1)
{
}
[Constructible]
public Hinge(int amount) : base(0x1055)
public Hinge(int amount = 1) : base(0x1055)
{
Stackable = true;
Amount = amount;
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -4,12 +4,7 @@ namespace Server.Items
public class SextantParts : Item
{
[Constructible]
public SextantParts() : this(1)
{
}
[Constructible]
public SextantParts(int amount) : base(0x1059)
public SextantParts(int amount = 1) : base(0x1059)
{
Stackable = true;
Amount = amount;
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -4,12 +4,7 @@ namespace Server.Items
public class Springs : Item
{
[Constructible]
public Springs() : this(1)
{
}
[Constructible]
public Springs(int amount) : base(0x105D)
public Springs(int amount = 1) : base(0x105D)
{
Stackable = true;
Amount = amount;
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}