Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)
This commit is contained in:
parent
e748af4430
commit
513e54f70e
1094 changed files with 15913 additions and 21892 deletions
|
|
@ -20,11 +20,7 @@ namespace Server.Items
|
|||
private ToolQuality m_Quality;
|
||||
private int m_UsesRemaining;
|
||||
|
||||
public BaseHarvestTool(int itemID) : this(50, itemID)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseHarvestTool(int usesRemaining, int itemID) : base(itemID)
|
||||
public BaseHarvestTool(int itemID, int usesRemaining = 50) : base(itemID)
|
||||
{
|
||||
m_UsesRemaining = usesRemaining;
|
||||
m_Quality = ToolQuality.Regular;
|
||||
|
|
@ -257,4 +253,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,7 @@ namespace Server.Items
|
|||
public class Shovel : BaseHarvestTool
|
||||
{
|
||||
[Constructible]
|
||||
public Shovel() : this(50)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Shovel(int uses) : base(uses, 0xF39)
|
||||
public Shovel(int uses = 50) : base(0xF39, uses)
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
|
@ -35,4 +30,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,7 @@ namespace Server.Items
|
|||
public class SturdyPickaxe : BaseAxe, IUsesRemaining
|
||||
{
|
||||
[Constructible]
|
||||
public SturdyPickaxe() : this(180)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SturdyPickaxe(int uses) : base(0xE86)
|
||||
public SturdyPickaxe(int uses = 180) : base(0xE86)
|
||||
{
|
||||
Weight = 11.0;
|
||||
Hue = 0x973;
|
||||
|
|
@ -55,4 +50,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,7 @@ namespace Server.Items
|
|||
public class SturdyShovel : BaseHarvestTool
|
||||
{
|
||||
[Constructible]
|
||||
public SturdyShovel() : this(180)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SturdyShovel(int uses) : base(uses, 0xF39)
|
||||
public SturdyShovel(int uses = 180) : base(0xF39, uses)
|
||||
{
|
||||
Weight = 5.0;
|
||||
Hue = 0x973;
|
||||
|
|
@ -37,4 +32,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue