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

@ -30,7 +30,7 @@ namespace Server.Items
public class WasabiClumps : Food
{
[Constructible]
public WasabiClumps() : base(0x24EB)
public WasabiClumps() : base(0x24EB, 1)
{
Stackable = false;
Weight = 1.0;
@ -86,7 +86,7 @@ namespace Server.Items
public class BentoBox : Food
{
[Constructible]
public BentoBox() : base(0x2836)
public BentoBox() : base(0x2836, 1)
{
Stackable = false;
Weight = 5.0;
@ -124,7 +124,7 @@ namespace Server.Items
public class SushiRolls : Food
{
[Constructible]
public SushiRolls() : base(0x283E)
public SushiRolls() : base(0x283E, 1)
{
Stackable = false;
Weight = 3.0;
@ -153,7 +153,7 @@ namespace Server.Items
public class SushiPlatter : Food
{
[Constructible]
public SushiPlatter() : base(0x2840)
public SushiPlatter() : base(0x2840, 1)
{
Stackable = Core.ML;
Weight = 3.0;
@ -209,7 +209,7 @@ namespace Server.Items
public class GreenTea : Food
{
[Constructible]
public GreenTea() : base(0x284C)
public GreenTea() : base(0x284C, 1)
{
Stackable = false;
Weight = 4.0;
@ -238,7 +238,7 @@ namespace Server.Items
public class MisoSoup : Food
{
[Constructible]
public MisoSoup() : base(0x284D)
public MisoSoup() : base(0x284D, 1)
{
Stackable = false;
Weight = 4.0;
@ -267,7 +267,7 @@ namespace Server.Items
public class WhiteMisoSoup : Food
{
[Constructible]
public WhiteMisoSoup() : base(0x284E)
public WhiteMisoSoup() : base(0x284E, 1)
{
Stackable = false;
Weight = 4.0;
@ -296,7 +296,7 @@ namespace Server.Items
public class RedMisoSoup : Food
{
[Constructible]
public RedMisoSoup() : base(0x284F)
public RedMisoSoup() : base(0x284F, 1)
{
Stackable = false;
Weight = 4.0;
@ -325,7 +325,7 @@ namespace Server.Items
public class AwaseMisoSoup : Food
{
[Constructible]
public AwaseMisoSoup() : base(0x2850)
public AwaseMisoSoup() : base(0x2850, 1)
{
Stackable = false;
Weight = 4.0;
@ -350,4 +350,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -1,5 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Engines.Plants;
using Server.Engines.Quests;

View file

@ -57,7 +57,7 @@ namespace Server.Items
public class WoodenBowlOfCarrots : Food
{
[Constructible]
public WoodenBowlOfCarrots() : base(0x15F9)
public WoodenBowlOfCarrots() : base(0x15F9, 1)
{
Stackable = false;
Weight = 1.0;
@ -95,7 +95,7 @@ namespace Server.Items
public class WoodenBowlOfCorn : Food
{
[Constructible]
public WoodenBowlOfCorn() : base(0x15FA)
public WoodenBowlOfCorn() : base(0x15FA, 1)
{
Stackable = false;
Weight = 1.0;
@ -133,7 +133,7 @@ namespace Server.Items
public class WoodenBowlOfLettuce : Food
{
[Constructible]
public WoodenBowlOfLettuce() : base(0x15FB)
public WoodenBowlOfLettuce() : base(0x15FB, 1)
{
Stackable = false;
Weight = 1.0;
@ -171,7 +171,7 @@ namespace Server.Items
public class WoodenBowlOfPeas : Food
{
[Constructible]
public WoodenBowlOfPeas() : base(0x15FC)
public WoodenBowlOfPeas() : base(0x15FC, 1)
{
Stackable = false;
Weight = 1.0;
@ -209,7 +209,7 @@ namespace Server.Items
public class PewterBowlOfCarrots : Food
{
[Constructible]
public PewterBowlOfCarrots() : base(0x15FE)
public PewterBowlOfCarrots() : base(0x15FE, 1)
{
Stackable = false;
Weight = 1.0;
@ -247,7 +247,7 @@ namespace Server.Items
public class PewterBowlOfCorn : Food
{
[Constructible]
public PewterBowlOfCorn() : base(0x15FF)
public PewterBowlOfCorn() : base(0x15FF, 1)
{
Stackable = false;
Weight = 1.0;
@ -285,7 +285,7 @@ namespace Server.Items
public class PewterBowlOfLettuce : Food
{
[Constructible]
public PewterBowlOfLettuce() : base(0x1600)
public PewterBowlOfLettuce() : base(0x1600, 1)
{
Stackable = false;
Weight = 1.0;
@ -323,7 +323,7 @@ namespace Server.Items
public class PewterBowlOfPeas : Food
{
[Constructible]
public PewterBowlOfPeas() : base(0x1601)
public PewterBowlOfPeas() : base(0x1601, 1)
{
Stackable = false;
Weight = 1.0;
@ -361,7 +361,7 @@ namespace Server.Items
public class PewterBowlOfPotatos : Food
{
[Constructible]
public PewterBowlOfPotatos() : base(0x1602)
public PewterBowlOfPotatos() : base(0x1602, 1)
{
Stackable = false;
Weight = 1.0;
@ -455,7 +455,7 @@ namespace Server.Items
public class WoodenBowlOfStew : Food
{
[Constructible]
public WoodenBowlOfStew() : base(0x1604)
public WoodenBowlOfStew() : base(0x1604, 1)
{
Stackable = false;
Weight = 2.0;
@ -493,7 +493,7 @@ namespace Server.Items
public class WoodenBowlOfTomatoSoup : Food
{
[Constructible]
public WoodenBowlOfTomatoSoup() : base(0x1606)
public WoodenBowlOfTomatoSoup() : base(0x1606, 1)
{
Stackable = false;
Weight = 2.0;
@ -527,4 +527,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -35,13 +35,7 @@ namespace Server.Items
public class SackOfSugar : Item
{
[Constructible]
public SackOfSugar()
: this(1)
{
}
[Constructible]
public SackOfSugar(int amount)
public SackOfSugar(int amount = 1)
: base(0x1039)
{
Hue = 0x461;
@ -107,13 +101,7 @@ namespace Server.Items
public class Vanilla : Item
{
[Constructible]
public Vanilla()
: this(1)
{
}
[Constructible]
public Vanilla(int amount)
public Vanilla(int amount = 1)
: base(0xE2A)
{
Hue = 0x462;
@ -147,13 +135,7 @@ namespace Server.Items
public class CocoaPulp : Item
{
[Constructible]
public CocoaPulp()
: this(1)
{
}
[Constructible]
public CocoaPulp(int amount)
public CocoaPulp(int amount = 1)
: base(0xF7C)
{
Hue = 0x219;
@ -282,4 +264,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -161,12 +161,7 @@ namespace Server.Items
public class RawRibs : CookableFood
{
[Constructible]
public RawRibs() : this(1)
{
}
[Constructible]
public RawRibs(int amount) : base(0x9F1, 10)
public RawRibs(int amount = 1) : base(0x9F1, 10)
{
Weight = 1.0;
Stackable = true;
@ -202,12 +197,7 @@ namespace Server.Items
public class RawLambLeg : CookableFood
{
[Constructible]
public RawLambLeg() : this(1)
{
}
[Constructible]
public RawLambLeg(int amount) : base(0x1609, 10)
public RawLambLeg(int amount = 1) : base(0x1609, 10)
{
Stackable = true;
Amount = amount;
@ -279,12 +269,7 @@ namespace Server.Items
public class RawBird : CookableFood
{
[Constructible]
public RawBird() : this(1)
{
}
[Constructible]
public RawBird(int amount) : base(0x9B9, 10)
public RawBird(int amount = 1) : base(0x9B9, 10)
{
Weight = 1.0;
Stackable = true;
@ -648,12 +633,7 @@ namespace Server.Items
public class Eggs : CookableFood
{
[Constructible]
public Eggs() : this(1)
{
}
[Constructible]
public Eggs(int amount) : base(0x9B5, 15)
public Eggs(int amount = 1) : base(0x9B5, 15)
{
Weight = 1.0;
Stackable = true;
@ -835,12 +815,7 @@ namespace Server.Items
public class RawFishSteak : CookableFood
{
[Constructible]
public RawFishSteak() : this(1)
{
}
[Constructible]
public RawFishSteak(int amount) : base(0x097A, 10)
public RawFishSteak(int amount = 1) : base(0x097A, 10)
{
Stackable = true;
Amount = amount;
@ -871,4 +846,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -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();
}
}
}
}

View file

@ -5,11 +5,7 @@ namespace Server.Items
{
public abstract class Food : Item
{
public Food(int itemID) : this(1, itemID)
{
}
public Food(int amount, int itemID) : base(itemID)
public Food(int itemID, int amount) : base(itemID)
{
Stackable = true;
Amount = amount;
@ -173,12 +169,7 @@ namespace Server.Items
public class BreadLoaf : Food
{
[Constructible]
public BreadLoaf() : this(1)
{
}
[Constructible]
public BreadLoaf(int amount) : base(amount, 0x103B)
public BreadLoaf(int amount = 1) : base(0x103B, amount)
{
Weight = 1.0;
FillFactor = 3;
@ -206,12 +197,7 @@ namespace Server.Items
public class Bacon : Food
{
[Constructible]
public Bacon() : this(1)
{
}
[Constructible]
public Bacon(int amount) : base(amount, 0x979)
public Bacon(int amount = 1) : base(0x979, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -239,12 +225,7 @@ namespace Server.Items
public class SlabOfBacon : Food
{
[Constructible]
public SlabOfBacon() : this(1)
{
}
[Constructible]
public SlabOfBacon(int amount) : base(amount, 0x976)
public SlabOfBacon(int amount = 1) : base(0x976, amount)
{
Weight = 1.0;
FillFactor = 3;
@ -272,12 +253,7 @@ namespace Server.Items
public class FishSteak : Food
{
[Constructible]
public FishSteak() : this(1)
{
}
[Constructible]
public FishSteak(int amount) : base(amount, 0x97B)
public FishSteak(int amount = 1) : base(0x97B, amount)
{
FillFactor = 3;
}
@ -306,12 +282,7 @@ namespace Server.Items
public class CheeseWheel : Food
{
[Constructible]
public CheeseWheel() : this(1)
{
}
[Constructible]
public CheeseWheel(int amount) : base(amount, 0x97E)
public CheeseWheel(int amount = 1) : base(0x97E, amount)
{
FillFactor = 3;
}
@ -340,12 +311,7 @@ namespace Server.Items
public class CheeseWedge : Food
{
[Constructible]
public CheeseWedge() : this(1)
{
}
[Constructible]
public CheeseWedge(int amount) : base(amount, 0x97D)
public CheeseWedge(int amount = 1) : base(0x97D, amount)
{
FillFactor = 3;
}
@ -374,12 +340,7 @@ namespace Server.Items
public class CheeseSlice : Food
{
[Constructible]
public CheeseSlice() : this(1)
{
}
[Constructible]
public CheeseSlice(int amount) : base(amount, 0x97C)
public CheeseSlice(int amount = 1) : base(0x97C, amount)
{
FillFactor = 1;
}
@ -408,12 +369,7 @@ namespace Server.Items
public class FrenchBread : Food
{
[Constructible]
public FrenchBread() : this(1)
{
}
[Constructible]
public FrenchBread(int amount) : base(amount, 0x98C)
public FrenchBread(int amount = 1) : base(0x98C, amount)
{
Weight = 2.0;
FillFactor = 3;
@ -442,12 +398,7 @@ namespace Server.Items
public class FriedEggs : Food
{
[Constructible]
public FriedEggs() : this(1)
{
}
[Constructible]
public FriedEggs(int amount) : base(amount, 0x9B6)
public FriedEggs(int amount = 1) : base(0x9B6, amount)
{
Weight = 1.0;
FillFactor = 4;
@ -475,12 +426,7 @@ namespace Server.Items
public class CookedBird : Food
{
[Constructible]
public CookedBird() : this(1)
{
}
[Constructible]
public CookedBird(int amount) : base(amount, 0x9B7)
public CookedBird(int amount = 1) : base(0x9B7, amount)
{
Weight = 1.0;
FillFactor = 5;
@ -508,12 +454,7 @@ namespace Server.Items
public class RoastPig : Food
{
[Constructible]
public RoastPig() : this(1)
{
}
[Constructible]
public RoastPig(int amount) : base(amount, 0x9BB)
public RoastPig(int amount = 1) : base(0x9BB, amount)
{
Weight = 45.0;
FillFactor = 20;
@ -541,12 +482,7 @@ namespace Server.Items
public class Sausage : Food
{
[Constructible]
public Sausage() : this(1)
{
}
[Constructible]
public Sausage(int amount) : base(amount, 0x9C0)
public Sausage(int amount = 1) : base(0x9C0, amount)
{
Weight = 1.0;
FillFactor = 4;
@ -574,12 +510,7 @@ namespace Server.Items
public class Ham : Food
{
[Constructible]
public Ham() : this(1)
{
}
[Constructible]
public Ham(int amount) : base(amount, 0x9C9)
public Ham(int amount = 1) : base(0x9C9, amount)
{
Weight = 1.0;
FillFactor = 5;
@ -607,7 +538,7 @@ namespace Server.Items
public class Cake : Food
{
[Constructible]
public Cake() : base(0x9E9)
public Cake() : base(0x9E9, 1)
{
Stackable = false;
Weight = 1.0;
@ -636,12 +567,7 @@ namespace Server.Items
public class Ribs : Food
{
[Constructible]
public Ribs() : this(1)
{
}
[Constructible]
public Ribs(int amount) : base(amount, 0x9F2)
public Ribs(int amount = 1) : base(0x9F2, amount)
{
Weight = 1.0;
FillFactor = 5;
@ -669,7 +595,7 @@ namespace Server.Items
public class Cookies : Food
{
[Constructible]
public Cookies() : base(0x160b)
public Cookies() : base(0x160b, 1)
{
Stackable = Core.ML;
Weight = 1.0;
@ -698,7 +624,7 @@ namespace Server.Items
public class Muffins : Food
{
[Constructible]
public Muffins() : base(0x9eb)
public Muffins() : base(0x9eb, 1)
{
Stackable = false;
Weight = 1.0;
@ -728,7 +654,7 @@ namespace Server.Items
public class CheesePizza : Food
{
[Constructible]
public CheesePizza() : base(0x1040)
public CheesePizza() : base(0x1040, 1)
{
Stackable = false;
Weight = 1.0;
@ -759,7 +685,7 @@ namespace Server.Items
public class SausagePizza : Food
{
[Constructible]
public SausagePizza() : base(0x1040)
public SausagePizza() : base(0x1040, 1)
{
Stackable = false;
Weight = 1.0;
@ -821,7 +747,7 @@ namespace Server.Items
public class FruitPie : Food
{
[Constructible]
public FruitPie() : base(0x1041)
public FruitPie() : base(0x1041, 1)
{
Stackable = false;
Weight = 1.0;
@ -852,7 +778,7 @@ namespace Server.Items
public class MeatPie : Food
{
[Constructible]
public MeatPie() : base(0x1041)
public MeatPie() : base(0x1041, 1)
{
Stackable = false;
Weight = 1.0;
@ -883,7 +809,7 @@ namespace Server.Items
public class PumpkinPie : Food
{
[Constructible]
public PumpkinPie() : base(0x1041)
public PumpkinPie() : base(0x1041, 1)
{
Stackable = false;
Weight = 1.0;
@ -914,7 +840,7 @@ namespace Server.Items
public class ApplePie : Food
{
[Constructible]
public ApplePie() : base(0x1041)
public ApplePie() : base(0x1041, 1)
{
Stackable = false;
Weight = 1.0;
@ -945,7 +871,7 @@ namespace Server.Items
public class PeachCobbler : Food
{
[Constructible]
public PeachCobbler() : base(0x1041)
public PeachCobbler() : base(0x1041, 1)
{
Stackable = false;
Weight = 1.0;
@ -976,7 +902,7 @@ namespace Server.Items
public class Quiche : Food
{
[Constructible]
public Quiche() : base(0x1041)
public Quiche() : base(0x1041, 1)
{
Stackable = Core.ML;
Weight = 1.0;
@ -1007,12 +933,7 @@ namespace Server.Items
public class LambLeg : Food
{
[Constructible]
public LambLeg() : this(1)
{
}
[Constructible]
public LambLeg(int amount) : base(amount, 0x160a)
public LambLeg(int amount = 1) : base(0x160a, amount)
{
Weight = 2.0;
FillFactor = 5;
@ -1040,12 +961,7 @@ namespace Server.Items
public class ChickenLeg : Food
{
[Constructible]
public ChickenLeg() : this(1)
{
}
[Constructible]
public ChickenLeg(int amount) : base(amount, 0x1608)
public ChickenLeg(int amount = 1) : base(0x1608, amount)
{
Weight = 1.0;
FillFactor = 4;
@ -1074,12 +990,7 @@ namespace Server.Items
public class HoneydewMelon : Food
{
[Constructible]
public HoneydewMelon() : this(1)
{
}
[Constructible]
public HoneydewMelon(int amount) : base(amount, 0xC74)
public HoneydewMelon(int amount = 1) : base(0xC74, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -1108,12 +1019,7 @@ namespace Server.Items
public class YellowGourd : Food
{
[Constructible]
public YellowGourd() : this(1)
{
}
[Constructible]
public YellowGourd(int amount) : base(amount, 0xC64)
public YellowGourd(int amount = 1) : base(0xC64, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -1142,12 +1048,7 @@ namespace Server.Items
public class GreenGourd : Food
{
[Constructible]
public GreenGourd() : this(1)
{
}
[Constructible]
public GreenGourd(int amount) : base(amount, 0xC66)
public GreenGourd(int amount = 1) : base(0xC66, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -1176,12 +1077,7 @@ namespace Server.Items
public class EarOfCorn : Food
{
[Constructible]
public EarOfCorn() : this(1)
{
}
[Constructible]
public EarOfCorn(int amount) : base(amount, 0xC81)
public EarOfCorn(int amount = 1) : base(0xC81, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -1209,12 +1105,7 @@ namespace Server.Items
public class Turnip : Food
{
[Constructible]
public Turnip() : this(1)
{
}
[Constructible]
public Turnip(int amount) : base(amount, 0xD3A)
public Turnip(int amount = 1) : base(0xD3A, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -1265,4 +1156,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,7 +3,7 @@ namespace Server.Items
public class FruitBasket : Food
{
[Constructible]
public FruitBasket() : base(1, 0x993)
public FruitBasket() : base(0x993, 1)
{
Weight = 2.0;
FillFactor = 5;
@ -42,12 +42,7 @@ namespace Server.Items
public class Banana : Food
{
[Constructible]
public Banana() : this(1)
{
}
[Constructible]
public Banana(int amount) : base(amount, 0x171f)
public Banana(int amount = 1) : base(0x171f, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -76,12 +71,7 @@ namespace Server.Items
public class Bananas : Food
{
[Constructible]
public Bananas() : this(1)
{
}
[Constructible]
public Bananas(int amount) : base(amount, 0x1721)
public Bananas(int amount = 1) : base(0x1721, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -109,12 +99,7 @@ namespace Server.Items
public class SplitCoconut : Food
{
[Constructible]
public SplitCoconut() : this(1)
{
}
[Constructible]
public SplitCoconut(int amount) : base(amount, 0x1725)
public SplitCoconut(int amount = 1) : base(0x1725, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -142,12 +127,7 @@ namespace Server.Items
public class Lemon : Food
{
[Constructible]
public Lemon() : this(1)
{
}
[Constructible]
public Lemon(int amount) : base(amount, 0x1728)
public Lemon(int amount = 1) : base(0x1728, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -175,12 +155,7 @@ namespace Server.Items
public class Lemons : Food
{
[Constructible]
public Lemons() : this(1)
{
}
[Constructible]
public Lemons(int amount) : base(amount, 0x1729)
public Lemons(int amount = 1) : base(0x1729, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -208,12 +183,7 @@ namespace Server.Items
public class Lime : Food
{
[Constructible]
public Lime() : this(1)
{
}
[Constructible]
public Lime(int amount) : base(amount, 0x172a)
public Lime(int amount = 1) : base(0x172a, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -241,12 +211,7 @@ namespace Server.Items
public class Limes : Food
{
[Constructible]
public Limes() : this(1)
{
}
[Constructible]
public Limes(int amount) : base(amount, 0x172B)
public Limes(int amount = 1) : base(0x172B, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -274,12 +239,7 @@ namespace Server.Items
public class Coconut : Food
{
[Constructible]
public Coconut() : this(1)
{
}
[Constructible]
public Coconut(int amount) : base(amount, 0x1726)
public Coconut(int amount = 1) : base(0x1726, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -307,12 +267,7 @@ namespace Server.Items
public class OpenCoconut : Food
{
[Constructible]
public OpenCoconut() : this(1)
{
}
[Constructible]
public OpenCoconut(int amount) : base(amount, 0x1723)
public OpenCoconut(int amount = 1) : base(0x1723, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -340,12 +295,7 @@ namespace Server.Items
public class Dates : Food
{
[Constructible]
public Dates() : this(1)
{
}
[Constructible]
public Dates(int amount) : base(amount, 0x1727)
public Dates(int amount = 1) : base(0x1727, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -373,12 +323,7 @@ namespace Server.Items
public class Grapes : Food
{
[Constructible]
public Grapes() : this(1)
{
}
[Constructible]
public Grapes(int amount) : base(amount, 0x9D1)
public Grapes(int amount = 1) : base(0x9D1, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -406,12 +351,7 @@ namespace Server.Items
public class Peach : Food
{
[Constructible]
public Peach() : this(1)
{
}
[Constructible]
public Peach(int amount) : base(amount, 0x9D2)
public Peach(int amount = 1) : base(0x9D2, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -439,12 +379,7 @@ namespace Server.Items
public class Pear : Food
{
[Constructible]
public Pear() : this(1)
{
}
[Constructible]
public Pear(int amount) : base(amount, 0x994)
public Pear(int amount = 1) : base(0x994, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -472,12 +407,7 @@ namespace Server.Items
public class Apple : Food
{
[Constructible]
public Apple() : this(1)
{
}
[Constructible]
public Apple(int amount) : base(amount, 0x9D0)
public Apple(int amount = 1) : base(0x9D0, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -505,12 +435,7 @@ namespace Server.Items
public class Watermelon : Food
{
[Constructible]
public Watermelon() : this(1)
{
}
[Constructible]
public Watermelon(int amount) : base(amount, 0xC5C)
public Watermelon(int amount = 1) : base(0xC5C, amount)
{
Weight = 5.0;
FillFactor = 5;
@ -547,12 +472,7 @@ namespace Server.Items
public class SmallWatermelon : Food
{
[Constructible]
public SmallWatermelon() : this(1)
{
}
[Constructible]
public SmallWatermelon(int amount) : base(amount, 0xC5D)
public SmallWatermelon(int amount = 1) : base(0xC5D, amount)
{
Weight = 5.0;
FillFactor = 5;
@ -581,12 +501,7 @@ namespace Server.Items
public class Squash : Food
{
[Constructible]
public Squash() : this(1)
{
}
[Constructible]
public Squash(int amount) : base(amount, 0xc72)
public Squash(int amount = 1) : base(0xc72, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -615,12 +530,7 @@ namespace Server.Items
public class Cantaloupe : Food
{
[Constructible]
public Cantaloupe() : this(1)
{
}
[Constructible]
public Cantaloupe(int amount) : base(amount, 0xc79)
public Cantaloupe(int amount = 1) : base(0xc79, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -644,4 +554,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -4,12 +4,7 @@ namespace Server.Items
public class Carrot : Food
{
[Constructible]
public Carrot() : this(1)
{
}
[Constructible]
public Carrot(int amount) : base(amount, 0xc78)
public Carrot(int amount = 1) : base(0xc78, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -38,12 +33,7 @@ namespace Server.Items
public class Cabbage : Food
{
[Constructible]
public Cabbage() : this(1)
{
}
[Constructible]
public Cabbage(int amount) : base(amount, 0xc7b)
public Cabbage(int amount = 1) : base(0xc7b, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -72,12 +62,7 @@ namespace Server.Items
public class Onion : Food
{
[Constructible]
public Onion() : this(1)
{
}
[Constructible]
public Onion(int amount) : base(amount, 0xc6d)
public Onion(int amount = 1) : base(0xc6d, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -106,12 +91,7 @@ namespace Server.Items
public class Lettuce : Food
{
[Constructible]
public Lettuce() : this(1)
{
}
[Constructible]
public Lettuce(int amount) : base(amount, 0xc70)
public Lettuce(int amount = 1) : base(0xc70, amount)
{
Weight = 1.0;
FillFactor = 1;
@ -140,12 +120,7 @@ namespace Server.Items
public class Pumpkin : Food
{
[Constructible]
public Pumpkin() : this(1)
{
}
[Constructible]
public Pumpkin(int amount) : base(amount, 0xC6A)
public Pumpkin(int amount = 1) : base(0xC6A, amount)
{
Weight = 1.0;
FillFactor = 8;
@ -182,12 +157,7 @@ namespace Server.Items
public class SmallPumpkin : Food
{
[Constructible]
public SmallPumpkin() : this(1)
{
}
[Constructible]
public SmallPumpkin(int amount) : base(amount, 0xC6C)
public SmallPumpkin(int amount = 1) : base(0xC6C, amount)
{
Weight = 1.0;
FillFactor = 8;
@ -211,4 +181,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}