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

@ -193,15 +193,9 @@ namespace Server.Items
return false;
}
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
{
return false;
}
public override bool OnDragDropInto(Mobile from, Item item, Point3D p) => false;
public override bool TryDropItem(Mobile from, Item dropped, bool sendFullMessage)
{
return false;
}
public override bool TryDropItem(Mobile from, Item dropped, bool sendFullMessage) => false;
public override void Serialize(GenericWriter writer)
{
@ -236,16 +230,11 @@ namespace Server.Items
public override int DefaultMaxWeight => 1600;
public override bool CheckHold(Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight)
{
return base.CheckHold(m, item, false, checkItems, plusItems, plusWeight);
}
public override bool CheckHold(Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight) => base.CheckHold(m, item, false, checkItems, plusItems, plusWeight);
public override bool CheckContentDisplay(Mobile from)
{
return RootParent is BaseCreature creature && creature.Controlled && creature.ControlMaster == from ||
base.CheckContentDisplay(from);
}
public override bool CheckContentDisplay(Mobile from) =>
RootParent is BaseCreature creature && creature.Controlled && creature.ControlMaster == from ||
base.CheckContentDisplay(from);
public override void Serialize(GenericWriter writer)
{
@ -319,10 +308,7 @@ namespace Server.Items
public class Pouch : TrappableContainer
{
[Constructible]
public Pouch() : base(0xE79)
{
Weight = 1.0;
}
public Pouch() : base(0xE79) => Weight = 1.0;
public Pouch(Serial serial) : base(serial)
{
@ -345,10 +331,7 @@ namespace Server.Items
public abstract class BaseBagBall : BaseContainer, IDyable
{
public BaseBagBall(int itemID) : base(itemID)
{
Weight = 1.0;
}
public BaseBagBall(int itemID) : base(itemID) => Weight = 1.0;
public BaseBagBall(Serial serial) : base(serial)
{
@ -434,10 +417,7 @@ namespace Server.Items
public class Bag : BaseContainer, IDyable
{
[Constructible]
public Bag() : base(0xE76)
{
Weight = 2.0;
}
public Bag() : base(0xE76) => Weight = 2.0;
public Bag(Serial serial) : base(serial)
{
@ -470,10 +450,7 @@ namespace Server.Items
public class Barrel : BaseContainer
{
[Constructible]
public Barrel() : base(0xE77)
{
Weight = 25.0;
}
public Barrel() : base(0xE77) => Weight = 25.0;
public Barrel(Serial serial) : base(serial)
{
@ -500,10 +477,7 @@ namespace Server.Items
public class Keg : BaseContainer
{
[Constructible]
public Keg() : base(0xE7F)
{
Weight = 15.0;
}
public Keg() : base(0xE7F) => Weight = 15.0;
public Keg(Serial serial) : base(serial)
{
@ -527,10 +501,7 @@ namespace Server.Items
public class PicnicBasket : BaseContainer
{
[Constructible]
public PicnicBasket() : base(0xE7A)
{
Weight = 2.0; // Stratics doesn't know weight
}
public PicnicBasket() : base(0xE7A) => Weight = 2.0;
public PicnicBasket(Serial serial) : base(serial)
{
@ -554,10 +525,7 @@ namespace Server.Items
public class Basket : BaseContainer
{
[Constructible]
public Basket() : base(0x990)
{
Weight = 1.0; // Stratics doesn't know weight
}
public Basket() : base(0x990) => Weight = 1.0;
public Basket(Serial serial) : base(serial)
{
@ -583,10 +551,7 @@ namespace Server.Items
public class WoodenBox : LockableContainer
{
[Constructible]
public WoodenBox() : base(0x9AA)
{
Weight = 4.0;
}
public WoodenBox() : base(0x9AA) => Weight = 4.0;
public WoodenBox(Serial serial) : base(serial)
{
@ -612,10 +577,7 @@ namespace Server.Items
public class SmallCrate : LockableContainer
{
[Constructible]
public SmallCrate() : base(0x9A9)
{
Weight = 2.0;
}
public SmallCrate() : base(0x9A9) => Weight = 2.0;
public SmallCrate(Serial serial) : base(serial)
{
@ -644,10 +606,7 @@ namespace Server.Items
public class MediumCrate : LockableContainer
{
[Constructible]
public MediumCrate() : base(0xE3F)
{
Weight = 2.0;
}
public MediumCrate() : base(0xE3F) => Weight = 2.0;
public MediumCrate(Serial serial) : base(serial)
{
@ -676,10 +635,7 @@ namespace Server.Items
public class LargeCrate : LockableContainer
{
[Constructible]
public LargeCrate() : base(0xE3D)
{
Weight = 1.0;
}
public LargeCrate() : base(0xE3D) => Weight = 1.0;
public LargeCrate(Serial serial) : base(serial)
{
@ -801,10 +757,7 @@ namespace Server.Items
public class WoodenChest : LockableContainer
{
[Constructible]
public WoodenChest() : base(0xe43)
{
Weight = 2.0;
}
public WoodenChest() : base(0xe43) => Weight = 2.0;
public WoodenChest(Serial serial) : base(serial)
{
@ -926,10 +879,7 @@ namespace Server.Items
public class WoodenFootLocker : LockableContainer
{
[Constructible]
public WoodenFootLocker() : base(0x2811)
{
GumpID = 0x10B;
}
public WoodenFootLocker() : base(0x2811) => GumpID = 0x10B;
public WoodenFootLocker(Serial serial) : base(serial)
{

View file

@ -12,10 +12,8 @@ namespace Server.Items
protected Timer m_RespawnTimer;
public FillableContainer(int itemID)
: base(itemID)
{
: base(itemID) =>
Movable = false;
}
public FillableContainer(Serial serial)
: base(serial)
@ -271,10 +269,8 @@ namespace Server.Items
{
[Constructible]
public LibraryBookcase()
: base(0xA97)
{
: base(0xA97) =>
Weight = 1.0;
}
public LibraryBookcase(Serial serial)
: base(serial)
@ -284,10 +280,7 @@ namespace Server.Items
public override bool IsLockable => false;
public override int SpawnThreshold => 5;
protected override int GetSpawnCount()
{
return 5 - GetItemsCount();
}
protected override int GetSpawnCount() => 5 - GetItemsCount();
public override void AcquireContent()
{
@ -323,10 +316,8 @@ namespace Server.Items
{
[Constructible]
public FillableLargeCrate()
: base(0xE3D)
{
: base(0xE3D) =>
Weight = 1.0;
}
public FillableLargeCrate(Serial serial)
: base(serial)
@ -353,10 +344,8 @@ namespace Server.Items
{
[Constructible]
public FillableSmallCrate()
: base(0x9A9)
{
: base(0x9A9) =>
Weight = 1.0;
}
public FillableSmallCrate(Serial serial)
: base(serial)
@ -383,10 +372,8 @@ namespace Server.Items
{
[Constructible]
public FillableWoodenBox()
: base(0x9AA)
{
: base(0x9AA) =>
Weight = 4.0;
}
public FillableWoodenBox(Serial serial)
: base(serial)
@ -631,10 +618,8 @@ namespace Server.Items
}
public FillableBvrge(int weight, Type type, BeverageType content)
: base(weight, type)
{
: base(weight, type) =>
Content = content;
}
public BeverageType Content{ get; }

View file

@ -8,10 +8,7 @@ namespace Server.Items
public class TallCabinet : BaseContainer
{
[Constructible]
public TallCabinet() : base(0x2815)
{
Weight = 1.0;
}
public TallCabinet() : base(0x2815) => Weight = 1.0;
public TallCabinet(Serial serial) : base(serial)
{
@ -35,10 +32,7 @@ namespace Server.Items
public class ShortCabinet : BaseContainer
{
[Constructible]
public ShortCabinet() : base(0x2817)
{
Weight = 1.0;
}
public ShortCabinet() : base(0x2817) => Weight = 1.0;
public ShortCabinet(Serial serial) : base(serial)
{
@ -63,10 +57,7 @@ namespace Server.Items
public class RedArmoire : BaseContainer
{
[Constructible]
public RedArmoire() : base(0x2857)
{
Weight = 1.0;
}
public RedArmoire() : base(0x2857) => Weight = 1.0;
public RedArmoire(Serial serial) : base(serial)
{
@ -90,10 +81,7 @@ namespace Server.Items
public class CherryArmoire : BaseContainer
{
[Constructible]
public CherryArmoire() : base(0x285D)
{
Weight = 1.0;
}
public CherryArmoire() : base(0x285D) => Weight = 1.0;
public CherryArmoire(Serial serial) : base(serial)
{
@ -117,10 +105,7 @@ namespace Server.Items
public class MapleArmoire : BaseContainer
{
[Constructible]
public MapleArmoire() : base(0x285B)
{
Weight = 1.0;
}
public MapleArmoire() : base(0x285B) => Weight = 1.0;
public MapleArmoire(Serial serial) : base(serial)
{
@ -144,10 +129,7 @@ namespace Server.Items
public class ElegantArmoire : BaseContainer
{
[Constructible]
public ElegantArmoire() : base(0x2859)
{
Weight = 1.0;
}
public ElegantArmoire() : base(0x2859) => Weight = 1.0;
public ElegantArmoire(Serial serial) : base(serial)
{
@ -171,10 +153,7 @@ namespace Server.Items
public class FullBookcase : BaseContainer
{
[Constructible]
public FullBookcase() : base(0xA97)
{
Weight = 1.0;
}
public FullBookcase() : base(0xA97) => Weight = 1.0;
public FullBookcase(Serial serial) : base(serial)
{
@ -228,10 +207,7 @@ namespace Server.Items
public class Drawer : BaseContainer
{
[Constructible]
public Drawer() : base(0xA2C)
{
Weight = 1.0;
}
public Drawer() : base(0xA2C) => Weight = 1.0;
public Drawer(Serial serial) : base(serial)
{
@ -255,10 +231,7 @@ namespace Server.Items
public class FancyDrawer : BaseContainer
{
[Constructible]
public FancyDrawer() : base(0xA30)
{
Weight = 1.0;
}
public FancyDrawer() : base(0xA30) => Weight = 1.0;
public FancyDrawer(Serial serial) : base(serial)
{
@ -282,10 +255,7 @@ namespace Server.Items
public class Armoire : BaseContainer
{
[Constructible]
public Armoire() : base(0xA4F)
{
Weight = 1.0;
}
public Armoire() : base(0xA4F) => Weight = 1.0;
public Armoire(Serial serial) : base(serial)
{
@ -317,10 +287,7 @@ namespace Server.Items
public class FancyArmoire : BaseContainer
{
[Constructible]
public FancyArmoire() : base(0xA4D)
{
Weight = 1.0;
}
public FancyArmoire() : base(0xA4D) => Weight = 1.0;
public FancyArmoire(Serial serial) : base(serial)
{

View file

@ -8,10 +8,7 @@ namespace Server.Items
{
private bool m_Locked;
public LockableContainer(int itemID) : base(itemID)
{
MaxLockLevel = 100;
}
public LockableContainer(int itemID) : base(itemID) => MaxLockLevel = 100;
public LockableContainer(Serial serial) : base(serial)
{
@ -200,10 +197,7 @@ namespace Server.Items
}
}
public override bool CheckContentDisplay(Mobile from)
{
return !m_Locked && base.CheckContentDisplay(from);
}
public override bool CheckContentDisplay(Mobile from) => !m_Locked && base.CheckContentDisplay(from);
public override bool TryDropItem(Mobile from, Item dropped, bool sendFullMessage)
{

View file

@ -110,12 +110,10 @@ namespace Server.Items
}
}
public override bool IsAccessibleTo(Mobile m)
{
return m_Owner?.Deleted != false || m_House?.Deleted != false ||
m.AccessLevel >= AccessLevel.GameMaster ||
m == m_Owner && m_House.IsCoOwner(m) && base.IsAccessibleTo(m);
}
public override bool IsAccessibleTo(Mobile m) =>
m_Owner?.Deleted != false || m_House?.Deleted != false ||
m.AccessLevel >= AccessLevel.GameMaster ||
m == m_Owner && m_House.IsCoOwner(m) && base.IsAccessibleTo(m);
private void Chop(Mobile from)
{

View file

@ -365,15 +365,9 @@ namespace Server.Items
return false;
}
public override bool CheckItemUse(Mobile from, Item item)
{
return CheckLoot(from, item != this) && base.CheckItemUse(from, item);
}
public override bool CheckItemUse(Mobile from, Item item) => CheckLoot(from, item != this) && base.CheckItemUse(from, item);
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
{
return CheckLoot(from, true) && base.CheckLift(from, item, ref reject);
}
public override bool CheckLift(Mobile from, Item item, ref LRReason reject) => CheckLoot(from, true) && base.CheckLift(from, item, ref reject);
public override void OnItemLifted(Mobile from, Item item)
{