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
|
|
@ -81,36 +81,29 @@ namespace Server.Items
|
|||
|
||||
if (targeted is Eggs)
|
||||
{
|
||||
targetItem.Consume();
|
||||
|
||||
from.AddToBackpack(new UnbakedQuiche());
|
||||
from.AddToBackpack(new Eggshells());
|
||||
}
|
||||
else if (targeted is CheeseWheel)
|
||||
{
|
||||
targetItem.Consume();
|
||||
|
||||
from.AddToBackpack(new CheesePizza());
|
||||
}
|
||||
else if (targeted is Sausage)
|
||||
{
|
||||
targetItem.Consume();
|
||||
|
||||
from.AddToBackpack(new SausagePizza());
|
||||
}
|
||||
else if (targeted is Apple)
|
||||
{
|
||||
targetItem.Consume();
|
||||
|
||||
from.AddToBackpack(new UnbakedApplePie());
|
||||
}
|
||||
|
||||
else if (targeted is Peach)
|
||||
{
|
||||
targetItem.Consume();
|
||||
|
||||
from.AddToBackpack(new UnbakedPeachCobbler());
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
targetItem.Consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -598,12 +591,7 @@ namespace Server.Items
|
|||
public class WheatSheaf : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WheatSheaf() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WheatSheaf(int amount) : base(7869)
|
||||
public WheatSheaf(int amount = 1) : base(7869)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Stackable = true;
|
||||
|
|
@ -653,4 +641,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue