Formatting FIxes (#58)

This commit is contained in:
Kamron Batman 2019-10-04 23:08:13 -07:00 committed by GitHub
parent 57fb9fb525
commit 096d39609e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1318 changed files with 11633 additions and 22129 deletions

View file

@ -3,10 +3,7 @@ namespace Server.Items
public class Wasabi : Item
{
[Constructible]
public Wasabi() : base(0x24E8)
{
Weight = 1.0;
}
public Wasabi() : base(0x24E8) => Weight = 1.0;
public Wasabi(Serial serial) : base(serial)
{
@ -59,10 +56,7 @@ namespace Server.Items
public class EmptyBentoBox : Item
{
[Constructible]
public EmptyBentoBox() : base(0x2834)
{
Weight = 5.0;
}
public EmptyBentoBox() : base(0x2834) => Weight = 5.0;
public EmptyBentoBox(Serial serial) : base(serial)
{
@ -182,10 +176,7 @@ namespace Server.Items
public class GreenTeaBasket : Item
{
[Constructible]
public GreenTeaBasket() : base(0x284B)
{
Weight = 10.0;
}
public GreenTeaBasket() : base(0x284B) => Weight = 10.0;
public GreenTeaBasket(Serial serial) : base(serial)
{

View file

@ -37,10 +37,8 @@ namespace Server.Items
{
[Constructible]
public BeverageBottle(BeverageType type)
: base(type)
{
: base(type) =>
Weight = 1.0;
}
public BeverageBottle(Serial serial)
: base(serial)
@ -114,10 +112,8 @@ namespace Server.Items
{
[Constructible]
public Jug(BeverageType type)
: base(type)
{
: base(type) =>
Weight = 1.0;
}
public Jug(Serial serial)
: base(serial)
@ -154,17 +150,12 @@ namespace Server.Items
public class CeramicMug : BaseBeverage
{
[Constructible]
public CeramicMug()
{
Weight = 1.0;
}
public CeramicMug() => Weight = 1.0;
[Constructible]
public CeramicMug(BeverageType type)
: base(type)
{
: base(type) =>
Weight = 1.0;
}
public CeramicMug(Serial serial)
: base(serial)
@ -202,17 +193,12 @@ namespace Server.Items
public class PewterMug : BaseBeverage
{
[Constructible]
public PewterMug()
{
Weight = 1.0;
}
public PewterMug() => Weight = 1.0;
[Constructible]
public PewterMug(BeverageType type)
: base(type)
{
: base(type) =>
Weight = 1.0;
}
public PewterMug(Serial serial)
: base(serial)
@ -248,17 +234,12 @@ namespace Server.Items
public class Goblet : BaseBeverage
{
[Constructible]
public Goblet()
{
Weight = 1.0;
}
public Goblet() => Weight = 1.0;
[Constructible]
public Goblet(BeverageType type)
: base(type)
{
: base(type) =>
Weight = 1.0;
}
public Goblet(Serial serial)
: base(serial)
@ -296,17 +277,12 @@ namespace Server.Items
public class GlassMug : BaseBeverage
{
[Constructible]
public GlassMug()
{
Weight = 1.0;
}
public GlassMug() => Weight = 1.0;
[Constructible]
public GlassMug(BeverageType type)
: base(type)
{
: base(type) =>
Weight = 1.0;
}
public GlassMug(Serial serial)
: base(serial)
@ -399,17 +375,12 @@ namespace Server.Items
public class Pitcher : BaseBeverage
{
[Constructible]
public Pitcher()
{
Weight = 2.0;
}
public Pitcher() => Weight = 2.0;
[Constructible]
public Pitcher(BeverageType type)
: base(type)
{
: base(type) =>
Weight = 2.0;
}
public Pitcher(Serial serial)
: base(serial)
@ -560,10 +531,7 @@ namespace Server.Items
private BeverageType m_Content;
private int m_Quantity;
public BaseBeverage()
{
ItemID = ComputeItemID();
}
public BaseBeverage() => ItemID = ComputeItemID();
public BaseBeverage(BeverageType type)
{
@ -993,10 +961,7 @@ namespace Server.Items
}
}
public static bool ConsumeTotal(Container pack, BeverageType content, int quantity)
{
return ConsumeTotal(pack, typeof(BaseBeverage), content, quantity);
}
public static bool ConsumeTotal(Container pack, BeverageType content, int quantity) => ConsumeTotal(pack, typeof(BaseBeverage), content, quantity);
public static bool ConsumeTotal(Container pack, Type itemType, BeverageType content, int quantity)
{
@ -1051,10 +1016,7 @@ namespace Server.Items
writer.Write(m_Quantity);
}
protected bool CheckType(string name)
{
return World.LoadingType == $"Server.Items.{name}";
}
protected bool CheckType(string name) => World.LoadingType == $"Server.Items.{name}";
public override void Deserialize(GenericReader reader)
{

View file

@ -4,10 +4,7 @@ namespace Server.Items
public class Glass : Item
{
[Constructible]
public Glass() : base(0x1f81)
{
Weight = 0.1;
}
public Glass() : base(0x1f81) => Weight = 0.1;
public Glass(Serial serial) : base(serial)
{
@ -31,10 +28,7 @@ namespace Server.Items
public class GlassBottle : Item
{
[Constructible]
public GlassBottle() : base(0xe2b)
{
Weight = 0.3;
}
public GlassBottle() : base(0xe2b) => Weight = 0.3;
public GlassBottle(Serial serial) : base(serial)
{

View file

@ -3,10 +3,7 @@ namespace Server.Items
public class EmptyWoodenBowl : Item
{
[Constructible]
public EmptyWoodenBowl() : base(0x15F8)
{
Weight = 1.0;
}
public EmptyWoodenBowl() : base(0x15F8) => Weight = 1.0;
public EmptyWoodenBowl(Serial serial) : base(serial)
{
@ -30,10 +27,7 @@ namespace Server.Items
public class EmptyPewterBowl : Item
{
[Constructible]
public EmptyPewterBowl() : base(0x15FD)
{
Weight = 1.0;
}
public EmptyPewterBowl() : base(0x15FD) => Weight = 1.0;
public EmptyPewterBowl(Serial serial) : base(serial)
{
@ -400,10 +394,7 @@ namespace Server.Items
public class EmptyWoodenTub : Item
{
[Constructible]
public EmptyWoodenTub() : base(0x1605)
{
Weight = 2.0;
}
public EmptyWoodenTub() : base(0x1605) => Weight = 2.0;
public EmptyWoodenTub(Serial serial) : base(serial)
{
@ -428,10 +419,7 @@ namespace Server.Items
public class EmptyPewterTub : Item
{
[Constructible]
public EmptyPewterTub() : base(0x1603)
{
Weight = 2.0;
}
public EmptyPewterTub() : base(0x1603) => Weight = 2.0;
public EmptyPewterTub(Serial serial) : base(serial)
{

View file

@ -4,10 +4,8 @@ namespace Server.Items
{
[Constructible]
public CocoaLiquor()
: base(0x103F)
{
: base(0x103F) =>
Hue = 0x46A;
}
public CocoaLiquor(Serial serial)
: base(serial)
@ -70,10 +68,8 @@ namespace Server.Items
{
[Constructible]
public CocoaButter()
: base(0x1044)
{
: base(0x1044) =>
Hue = 0x457;
}
public CocoaButter(Serial serial)
: base(serial)

View file

@ -8,10 +8,7 @@ namespace Server.Items
[CommandProperty(AccessLevel.GameMaster)]
public int CookingLevel{ get; set; }
public CookableFood(int itemID, int cookingLevel) : base(itemID)
{
CookingLevel = cookingLevel;
}
public CookableFood(int itemID, int cookingLevel) : base(itemID) => CookingLevel = cookingLevel;
public CookableFood(Serial serial) : base(serial)
{
@ -88,10 +85,7 @@ namespace Server.Items
{
private CookableFood m_Item;
public InternalTarget(CookableFood item) : base(1, false, TargetFlags.None)
{
m_Item = item;
}
public InternalTarget(CookableFood item) : base(1, false, TargetFlags.None) => m_Item = item;
protected override void OnTarget(Mobile from, object targeted)
{
@ -186,10 +180,7 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new Ribs();
}
public override Food Cook() => new Ribs();
}
@ -224,10 +215,7 @@ namespace Server.Items
Weight = -1;
}
public override Food Cook()
{
return new LambLeg();
}
public override Food Cook() => new LambLeg();
}
// ********** RawChickenLeg **********
@ -258,10 +246,7 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new ChickenLeg();
}
public override Food Cook() => new ChickenLeg();
}
@ -294,10 +279,7 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new CookedBird();
}
public override Food Cook() => new CookedBird();
}
@ -305,10 +287,7 @@ namespace Server.Items
public class UnbakedPeachCobbler : CookableFood
{
[Constructible]
public UnbakedPeachCobbler() : base(0x1042, 25)
{
Weight = 1.0;
}
public UnbakedPeachCobbler() : base(0x1042, 25) => Weight = 1.0;
public UnbakedPeachCobbler(Serial serial) : base(serial)
{
@ -330,20 +309,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new PeachCobbler();
}
public override Food Cook() => new PeachCobbler();
}
// ********** UnbakedFruitPie **********
public class UnbakedFruitPie : CookableFood
{
[Constructible]
public UnbakedFruitPie() : base(0x1042, 25)
{
Weight = 1.0;
}
public UnbakedFruitPie() : base(0x1042, 25) => Weight = 1.0;
public UnbakedFruitPie(Serial serial) : base(serial)
{
@ -365,20 +338,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new FruitPie();
}
public override Food Cook() => new FruitPie();
}
// ********** UnbakedMeatPie **********
public class UnbakedMeatPie : CookableFood
{
[Constructible]
public UnbakedMeatPie() : base(0x1042, 25)
{
Weight = 1.0;
}
public UnbakedMeatPie() : base(0x1042, 25) => Weight = 1.0;
public UnbakedMeatPie(Serial serial) : base(serial)
{
@ -400,20 +367,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new MeatPie();
}
public override Food Cook() => new MeatPie();
}
// ********** UnbakedPumpkinPie **********
public class UnbakedPumpkinPie : CookableFood
{
[Constructible]
public UnbakedPumpkinPie() : base(0x1042, 25)
{
Weight = 1.0;
}
public UnbakedPumpkinPie() : base(0x1042, 25) => Weight = 1.0;
public UnbakedPumpkinPie(Serial serial) : base(serial)
{
@ -435,20 +396,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new PumpkinPie();
}
public override Food Cook() => new PumpkinPie();
}
// ********** UnbakedApplePie **********
public class UnbakedApplePie : CookableFood
{
[Constructible]
public UnbakedApplePie() : base(0x1042, 25)
{
Weight = 1.0;
}
public UnbakedApplePie() : base(0x1042, 25) => Weight = 1.0;
public UnbakedApplePie(Serial serial) : base(serial)
{
@ -470,10 +425,7 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new ApplePie();
}
public override Food Cook() => new ApplePie();
}
// ********** UncookedCheesePizza **********
@ -481,10 +433,7 @@ namespace Server.Items
public class UncookedCheesePizza : CookableFood
{
[Constructible]
public UncookedCheesePizza() : base(0x1083, 20)
{
Weight = 1.0;
}
public UncookedCheesePizza() : base(0x1083, 20) => Weight = 1.0;
public UncookedCheesePizza(Serial serial) : base(serial)
{
@ -512,20 +461,14 @@ namespace Server.Items
Hue = 0;
}
public override Food Cook()
{
return new CheesePizza();
}
public override Food Cook() => new CheesePizza();
}
// ********** UncookedSausagePizza **********
public class UncookedSausagePizza : CookableFood
{
[Constructible]
public UncookedSausagePizza() : base(0x1083, 20)
{
Weight = 1.0;
}
public UncookedSausagePizza() : base(0x1083, 20) => Weight = 1.0;
public UncookedSausagePizza(Serial serial) : base(serial)
{
@ -547,61 +490,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new SausagePizza();
}
public override Food Cook() => new SausagePizza();
}
#if false
// ********** UncookedPizza **********
public class UncookedPizza : CookableFood
{
[Constructible]
public UncookedPizza() : base( 0x1083, 20 )
{
Weight = 1.0;
}
public UncookedPizza( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
if ( ItemID == 0x1040 )
ItemID = 0x1083;
if ( Hue == 51 )
Hue = 0;
}
public override Food Cook()
{
return new Pizza();
}
}
#endif
// ********** UnbakedQuiche **********
public class UnbakedQuiche : CookableFood
{
[Constructible]
public UnbakedQuiche() : base(0x1042, 25)
{
Weight = 1.0;
}
public UnbakedQuiche() : base(0x1042, 25) => Weight = 1.0;
public UnbakedQuiche(Serial serial) : base(serial)
{
@ -623,10 +519,7 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new Quiche();
}
public override Food Cook() => new Quiche();
}
// ********** Eggs **********
@ -666,10 +559,7 @@ namespace Server.Items
}
}
public override Food Cook()
{
return new FriedEggs();
}
public override Food Cook() => new FriedEggs();
}
// ********** BrightlyColoredEggs **********
@ -702,10 +592,7 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new FriedEggs();
}
public override Food Cook() => new FriedEggs();
}
// ********** EasterEggs **********
@ -738,20 +625,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new FriedEggs();
}
public override Food Cook() => new FriedEggs();
}
// ********** CookieMix **********
public class CookieMix : CookableFood
{
[Constructible]
public CookieMix() : base(0x103F, 20)
{
Weight = 1.0;
}
public CookieMix() : base(0x103F, 20) => Weight = 1.0;
public CookieMix(Serial serial) : base(serial)
{
@ -771,20 +652,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new Cookies();
}
public override Food Cook() => new Cookies();
}
// ********** CakeMix **********
public class CakeMix : CookableFood
{
[Constructible]
public CakeMix() : base(0x103F, 40)
{
Weight = 1.0;
}
public CakeMix() : base(0x103F, 40) => Weight = 1.0;
public CakeMix(Serial serial) : base(serial)
{
@ -806,10 +681,7 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override Food Cook()
{
return new Cake();
}
public override Food Cook() => new Cake();
}
public class RawFishSteak : CookableFood
@ -827,10 +699,7 @@ namespace Server.Items
public override double DefaultWeight => 0.1;
public override Food Cook()
{
return new FishSteak();
}
public override Food Cook() => new FishSteak();
public override void Serialize(GenericWriter writer)
{

View file

@ -65,10 +65,7 @@ namespace Server.Items
{
private Dough m_Item;
public InternalTarget(Dough item) : base(1, false, TargetFlags.None)
{
m_Item = item;
}
public InternalTarget(Dough item) : base(1, false, TargetFlags.None) => m_Item = item;
protected override void OnTarget(Mobile from, object targeted)
{
@ -156,10 +153,7 @@ namespace Server.Items
{
private SweetDough m_Item;
public InternalTarget(SweetDough item) : base(1, false, TargetFlags.None)
{
m_Item = item;
}
public InternalTarget(SweetDough item) : base(1, false, TargetFlags.None) => m_Item = item;
protected override void OnTarget(Mobile from, object targeted)
{
@ -255,10 +249,7 @@ namespace Server.Items
{
private JarHoney m_Item;
public InternalTarget(JarHoney item) : base(1, false, TargetFlags.None)
{
m_Item = item;
}
public InternalTarget(JarHoney item) : base(1, false, TargetFlags.None) => m_Item = item;
protected override void OnTarget(Mobile from, object targeted)
{
@ -287,10 +278,7 @@ namespace Server.Items
public class BowlFlour : Item
{
[Constructible]
public BowlFlour() : base(0xa1e)
{
Weight = 1.0;
}
public BowlFlour() : base(0xa1e) => Weight = 1.0;
public BowlFlour(Serial serial) : base(serial)
{
@ -315,10 +303,7 @@ namespace Server.Items
public class WoodenBowl : Item
{
[Constructible]
public WoodenBowl() : base(0x15f8)
{
Weight = 1.0;
}
public WoodenBowl() : base(0x15f8) => Weight = 1.0;
public WoodenBowl(Serial serial) : base(serial)
{
@ -481,93 +466,11 @@ namespace Server.Items
}
}
#if false
// ********** SackFlourOpen **********
public class SackFlourOpen : Item
{
public override int LabelNumber => 1024166; // open sack of flour
[Constructible]
public SackFlourOpen() : base(UtilityItem.RandomChoice( 0x1046, 0x103a ))
{
Weight = 1.0;
}
public SackFlourOpen( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
public override void OnDoubleClick( Mobile from )
{
if ( !Movable )
return;
from.Target = new InternalTarget( this );
}
private class InternalTarget : Target
{
private SackFlourOpen m_Item;
public InternalTarget( SackFlourOpen item ) : base( 1, false, TargetFlags.None )
{
m_Item = item;
}
protected override void OnTarget( Mobile from, object targeted )
{
if ( m_Item.Deleted ) return;
if ( targeted is WoodenBowl )
{
m_Item.Delete();
((WoodenBowl)targeted).Delete();
from.AddToBackpack( new BowlFlour() );
}
else if ( targeted is TribalBerry )
{
if ( from.Skills.Cooking.Base >= 80.0 )
{
m_Item.Delete();
((TribalBerry)targeted).Delete();
from.AddToBackpack( new TribalPaint() );
from.SendLocalizedMessage( 1042002 ); // You combine the berry and the flour into the tribal paint worn by the savages.
}
else
{
from.SendLocalizedMessage( 1042003 ); // You don't have the cooking skill to create the body paint.
}
}
}
}
}
#endif
// ********** Eggshells **********
public class Eggshells : Item
{
[Constructible]
public Eggshells() : base(0x9b4)
{
Weight = 0.5;
}
public Eggshells() : base(0x9b4) => Weight = 0.5;
public Eggshells(Serial serial) : base(serial)
{

View file

@ -63,10 +63,7 @@ namespace Server.Items
return false;
}
public virtual bool CheckHunger(Mobile from)
{
return FillHunger(from, FillFactor);
}
public virtual bool CheckHunger(Mobile from) => FillHunger(from, FillFactor);
public static bool FillHunger(Mobile from, int fillFactor)
{
@ -253,10 +250,7 @@ namespace Server.Items
public class FishSteak : Food
{
[Constructible]
public FishSteak(int amount = 1) : base(0x97B, amount)
{
FillFactor = 3;
}
public FishSteak(int amount = 1) : base(0x97B, amount) => FillFactor = 3;
public FishSteak(Serial serial) : base(serial)
{
@ -282,10 +276,7 @@ namespace Server.Items
public class CheeseWheel : Food
{
[Constructible]
public CheeseWheel(int amount = 1) : base(0x97E, amount)
{
FillFactor = 3;
}
public CheeseWheel(int amount = 1) : base(0x97E, amount) => FillFactor = 3;
public CheeseWheel(Serial serial) : base(serial)
{
@ -311,10 +302,7 @@ namespace Server.Items
public class CheeseWedge : Food
{
[Constructible]
public CheeseWedge(int amount = 1) : base(0x97D, amount)
{
FillFactor = 3;
}
public CheeseWedge(int amount = 1) : base(0x97D, amount) => FillFactor = 3;
public CheeseWedge(Serial serial) : base(serial)
{
@ -340,10 +328,7 @@ namespace Server.Items
public class CheeseSlice : Food
{
[Constructible]
public CheeseSlice(int amount = 1) : base(0x97C, amount)
{
FillFactor = 1;
}
public CheeseSlice(int amount = 1) : base(0x97C, amount) => FillFactor = 1;
public CheeseSlice(Serial serial) : base(serial)
{
@ -713,37 +698,6 @@ namespace Server.Items
}
}
#if false
public class Pizza : Food
{
[Constructible]
public Pizza() : base( 0x1040 )
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 6;
}
public Pizza( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
#endif
public class FruitPie : Food
{
[Constructible]
@ -1133,10 +1087,7 @@ namespace Server.Items
public class SheafOfHay : Item
{
[Constructible]
public SheafOfHay() : base(0xF36)
{
Weight = 10.0;
}
public SheafOfHay() : base(0xF36) => Weight = 10.0;
public SheafOfHay(Serial serial) : base(serial)
{