fix: Optimizes items to use default weights. (Part 3) (#2242)

This commit is contained in:
Kamron Batman 2025-07-24 16:21:27 -07:00 committed by GitHub
parent 2c5441731e
commit 40ba85d7b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
104 changed files with 497 additions and 425 deletions

View file

@ -1,39 +1,39 @@
using ModernUO.Serialization; using ModernUO.Serialization;
namespace Server.Items namespace Server.Items;
[SerializationGenerator(0, false)]
[Flippable(0x144e, 0x1453)]
public partial class DaemonArms : BaseArmor
{ {
[SerializationGenerator(0, false)] [Constructible]
[Flippable(0x144e, 0x1453)] public DaemonArms() : base(0x144E)
public partial class DaemonArms : BaseArmor
{ {
[Constructible] Hue = 0x648;
public DaemonArms() : base(0x144E)
{
Weight = 2.0;
Hue = 0x648;
ArmorAttributes.SelfRepair = 1; ArmorAttributes.SelfRepair = 1;
}
public override int BasePhysicalResistance => 6;
public override int BaseFireResistance => 6;
public override int BaseColdResistance => 7;
public override int BasePoisonResistance => 5;
public override int BaseEnergyResistance => 7;
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override int AosStrReq => 55;
public override int OldStrReq => 40;
public override int OldDexBonus => -2;
public override int ArmorBase => 46;
public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone;
public override CraftResource DefaultResource => CraftResource.RegularLeather;
public override int LabelNumber => 1041371; // daemon bone arms
} }
public override double DefaultWeight => 2.0;
public override int BasePhysicalResistance => 6;
public override int BaseFireResistance => 6;
public override int BaseColdResistance => 7;
public override int BasePoisonResistance => 5;
public override int BaseEnergyResistance => 7;
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override int AosStrReq => 55;
public override int OldStrReq => 40;
public override int OldDexBonus => -2;
public override int ArmorBase => 46;
public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone;
public override CraftResource DefaultResource => CraftResource.RegularLeather;
public override int LabelNumber => 1041371; // daemon bone arms
} }

View file

@ -1,39 +1,39 @@
using ModernUO.Serialization; using ModernUO.Serialization;
namespace Server.Items namespace Server.Items;
[SerializationGenerator(0, false)]
[Flippable(0x144f, 0x1454)]
public partial class DaemonChest : BaseArmor
{ {
[SerializationGenerator(0, false)] [Constructible]
[Flippable(0x144f, 0x1454)] public DaemonChest() : base(0x144F)
public partial class DaemonChest : BaseArmor
{ {
[Constructible] Hue = 0x648;
public DaemonChest() : base(0x144F)
{
Weight = 6.0;
Hue = 0x648;
ArmorAttributes.SelfRepair = 1; ArmorAttributes.SelfRepair = 1;
}
public override int BasePhysicalResistance => 6;
public override int BaseFireResistance => 6;
public override int BaseColdResistance => 7;
public override int BasePoisonResistance => 5;
public override int BaseEnergyResistance => 7;
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override int AosStrReq => 60;
public override int OldStrReq => 40;
public override int OldDexBonus => -6;
public override int ArmorBase => 46;
public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone;
public override CraftResource DefaultResource => CraftResource.RegularLeather;
public override int LabelNumber => 1041372; // daemon bone armor
} }
public override double DefaultWeight => 6.0;
public override int BasePhysicalResistance => 6;
public override int BaseFireResistance => 6;
public override int BaseColdResistance => 7;
public override int BasePoisonResistance => 5;
public override int BaseEnergyResistance => 7;
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override int AosStrReq => 60;
public override int OldStrReq => 40;
public override int OldDexBonus => -6;
public override int ArmorBase => 46;
public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone;
public override CraftResource DefaultResource => CraftResource.RegularLeather;
public override int LabelNumber => 1041372; // daemon bone armor
} }

View file

@ -1,39 +1,39 @@
using ModernUO.Serialization; using ModernUO.Serialization;
namespace Server.Items namespace Server.Items;
[SerializationGenerator(0, false)]
[Flippable(0x1450, 0x1455)]
public partial class DaemonGloves : BaseArmor
{ {
[SerializationGenerator(0, false)] [Constructible]
[Flippable(0x1450, 0x1455)] public DaemonGloves() : base(0x1450)
public partial class DaemonGloves : BaseArmor
{ {
[Constructible] Hue = 0x648;
public DaemonGloves() : base(0x1450)
{
Weight = 2.0;
Hue = 0x648;
ArmorAttributes.SelfRepair = 1; ArmorAttributes.SelfRepair = 1;
}
public override int BasePhysicalResistance => 6;
public override int BaseFireResistance => 6;
public override int BaseColdResistance => 7;
public override int BasePoisonResistance => 5;
public override int BaseEnergyResistance => 7;
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override int AosStrReq => 55;
public override int OldStrReq => 40;
public override int OldDexBonus => -1;
public override int ArmorBase => 46;
public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone;
public override CraftResource DefaultResource => CraftResource.RegularLeather;
public override int LabelNumber => 1041373; // daemon bone gloves
} }
public override double DefaultWeight => 2.0;
public override int BasePhysicalResistance => 6;
public override int BaseFireResistance => 6;
public override int BaseColdResistance => 7;
public override int BasePoisonResistance => 5;
public override int BaseEnergyResistance => 7;
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override int AosStrReq => 55;
public override int OldStrReq => 40;
public override int OldDexBonus => -1;
public override int ArmorBase => 46;
public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone;
public override CraftResource DefaultResource => CraftResource.RegularLeather;
public override int LabelNumber => 1041373; // daemon bone gloves
} }

View file

@ -1,39 +1,39 @@
using ModernUO.Serialization; using ModernUO.Serialization;
namespace Server.Items namespace Server.Items;
[SerializationGenerator(0, false)]
[Flippable(0x1452, 0x1457)]
public partial class DaemonLegs : BaseArmor
{ {
[SerializationGenerator(0, false)] [Constructible]
[Flippable(0x1452, 0x1457)] public DaemonLegs() : base(0x1452)
public partial class DaemonLegs : BaseArmor
{ {
[Constructible] Hue = 0x648;
public DaemonLegs() : base(0x1452)
{
Weight = 3.0;
Hue = 0x648;
ArmorAttributes.SelfRepair = 1; ArmorAttributes.SelfRepair = 1;
}
public override int BasePhysicalResistance => 6;
public override int BaseFireResistance => 6;
public override int BaseColdResistance => 7;
public override int BasePoisonResistance => 5;
public override int BaseEnergyResistance => 7;
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override int AosStrReq => 55;
public override int OldStrReq => 40;
public override int OldDexBonus => -4;
public override int ArmorBase => 46;
public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone;
public override CraftResource DefaultResource => CraftResource.RegularLeather;
public override int LabelNumber => 1041375; // daemon bone leggings
} }
public override double DefaultWeight => 3.0;
public override int BasePhysicalResistance => 6;
public override int BaseFireResistance => 6;
public override int BaseColdResistance => 7;
public override int BasePoisonResistance => 5;
public override int BaseEnergyResistance => 7;
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override int AosStrReq => 55;
public override int OldStrReq => 40;
public override int OldDexBonus => -4;
public override int ArmorBase => 46;
public override ArmorMaterialType MaterialType => ArmorMaterialType.Bone;
public override CraftResource DefaultResource => CraftResource.RegularLeather;
public override int LabelNumber => 1041375; // daemon bone leggings
} }

View file

@ -6,11 +6,9 @@ namespace Server.Items
public partial class ElvenGlasses : BaseArmor public partial class ElvenGlasses : BaseArmor
{ {
[Constructible] [Constructible]
public ElvenGlasses() : base(0x2FB8) public ElvenGlasses() : base(0x2FB8) => _weaponAttributes = new AosWeaponAttributes(this);
{
Weight = 2; public override double DefaultWeight => 2.0;
_weaponAttributes = new AosWeaponAttributes(this);
}
public override int LabelNumber => 1032216; // elven glasses public override int LabelNumber => 1032216; // elven glasses

View file

@ -10,11 +10,12 @@ namespace Server.Items
public DaemonHelm() : base(0x1451) public DaemonHelm() : base(0x1451)
{ {
Hue = 0x648; Hue = 0x648;
Weight = 3.0;
ArmorAttributes.SelfRepair = 1; ArmorAttributes.SelfRepair = 1;
} }
public override double DefaultWeight => 3.0;
public override int BasePhysicalResistance => 6; public override int BasePhysicalResistance => 6;
public override int BaseFireResistance => 6; public override int BaseFireResistance => 6;
public override int BaseColdResistance => 7; public override int BaseColdResistance => 7;

View file

@ -9,10 +9,11 @@ namespace Server.Items
[Constructible] [Constructible]
public RangerArms() : base(0x13DC) public RangerArms() : base(0x13DC)
{ {
Weight = 4.0;
Hue = 0x59C; Hue = 0x59C;
} }
public override double DefaultWeight => 4.0;
public override int BasePhysicalResistance => 2; public override int BasePhysicalResistance => 2;
public override int BaseFireResistance => 4; public override int BaseFireResistance => 4;
public override int BaseColdResistance => 3; public override int BaseColdResistance => 3;

View file

@ -9,10 +9,11 @@ namespace Server.Items
[Constructible] [Constructible]
public RangerChest() : base(0x13DB) public RangerChest() : base(0x13DB)
{ {
Weight = 8.0;
Hue = 0x59C; Hue = 0x59C;
} }
public override double DefaultWeight => 8.0;
public override int BasePhysicalResistance => 2; public override int BasePhysicalResistance => 2;
public override int BaseFireResistance => 4; public override int BaseFireResistance => 4;
public override int BaseColdResistance => 3; public override int BaseColdResistance => 3;

View file

@ -9,10 +9,11 @@ namespace Server.Items
[Constructible] [Constructible]
public RangerGloves() : base(0x13D5) public RangerGloves() : base(0x13D5)
{ {
Weight = 1.0;
Hue = 0x59C; Hue = 0x59C;
} }
public override double DefaultWeight => 1.0;
public override int BasePhysicalResistance => 2; public override int BasePhysicalResistance => 2;
public override int BaseFireResistance => 4; public override int BaseFireResistance => 4;
public override int BaseColdResistance => 3; public override int BaseColdResistance => 3;

View file

@ -8,10 +8,11 @@ namespace Server.Items
[Constructible] [Constructible]
public RangerGorget() : base(0x13D6) public RangerGorget() : base(0x13D6)
{ {
Weight = 1.0;
Hue = 0x59C; Hue = 0x59C;
} }
public override double DefaultWeight => 1.0;
public override int BasePhysicalResistance => 2; public override int BasePhysicalResistance => 2;
public override int BaseFireResistance => 4; public override int BaseFireResistance => 4;
public override int BaseColdResistance => 3; public override int BaseColdResistance => 3;

View file

@ -9,10 +9,11 @@ namespace Server.Items
[Constructible] [Constructible]
public RangerLegs() : base(0x13DA) public RangerLegs() : base(0x13DA)
{ {
Weight = 3.0;
Hue = 0x59C; Hue = 0x59C;
} }
public override double DefaultWeight => 3.0;
public override int BasePhysicalResistance => 2; public override int BasePhysicalResistance => 2;
public override int BaseFireResistance => 4; public override int BaseFireResistance => 4;
public override int BaseColdResistance => 3; public override int BaseColdResistance => 3;

View file

@ -7,11 +7,9 @@ namespace Server.Items
public partial class BonePile : Item, IScissorable public partial class BonePile : Item, IScissorable
{ {
[Constructible] [Constructible]
public BonePile() : base(0x1B09 + Utility.Random(8)) public BonePile() : base(0x1B09 + Utility.Random(8)) => Stackable = false;
{
Stackable = false; public override double DefaultWeight => 10.0;
Weight = 10.0;
}
public bool Scissor(Mobile from, Scissors scissors) public bool Scissor(Mobile from, Scissors scissors)
{ {

View file

@ -7,11 +7,9 @@ namespace Server.Items
public partial class RibCage : Item, IScissorable public partial class RibCage : Item, IScissorable
{ {
[Constructible] [Constructible]
public RibCage() : base(0x1B17 + Utility.Random(2)) public RibCage() : base(0x1B17 + Utility.Random(2)) => Stackable = false;
{
Stackable = false; public override double DefaultWeight => 5.0;
Weight = 5.0;
}
public bool Scissor(Mobile from, Scissors scissors) public bool Scissor(Mobile from, Scissors scissors)
{ {

View file

@ -128,12 +128,12 @@ namespace Server.Items
[Constructible] [Constructible]
public RewardCloak(int hue = 0, int labelNumber = 0) : base(0x1515, hue) public RewardCloak(int hue = 0, int labelNumber = 0) : base(0x1515, hue)
{ {
Weight = 5.0;
LootType = LootType.Blessed; LootType = LootType.Blessed;
_number = labelNumber; _number = labelNumber;
} }
public override double DefaultWeight => 5.0;
public override int LabelNumber => _number > 0 ? _number : base.LabelNumber; public override int LabelNumber => _number > 0 ? _number : base.LabelNumber;
public override int BasePhysicalResistance => 3; public override int BasePhysicalResistance => 3;

View file

@ -165,12 +165,12 @@ namespace Server.Items
[Constructible] [Constructible]
public RewardRobe(int hue = 0, int labelNumber = 0) : base(0x1F03, hue) public RewardRobe(int hue = 0, int labelNumber = 0) : base(0x1F03, hue)
{ {
Weight = 3.0;
LootType = LootType.Blessed; LootType = LootType.Blessed;
_number = labelNumber; _number = labelNumber;
} }
public override double DefaultWeight => 3.0;
public override int LabelNumber => _number > 0 ? _number : base.LabelNumber; public override int LabelNumber => _number > 0 ? _number : base.LabelNumber;
public override int BasePhysicalResistance => 3; public override int BasePhysicalResistance => 3;
@ -247,12 +247,12 @@ namespace Server.Items
[Constructible] [Constructible]
public RewardDress(int hue = 0, int labelNumber = 0) : base(0x1F01, hue) public RewardDress(int hue = 0, int labelNumber = 0) : base(0x1F01, hue)
{ {
Weight = 2.0;
LootType = LootType.Blessed; LootType = LootType.Blessed;
_number = labelNumber; _number = labelNumber;
} }
public override double DefaultWeight => 2.0;
public override int LabelNumber => _number > 0 ? _number : base.LabelNumber; public override int LabelNumber => _number > 0 ? _number : base.LabelNumber;
public override int BasePhysicalResistance => 3; public override int BasePhysicalResistance => 3;
@ -418,11 +418,9 @@ namespace Server.Items
public partial class MonkRobe : BaseOuterTorso public partial class MonkRobe : BaseOuterTorso
{ {
[Constructible] [Constructible]
public MonkRobe(int hue = 0x21E) : base(0x2687, hue) public MonkRobe(int hue = 0x21E) : base(0x2687, hue) => StrRequirement = 0;
{
Weight = 1.0; public override double DefaultWeight => 1.0;
StrRequirement = 0;
}
public override int LabelNumber => 1076584; // A monk's robe public override int LabelNumber => 1076584; // A monk's robe
public override bool CanBeBlessed => false; public override bool CanBeBlessed => false;

View file

@ -39,11 +39,9 @@ namespace Server.Items
public partial class ClothNinjaJacket : BaseShirt public partial class ClothNinjaJacket : BaseShirt
{ {
[Constructible] [Constructible]
public ClothNinjaJacket(int hue = 0) : base(0x2794, hue) public ClothNinjaJacket(int hue = 0) : base(0x2794, hue) => Layer = Layer.InnerTorso;
{
Weight = 5.0; public override double DefaultWeight => 5.0;
Layer = Layer.InnerTorso;
}
} }
[SerializationGenerator(0)] [SerializationGenerator(0)]

View file

@ -1,3 +1,4 @@
using System;
using ModernUO.Serialization; using ModernUO.Serialization;
namespace Server.Items; namespace Server.Items;
@ -11,16 +12,11 @@ public partial class Vines : Item
} }
[Constructible] [Constructible]
public Vines(int v) : base(0xCEB) public Vines(int v) : base(0xCEB + Math.Clamp(v, 0, 7))
{ {
if (v is < 0 or > 7)
{
v = 0;
}
ItemID += v;
Weight = 1.0;
} }
public override double DefaultWeight => 1.0;
public override bool ForceShowProperties => ObjectPropertyList.Enabled; public override bool ForceShowProperties => ObjectPropertyList.Enabled;
} }

View file

@ -168,9 +168,10 @@ public partial class CreatureBackpack : Backpack // Used on BaseCreature
Name = name; Name = name;
Layer = Layer.Backpack; Layer = Layer.Backpack;
Hue = 5; Hue = 5;
Weight = 3.0;
} }
public override double DefaultWeight => 3.0;
public override void AddNameProperty(IPropertyList list) public override void AddNameProperty(IPropertyList list)
{ {
if (Name != null) if (Name != null)
@ -213,11 +214,9 @@ public partial class CreatureBackpack : Backpack // Used on BaseCreature
public partial class StrongBackpack : Backpack // Used on Pack animals public partial class StrongBackpack : Backpack // Used on Pack animals
{ {
[Constructible] [Constructible]
public StrongBackpack() public StrongBackpack() => Layer = Layer.Backpack;
{
Layer = Layer.Backpack; public override double DefaultWeight => 13.0;
Weight = 13.0;
}
public override int DefaultMaxWeight => 1600; public override int DefaultMaxWeight => 1600;
@ -233,11 +232,9 @@ public partial class StrongBackpack : Backpack // Used on Pack animals
public partial class Backpack : BaseContainer, IDyable public partial class Backpack : BaseContainer, IDyable
{ {
[Constructible] [Constructible]
public Backpack() : base(0xE75) public Backpack() : base(0xE75) => Layer = Layer.Backpack;
{
Layer = Layer.Backpack; public override double DefaultWeight => 3.0;
Weight = 3.0;
}
public override int DefaultMaxWeight public override int DefaultMaxWeight
{ {

View file

@ -19,11 +19,12 @@ public partial class SalvageBag : Bag
[Constructible] [Constructible]
public SalvageBag(int hue) public SalvageBag(int hue)
{ {
Weight = 2.0;
Hue = hue; Hue = hue;
m_Failure = false; m_Failure = false;
} }
public override double DefaultWeight => 2.0;
public override int LabelNumber => 1079931; // Salvage Bag public override int LabelNumber => 1079931; // Salvage Bag
public override void GetContextMenuEntries(Mobile from, ref PooledRefList<ContextMenuEntry> list) public override void GetContextMenuEntries(Mobile from, ref PooledRefList<ContextMenuEntry> list)

View file

@ -10,10 +10,11 @@ public partial class BarkeepContract : Item
[Constructible] [Constructible]
public BarkeepContract() : base(0x14F0) public BarkeepContract() : base(0x14F0)
{ {
Weight = 1.0;
LootType = LootType.Blessed; LootType = LootType.Blessed;
} }
public override double DefaultWeight => 1.0;
public override string DefaultName => "a barkeep contract"; public override string DefaultName => "a barkeep contract";
public override void OnDoubleClick(Mobile from) public override void OnDoubleClick(Mobile from)

View file

@ -58,10 +58,11 @@ public partial class ClothingBlessDeed : Item // Create the item class which is
[Constructible] [Constructible]
public ClothingBlessDeed() : base(0x14F0) public ClothingBlessDeed() : base(0x14F0)
{ {
Weight = 1.0;
LootType = LootType.Blessed; LootType = LootType.Blessed;
} }
public override double DefaultWeight => 1.0;
public override string DefaultName => "a clothing bless deed"; public override string DefaultName => "a clothing bless deed";
public override bool DisplayLootType => false; public override bool DisplayLootType => false;

View file

@ -19,7 +19,6 @@ public partial class CommodityDeed : Item
[Constructible] [Constructible]
public CommodityDeed(Item commodity = null) : base(0x14F0) public CommodityDeed(Item commodity = null) : base(0x14F0)
{ {
Weight = 1.0;
Hue = 0x47; Hue = 0x47;
Commodity = commodity; Commodity = commodity;
@ -27,6 +26,8 @@ public partial class CommodityDeed : Item
LootType = LootType.Blessed; LootType = LootType.Blessed;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => Commodity == null ? 1047016 : 1047017; public override int LabelNumber => Commodity == null ? 1047016 : 1047017;
public bool SetCommodity(Item item) public bool SetCommodity(Item item)

View file

@ -11,10 +11,11 @@ public partial class HairRestylingDeed : Item
[Constructible] [Constructible]
public HairRestylingDeed() : base(0x14F0) public HairRestylingDeed() : base(0x14F0)
{ {
Weight = 1.0;
LootType = LootType.Blessed; LootType = LootType.Blessed;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041061; // a coupon for a free hair restyling public override int LabelNumber => 1041061; // a coupon for a free hair restyling
public override void OnDoubleClick(Mobile from) public override void OnDoubleClick(Mobile from)

View file

@ -13,10 +13,11 @@ public partial class HolidayTreeDeed : Item
public HolidayTreeDeed() : base(0x14F0) public HolidayTreeDeed() : base(0x14F0)
{ {
Hue = 0x488; Hue = 0x488;
Weight = 1.0;
LootType = LootType.Blessed; LootType = LootType.Blessed;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041116; // a deed for a holiday tree public override int LabelNumber => 1041116; // a deed for a holiday tree
public bool ValidatePlacement(Mobile from, Point3D loc) public bool ValidatePlacement(Mobile from, Point3D loc)

View file

@ -15,10 +15,11 @@ public partial class NewPlayerTicket : Item
[Constructible] [Constructible]
public NewPlayerTicket() : base(0x14EF) public NewPlayerTicket() : base(0x14EF)
{ {
Weight = 1.0;
LootType = LootType.Blessed; LootType = LootType.Blessed;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1062094; // a young player ticket public override int LabelNumber => 1062094; // a young player ticket
public override bool DisplayLootType => false; public override bool DisplayLootType => false;

View file

@ -31,13 +31,13 @@ public partial class VendorRentalContract : Item
[Constructible] [Constructible]
public VendorRentalContract() : base(0x14F0) public VendorRentalContract() : base(0x14F0)
{ {
Weight = 1.0;
Hue = 0x672; Hue = 0x672;
_duration = VendorRentalDuration.Instances[0]; _duration = VendorRentalDuration.Instances[0];
Price = 1500; Price = 1500;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1062332; // a vendor rental contract public override int LabelNumber => 1062332; // a vendor rental contract
public VendorRentalDuration Duration public VendorRentalDuration Duration

View file

@ -20,9 +20,10 @@ public partial class WasabiClumps : Food
public WasabiClumps() : base(0x24EB) public WasabiClumps() : base(0x24EB)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -34,7 +35,6 @@ public partial class EmptyBentoBox : Item
} }
public override double DefaultWeight => 5.0; public override double DefaultWeight => 5.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -44,20 +44,10 @@ public partial class BentoBox : Food
public BentoBox() : base(0x2836) public BentoBox() : base(0x2836)
{ {
Stackable = false; Stackable = false;
Weight = 5.0;
FillFactor = 2; FillFactor = 2;
} }
public override bool Eat(Mobile from) public override double DefaultWeight => 5.0;
{
if (!base.Eat(from))
{
return false;
}
from.AddToBackpack(new EmptyBentoBox());
return true;
}
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -67,9 +57,10 @@ public partial class SushiRolls : Food
public SushiRolls() : base(0x283E) public SushiRolls() : base(0x283E)
{ {
Stackable = false; Stackable = false;
Weight = 3.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 3.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -79,9 +70,10 @@ public partial class SushiPlatter : Food
public SushiPlatter() : base(0x2840) public SushiPlatter() : base(0x2840)
{ {
Stackable = Core.ML; Stackable = Core.ML;
Weight = 3.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 3.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -102,9 +94,10 @@ public partial class GreenTea : Food
public GreenTea() : base(0x284C) public GreenTea() : base(0x284C)
{ {
Stackable = false; Stackable = false;
Weight = 4.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 4.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -114,9 +107,10 @@ public partial class MisoSoup : Food
public MisoSoup() : base(0x284D) public MisoSoup() : base(0x284D)
{ {
Stackable = false; Stackable = false;
Weight = 4.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 4.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -126,9 +120,10 @@ public partial class WhiteMisoSoup : Food
public WhiteMisoSoup() : base(0x284E) public WhiteMisoSoup() : base(0x284E)
{ {
Stackable = false; Stackable = false;
Weight = 4.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 4.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -138,9 +133,10 @@ public partial class RedMisoSoup : Food
public RedMisoSoup() : base(0x284F) public RedMisoSoup() : base(0x284F)
{ {
Stackable = false; Stackable = false;
Weight = 4.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 4.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -150,7 +146,8 @@ public partial class AwaseMisoSoup : Food
public AwaseMisoSoup() : base(0x2850) public AwaseMisoSoup() : base(0x2850)
{ {
Stackable = false; Stackable = false;
Weight = 4.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 4.0;
} }

View file

@ -31,10 +31,11 @@ public partial class WoodenBowlOfCarrots : Food
public WoodenBowlOfCarrots() : base(0x15F9) public WoodenBowlOfCarrots() : base(0x15F9)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 1.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -54,10 +55,11 @@ public partial class WoodenBowlOfCorn : Food
public WoodenBowlOfCorn() : base(0x15FA) public WoodenBowlOfCorn() : base(0x15FA)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 1.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -77,10 +79,11 @@ public partial class WoodenBowlOfLettuce : Food
public WoodenBowlOfLettuce() : base(0x15FB) public WoodenBowlOfLettuce() : base(0x15FB)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 1.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -100,10 +103,11 @@ public partial class WoodenBowlOfPeas : Food
public WoodenBowlOfPeas() : base(0x15FC) public WoodenBowlOfPeas() : base(0x15FC)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 1.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -123,10 +127,11 @@ public partial class PewterBowlOfCarrots : Food
public PewterBowlOfCarrots() : base(0x15FE) public PewterBowlOfCarrots() : base(0x15FE)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 1.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -146,10 +151,11 @@ public partial class PewterBowlOfCorn : Food
public PewterBowlOfCorn() : base(0x15FF) public PewterBowlOfCorn() : base(0x15FF)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 1.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -169,10 +175,11 @@ public partial class PewterBowlOfLettuce : Food
public PewterBowlOfLettuce() : base(0x1600) public PewterBowlOfLettuce() : base(0x1600)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 1.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -192,10 +199,11 @@ public partial class PewterBowlOfPeas : Food
public PewterBowlOfPeas() : base(0x1601) public PewterBowlOfPeas() : base(0x1601)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 1.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -215,10 +223,11 @@ public partial class PewterBowlOfPotatos : Food
public PewterBowlOfPotatos() : base(0x1602) public PewterBowlOfPotatos() : base(0x1602)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 1.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -262,10 +271,11 @@ public partial class WoodenBowlOfStew : Food
public WoodenBowlOfStew() : base(0x1604) public WoodenBowlOfStew() : base(0x1604)
{ {
Stackable = false; Stackable = false;
Weight = 2.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 2.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -285,10 +295,11 @@ public partial class WoodenBowlOfTomatoSoup : Food
public WoodenBowlOfTomatoSoup() : base(0x1606) public WoodenBowlOfTomatoSoup() : base(0x1606)
{ {
Stackable = false; Stackable = false;
Weight = 2.0;
FillFactor = 2; FillFactor = 2;
} }
public override double DefaultWeight => 2.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))

View file

@ -76,11 +76,12 @@ public partial class RawRibs : CookableFood
[Constructible] [Constructible]
public RawRibs(int amount = 1) : base(0x9F1, 10) public RawRibs(int amount = 1) : base(0x9F1, 10)
{ {
Weight = 1.0;
Stackable = true; Stackable = true;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
public override Food Cook() => new Ribs(); public override Food Cook() => new Ribs();
} }
@ -103,10 +104,11 @@ public partial class RawChickenLeg : CookableFood
[Constructible] [Constructible]
public RawChickenLeg() : base(0x1607, 10) public RawChickenLeg() : base(0x1607, 10)
{ {
Weight = 1.0;
Stackable = true; Stackable = true;
} }
public override double DefaultWeight => 1.0;
public override Food Cook() => new ChickenLeg(); public override Food Cook() => new ChickenLeg();
} }
@ -116,11 +118,12 @@ public partial class RawBird : CookableFood
[Constructible] [Constructible]
public RawBird(int amount = 1) : base(0x9B9, 10) public RawBird(int amount = 1) : base(0x9B9, 10)
{ {
Weight = 1.0;
Stackable = true; Stackable = true;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
public override Food Cook() => new CookedBird(); public override Food Cook() => new CookedBird();
} }
@ -251,11 +254,12 @@ public partial class Eggs : CookableFood
[Constructible] [Constructible]
public Eggs(int amount = 1) : base(0x9B5, 15) public Eggs(int amount = 1) : base(0x9B5, 15)
{ {
Weight = 1.0;
Stackable = true; Stackable = true;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
public override Food Cook() => new FriedEggs(); public override Food Cook() => new FriedEggs();
} }
@ -265,12 +269,11 @@ public partial class BrightlyColoredEggs : CookableFood
[Constructible] [Constructible]
public BrightlyColoredEggs() : base(0x9B5, 15) public BrightlyColoredEggs() : base(0x9B5, 15)
{ {
Weight = 0.5;
Hue = 3 + Utility.Random(20) * 5; Hue = 3 + Utility.Random(20) * 5;
} }
public override double DefaultWeight => 0.5;
public override string DefaultName => "brightly colored eggs"; public override string DefaultName => "brightly colored eggs";
public override Food Cook() => new FriedEggs(); public override Food Cook() => new FriedEggs();
} }
@ -280,12 +283,11 @@ public partial class EasterEggs : CookableFood
[Constructible] [Constructible]
public EasterEggs() : base(0x9B5, 15) public EasterEggs() : base(0x9B5, 15)
{ {
Weight = 0.5;
Hue = 3 + Utility.Random(20) * 5; Hue = 3 + Utility.Random(20) * 5;
} }
public override double DefaultWeight => 0.5;
public override int LabelNumber => 1016105; // Easter Eggs public override int LabelNumber => 1016105; // Easter Eggs
public override Food Cook() => new FriedEggs(); public override Food Cook() => new FriedEggs();
} }

View file

@ -11,8 +11,9 @@ public partial class Dough : Item
public Dough() : base(0x103d) public Dough() : base(0x103d)
{ {
Stackable = Core.ML; Stackable = Core.ML;
Weight = 1.0;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -22,10 +23,10 @@ public partial class SweetDough : Item
public SweetDough() : base(0x103d) public SweetDough() : base(0x103d)
{ {
Stackable = Core.ML; Stackable = Core.ML;
Weight = 1.0;
Hue = 150; Hue = 150;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041340; // sweet dough public override int LabelNumber => 1041340; // sweet dough
} }
@ -35,9 +36,10 @@ public partial class JarHoney : Item
[Constructible] [Constructible]
public JarHoney() : base(0x9ec) public JarHoney() : base(0x9ec)
{ {
Weight = 1.0;
Stackable = true; Stackable = true;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -69,10 +71,11 @@ public partial class SackFlour : Item, IHasQuantity
[Constructible] [Constructible]
public SackFlour() : base(0x1039) public SackFlour() : base(0x1039)
{ {
Weight = 5.0;
_quantity = 20; _quantity = 20;
} }
public override double DefaultWeight => 5.0;
[SerializableProperty(0)] [SerializableProperty(0)]
[CommandProperty(AccessLevel.GameMaster)] [CommandProperty(AccessLevel.GameMaster)]
public int Quantity public int Quantity
@ -121,11 +124,12 @@ public partial class WheatSheaf : Item
[Constructible] [Constructible]
public WheatSheaf(int amount = 1) : base(7869) public WheatSheaf(int amount = 1) : base(7869)
{ {
Weight = 1.0;
Stackable = true; Stackable = true;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
public override void OnDoubleClick(Mobile from) public override void OnDoubleClick(Mobile from)
{ {
if (Movable) if (Movable)

View file

@ -133,9 +133,10 @@ public partial class BreadLoaf : Food
[Constructible] [Constructible]
public BreadLoaf(int amount = 1) : base(0x103B, amount) public BreadLoaf(int amount = 1) : base(0x103B, amount)
{ {
Weight = 1.0;
FillFactor = 3; FillFactor = 3;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -144,9 +145,10 @@ public partial class Bacon : Food
[Constructible] [Constructible]
public Bacon(int amount = 1) : base(0x979, amount) public Bacon(int amount = 1) : base(0x979, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -155,9 +157,10 @@ public partial class SlabOfBacon : Food
[Constructible] [Constructible]
public SlabOfBacon(int amount = 1) : base(0x976, amount) public SlabOfBacon(int amount = 1) : base(0x976, amount)
{ {
Weight = 1.0;
FillFactor = 3; FillFactor = 3;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -202,9 +205,10 @@ public partial class FrenchBread : Food
[Constructible] [Constructible]
public FrenchBread(int amount = 1) : base(0x98C, amount) public FrenchBread(int amount = 1) : base(0x98C, amount)
{ {
Weight = 2.0;
FillFactor = 3; FillFactor = 3;
} }
public override double DefaultWeight => 2.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -213,9 +217,10 @@ public partial class FriedEggs : Food
[Constructible] [Constructible]
public FriedEggs(int amount = 1) : base(0x9B6, amount) public FriedEggs(int amount = 1) : base(0x9B6, amount)
{ {
Weight = 1.0;
FillFactor = 4; FillFactor = 4;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -224,9 +229,10 @@ public partial class CookedBird : Food
[Constructible] [Constructible]
public CookedBird(int amount = 1) : base(0x9B7, amount) public CookedBird(int amount = 1) : base(0x9B7, amount)
{ {
Weight = 1.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -235,9 +241,10 @@ public partial class RoastPig : Food
[Constructible] [Constructible]
public RoastPig(int amount = 1) : base(0x9BB, amount) public RoastPig(int amount = 1) : base(0x9BB, amount)
{ {
Weight = 45.0;
FillFactor = 20; FillFactor = 20;
} }
public override double DefaultWeight => 45.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -246,9 +253,10 @@ public partial class Sausage : Food
[Constructible] [Constructible]
public Sausage(int amount = 1) : base(0x9C0, amount) public Sausage(int amount = 1) : base(0x9C0, amount)
{ {
Weight = 1.0;
FillFactor = 4; FillFactor = 4;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -257,9 +265,10 @@ public partial class Ham : Food
[Constructible] [Constructible]
public Ham(int amount = 1) : base(0x9C9, amount) public Ham(int amount = 1) : base(0x9C9, amount)
{ {
Weight = 1.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -269,9 +278,10 @@ public partial class Cake : Food
public Cake() : base(0x9E9) public Cake() : base(0x9E9)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 10; FillFactor = 10;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -280,9 +290,10 @@ public partial class Ribs : Food
[Constructible] [Constructible]
public Ribs(int amount = 1) : base(0x9F2, amount) public Ribs(int amount = 1) : base(0x9F2, amount)
{ {
Weight = 1.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -292,9 +303,10 @@ public partial class Cookies : Food
public Cookies() : base(0x160b) public Cookies() : base(0x160b)
{ {
Stackable = Core.ML; Stackable = Core.ML;
Weight = 1.0;
FillFactor = 4; FillFactor = 4;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -304,9 +316,10 @@ public partial class Muffins : Food
public Muffins() : base(0x9eb) public Muffins() : base(0x9eb)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 4; FillFactor = 4;
} }
public override double DefaultWeight => 1.0;
} }
[TypeAlias("Server.Items.Pizza")] [TypeAlias("Server.Items.Pizza")]
@ -317,10 +330,10 @@ public partial class CheesePizza : Food
public CheesePizza() : base(0x1040) public CheesePizza() : base(0x1040)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 6; FillFactor = 6;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1044516; // cheese pizza public override int LabelNumber => 1044516; // cheese pizza
} }
@ -331,10 +344,10 @@ public partial class SausagePizza : Food
public SausagePizza() : base(0x1040) public SausagePizza() : base(0x1040)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 6; FillFactor = 6;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1044517; // sausage pizza public override int LabelNumber => 1044517; // sausage pizza
} }
@ -345,10 +358,10 @@ public partial class FruitPie : Food
public FruitPie() : base(0x1041) public FruitPie() : base(0x1041)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041346; // baked fruit pie public override int LabelNumber => 1041346; // baked fruit pie
} }
@ -359,10 +372,10 @@ public partial class MeatPie : Food
public MeatPie() : base(0x1041) public MeatPie() : base(0x1041)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041347; // baked meat pie public override int LabelNumber => 1041347; // baked meat pie
} }
@ -373,10 +386,10 @@ public partial class PumpkinPie : Food
public PumpkinPie() : base(0x1041) public PumpkinPie() : base(0x1041)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041348; // baked pumpkin pie public override int LabelNumber => 1041348; // baked pumpkin pie
} }
@ -387,10 +400,10 @@ public partial class ApplePie : Food
public ApplePie() : base(0x1041) public ApplePie() : base(0x1041)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041343; // baked apple pie public override int LabelNumber => 1041343; // baked apple pie
} }
@ -401,10 +414,10 @@ public partial class PeachCobbler : Food
public PeachCobbler() : base(0x1041) public PeachCobbler() : base(0x1041)
{ {
Stackable = false; Stackable = false;
Weight = 1.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041344; // baked peach cobbler public override int LabelNumber => 1041344; // baked peach cobbler
} }
@ -415,10 +428,10 @@ public partial class Quiche : Food
public Quiche() : base(0x1041) public Quiche() : base(0x1041)
{ {
Stackable = Core.ML; Stackable = Core.ML;
Weight = 1.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041345; // baked quiche public override int LabelNumber => 1041345; // baked quiche
} }
@ -428,9 +441,10 @@ public partial class LambLeg : Food
[Constructible] [Constructible]
public LambLeg(int amount = 1) : base(0x160a, amount) public LambLeg(int amount = 1) : base(0x160a, amount)
{ {
Weight = 2.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 2.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -439,9 +453,10 @@ public partial class ChickenLeg : Food
[Constructible] [Constructible]
public ChickenLeg(int amount = 1) : base(0x1608, amount) public ChickenLeg(int amount = 1) : base(0x1608, amount)
{ {
Weight = 1.0;
FillFactor = 4; FillFactor = 4;
} }
public override double DefaultWeight => 1.0;
} }
[Flippable(0xC74, 0xC75)] [Flippable(0xC74, 0xC75)]
@ -451,9 +466,10 @@ public partial class HoneydewMelon : Food
[Constructible] [Constructible]
public HoneydewMelon(int amount = 1) : base(0xC74, amount) public HoneydewMelon(int amount = 1) : base(0xC74, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[Flippable(0xC64, 0xC65)] [Flippable(0xC64, 0xC65)]
@ -463,9 +479,10 @@ public partial class YellowGourd : Food
[Constructible] [Constructible]
public YellowGourd(int amount = 1) : base(0xC64, amount) public YellowGourd(int amount = 1) : base(0xC64, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[Flippable(0xC66, 0xC67)] [Flippable(0xC66, 0xC67)]
@ -475,9 +492,10 @@ public partial class GreenGourd : Food
[Constructible] [Constructible]
public GreenGourd(int amount = 1) : base(0xC66, amount) public GreenGourd(int amount = 1) : base(0xC66, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[Flippable(0xC7F, 0xC81)] [Flippable(0xC7F, 0xC81)]
@ -487,9 +505,10 @@ public partial class EarOfCorn : Food
[Constructible] [Constructible]
public EarOfCorn(int amount = 1) : base(0xC81, amount) public EarOfCorn(int amount = 1) : base(0xC81, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -498,9 +517,10 @@ public partial class Turnip : Food
[Constructible] [Constructible]
public Turnip(int amount = 1) : base(0xD3A, amount) public Turnip(int amount = 1) : base(0xD3A, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]

View file

@ -8,11 +8,12 @@ public partial class FruitBasket : Food
[Constructible] [Constructible]
public FruitBasket() : base(0x993) public FruitBasket() : base(0x993)
{ {
Weight = 2.0;
FillFactor = 5; FillFactor = 5;
Stackable = false; Stackable = false;
} }
public override double DefaultWeight => 2.0;
public override bool Eat(Mobile from) public override bool Eat(Mobile from)
{ {
if (!base.Eat(from)) if (!base.Eat(from))
@ -32,9 +33,10 @@ public partial class Banana : Food
[Constructible] [Constructible]
public Banana(int amount = 1) : base(0x171f, amount) public Banana(int amount = 1) : base(0x171f, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[Flippable(0x1721, 0x1722)] [Flippable(0x1721, 0x1722)]
@ -44,9 +46,10 @@ public partial class Bananas : Food
[Constructible] [Constructible]
public Bananas(int amount = 1) : base(0x1721, amount) public Bananas(int amount = 1) : base(0x1721, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -55,9 +58,10 @@ public partial class SplitCoconut : Food
[Constructible] [Constructible]
public SplitCoconut(int amount = 1) : base(0x1725, amount) public SplitCoconut(int amount = 1) : base(0x1725, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -66,9 +70,10 @@ public partial class Lemon : Food
[Constructible] [Constructible]
public Lemon(int amount = 1) : base(0x1728, amount) public Lemon(int amount = 1) : base(0x1728, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -77,9 +82,10 @@ public partial class Lemons : Food
[Constructible] [Constructible]
public Lemons(int amount = 1) : base(0x1729, amount) public Lemons(int amount = 1) : base(0x1729, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -88,9 +94,10 @@ public partial class Lime : Food
[Constructible] [Constructible]
public Lime(int amount = 1) : base(0x172a, amount) public Lime(int amount = 1) : base(0x172a, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -99,9 +106,10 @@ public partial class Limes : Food
[Constructible] [Constructible]
public Limes(int amount = 1) : base(0x172B, amount) public Limes(int amount = 1) : base(0x172B, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -110,9 +118,10 @@ public partial class Coconut : Food
[Constructible] [Constructible]
public Coconut(int amount = 1) : base(0x1726, amount) public Coconut(int amount = 1) : base(0x1726, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -121,9 +130,10 @@ public partial class OpenCoconut : Food
[Constructible] [Constructible]
public OpenCoconut(int amount = 1) : base(0x1723, amount) public OpenCoconut(int amount = 1) : base(0x1723, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -132,9 +142,10 @@ public partial class Dates : Food
[Constructible] [Constructible]
public Dates(int amount = 1) : base(0x1727, amount) public Dates(int amount = 1) : base(0x1727, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -143,9 +154,10 @@ public partial class Grapes : Food
[Constructible] [Constructible]
public Grapes(int amount = 1) : base(0x9D1, amount) public Grapes(int amount = 1) : base(0x9D1, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -154,9 +166,10 @@ public partial class Peach : Food
[Constructible] [Constructible]
public Peach(int amount = 1) : base(0x9D2, amount) public Peach(int amount = 1) : base(0x9D2, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -165,9 +178,10 @@ public partial class Pear : Food
[Constructible] [Constructible]
public Pear(int amount = 1) : base(0x994, amount) public Pear(int amount = 1) : base(0x994, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -176,9 +190,10 @@ public partial class Apple : Food
[Constructible] [Constructible]
public Apple(int amount = 1) : base(0x9D0, amount) public Apple(int amount = 1) : base(0x9D0, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -187,9 +202,10 @@ public partial class Watermelon : Food
[Constructible] [Constructible]
public Watermelon(int amount = 1) : base(0xC5C, amount) public Watermelon(int amount = 1) : base(0xC5C, amount)
{ {
Weight = 5.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 5.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -198,9 +214,10 @@ public partial class SmallWatermelon : Food
[Constructible] [Constructible]
public SmallWatermelon(int amount = 1) : base(0xC5D, amount) public SmallWatermelon(int amount = 1) : base(0xC5D, amount)
{ {
Weight = 5.0;
FillFactor = 5; FillFactor = 5;
} }
public override double DefaultWeight => 5.0;
} }
[Flippable(0xc72, 0xc73)] [Flippable(0xc72, 0xc73)]
@ -210,9 +227,10 @@ public partial class Squash : Food
[Constructible] [Constructible]
public Squash(int amount = 1) : base(0xc72, amount) public Squash(int amount = 1) : base(0xc72, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }
[Flippable(0xc79, 0xc7a)] [Flippable(0xc79, 0xc7a)]
@ -222,7 +240,8 @@ public partial class Cantaloupe : Food
[Constructible] [Constructible]
public Cantaloupe(int amount = 1) : base(0xc79, amount) public Cantaloupe(int amount = 1) : base(0xc79, amount)
{ {
Weight = 1.0;
FillFactor = 1; FillFactor = 1;
} }
public override double DefaultWeight => 1.0;
} }

View file

@ -19,10 +19,10 @@ public abstract partial class BaseBoard : Container, ISecurable
public BaseBoard(int itemID) : base(itemID) public BaseBoard(int itemID) : base(itemID)
{ {
CreatePieces(); CreatePieces();
Weight = 5.0;
} }
public override double DefaultWeight => 5.0;
public override bool DisplaysContent => false; // Do not display (x items, y stones) public override bool DisplaysContent => false; // Do not display (x items, y stones)
public override bool IsDecoContainer => false; public override bool IsDecoContainer => false;

View file

@ -43,8 +43,6 @@ public partial class MahjongGame : Item, ISecurable
[Constructible] [Constructible]
public MahjongGame() : base(0xFAA) public MahjongGame() : base(0xFAA)
{ {
Weight = 5.0;
BuildWalls(); BuildWalls();
_dealerIndicator = _dealerIndicator =
new MahjongDealerIndicator(this, new Point2D(300, 300), MahjongPieceDirection.Up, MahjongWind.North); new MahjongDealerIndicator(this, new Point2D(300, 300), MahjongPieceDirection.Up, MahjongWind.North);
@ -55,6 +53,8 @@ public partial class MahjongGame : Item, ISecurable
_level = SecureLevel.CoOwners; _level = SecureLevel.CoOwners;
} }
public override double DefaultWeight => 5.0;
[CommandProperty(AccessLevel.GameMaster)] [CommandProperty(AccessLevel.GameMaster)]
[SerializableProperty(6)] [SerializableProperty(6)]
public bool ShowScores public bool ShowScores

View file

@ -13,11 +13,12 @@ public partial class GuildTeleporter : Item
[Constructible] [Constructible]
public GuildTeleporter(Item stone = null) : base(0x1869) public GuildTeleporter(Item stone = null) : base(0x1869)
{ {
Weight = 1.0;
LootType = LootType.Blessed; LootType = LootType.Blessed;
_stone = stone; _stone = stone;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041054; // guildstone teleporter public override int LabelNumber => 1041054; // guildstone teleporter
public override bool DisplayLootType => false; public override bool DisplayLootType => false;

View file

@ -228,10 +228,10 @@ public partial class GuildstoneDeed : Item
_guild = g; _guild = g;
_guildName = guildName; _guildName = guildName;
_guildAbbrev = abbrev; _guildAbbrev = abbrev;
Weight = 1.0;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041233; // deed to a guildstone public override int LabelNumber => 1041233; // deed to a guildstone
public override void GetProperties(IPropertyList list) public override void GetProperties(IPropertyList list)

View file

@ -13,8 +13,9 @@ public partial class Brazier : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = true; Burning = true;
Light = LightType.Circle225; Light = LightType.Circle225;
Weight = 20.0;
} }
public override double DefaultWeight => 20.0;
public override int LitItemID => 0xE31; public override int LitItemID => 0xE31;
} }

View file

@ -13,8 +13,9 @@ public partial class BrazierTall : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = true; Burning = true;
Light = LightType.Circle300; Light = LightType.Circle300;
Weight = 25.0;
} }
public override double DefaultWeight => 25.0;
public override int LitItemID => 0x19AA; public override int LitItemID => 0x19AA;
} }

View file

@ -16,9 +16,10 @@ public partial class Candelabra : BaseLight, IShipwreckedItem
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle225; Light = LightType.Circle225;
Weight = 3.0;
} }
public override double DefaultWeight => 3.0;
public override int LitItemID => 0xB1D; public override int LitItemID => 0xB1D;
public override int UnlitItemID => 0xA27; public override int UnlitItemID => 0xA27;

View file

@ -12,9 +12,9 @@ public partial class CandelabraStand : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle225; Light = LightType.Circle225;
Weight = 20.0;
} }
public override double DefaultWeight => 20.0;
public override int LitItemID => 0xB26; public override int LitItemID => 0xB26;
public override int UnlitItemID => 0xA29; public override int UnlitItemID => 0xA29;
} }

View file

@ -14,9 +14,9 @@ public partial class Candle : BaseEquipableLight
Stackable = true; Stackable = true;
Light = LightType.Circle150; Light = LightType.Circle150;
Weight = 1.0;
} }
public override double DefaultWeight => 1.0;
public override int LitItemID => 0xA0F; public override int LitItemID => 0xA0F;
public override int UnlitItemID => 0xA28; public override int UnlitItemID => 0xA28;
} }

View file

@ -10,12 +10,11 @@ public partial class CandleLarge : BaseLight
public CandleLarge() : base(0xA26) public CandleLarge() : base(0xA26)
{ {
Duration = Burnout ? TimeSpan.FromMinutes(25) : TimeSpan.Zero; Duration = Burnout ? TimeSpan.FromMinutes(25) : TimeSpan.Zero;
Burning = false; Burning = false;
Light = LightType.Circle150; Light = LightType.Circle150;
Weight = 2.0;
} }
public override double DefaultWeight => 2.0;
public override int LitItemID => 0xB1A; public override int LitItemID => 0xB1A;
public override int UnlitItemID => 0xA26; public override int UnlitItemID => 0xA26;
} }

View file

@ -10,12 +10,12 @@ public partial class CandleLong : BaseLight
public CandleLong() : base(0x1433) public CandleLong() : base(0x1433)
{ {
Duration = Burnout ? TimeSpan.FromMinutes(30) : TimeSpan.Zero; Duration = Burnout ? TimeSpan.FromMinutes(30) : TimeSpan.Zero;
Burning = false; Burning = false;
Light = LightType.Circle150; Light = LightType.Circle150;
Weight = 1.0;
} }
public override double DefaultWeight => 1.0;
public override int LitItemID => 0x1430; public override int LitItemID => 0x1430;
public override int UnlitItemID => 0x1433; public override int UnlitItemID => 0x1433;
} }

View file

@ -10,12 +10,12 @@ public partial class CandleShort : BaseLight
public CandleShort() : base(0x142F) public CandleShort() : base(0x142F)
{ {
Duration = Burnout ? TimeSpan.FromMinutes(25) : TimeSpan.Zero; Duration = Burnout ? TimeSpan.FromMinutes(25) : TimeSpan.Zero;
Burning = false; Burning = false;
Light = LightType.Circle150; Light = LightType.Circle150;
Weight = 1.0;
} }
public override double DefaultWeight => 1.0;
public override int LitItemID => 0x142C; public override int LitItemID => 0x142C;
public override int UnlitItemID => 0x142F; public override int UnlitItemID => 0x142F;
} }

View file

@ -13,9 +13,10 @@ public partial class CandleSkull : BaseLight
Burning = false; Burning = false;
Light = LightType.Circle150; Light = LightType.Circle150;
Weight = 5.0;
} }
public override double DefaultWeight => 5.0;
public override int LitItemID => ItemID is 0x1583 or 0x1854 ? 0x1854 : 0x1858; public override int LitItemID => ItemID is 0x1583 or 0x1854 ? 0x1854 : 0x1858;
public override int UnlitItemID => ItemID is 0x1853 or 0x1584 ? 0x1853 : 0x1857; public override int UnlitItemID => ItemID is 0x1853 or 0x1584 ? 0x1853 : 0x1857;

View file

@ -13,9 +13,9 @@ public partial class HangingLantern : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle300; Light = LightType.Circle300;
Weight = 40.0;
} }
public override double DefaultWeight => 40.0;
public override int LitItemID => 0xA1A; public override int LitItemID => 0xA1A;
public override int UnlitItemID => 0xA1D; public override int UnlitItemID => 0xA1D;
} }

View file

@ -10,12 +10,12 @@ public partial class HeatingStand : BaseLight
public HeatingStand() : base(0x1849) public HeatingStand() : base(0x1849)
{ {
Duration = Burnout ? TimeSpan.FromMinutes(25) : TimeSpan.Zero; Duration = Burnout ? TimeSpan.FromMinutes(25) : TimeSpan.Zero;
Burning = false; Burning = false;
Light = LightType.Empty; Light = LightType.Empty;
Weight = 1.0;
} }
public override double DefaultWeight => 1.0;
public override int LitItemID => 0x184A; public override int LitItemID => 0x184A;
public override int UnlitItemID => 0x1849; public override int UnlitItemID => 0x1849;

View file

@ -13,9 +13,9 @@ public partial class LampPost1 : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle300; Light = LightType.Circle300;
Weight = 40.0;
} }
public override double DefaultWeight => 40.0;
public override int LitItemID => 0xB20; public override int LitItemID => 0xB20;
public override int UnlitItemID => 0xB21; public override int UnlitItemID => 0xB21;
} }

View file

@ -13,9 +13,9 @@ public partial class LampPost2 : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle300; Light = LightType.Circle300;
Weight = 40.0;
} }
public override double DefaultWeight => 40.0;
public override int LitItemID => 0xB22; public override int LitItemID => 0xB22;
public override int UnlitItemID => 0xB23; public override int UnlitItemID => 0xB23;
} }

View file

@ -13,9 +13,9 @@ public partial class LampPost3 : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle300; Light = LightType.Circle300;
Weight = 40.0;
} }
public override double DefaultWeight => 40.0;
public override int LitItemID => 0xB24; public override int LitItemID => 0xB24;
public override int UnlitItemID => 0xB25; public override int UnlitItemID => 0xB25;
} }

View file

@ -15,9 +15,10 @@ public partial class Lantern : BaseEquipableLight
Burning = false; Burning = false;
Light = LightType.Circle300; Light = LightType.Circle300;
Weight = 2.0;
} }
public override double DefaultWeight => 2.0;
public override int LitItemID => ItemID is 0xA15 or 0xA17 ? ItemID : 0xA22; public override int LitItemID => ItemID is 0xA15 or 0xA17 ? ItemID : 0xA22;
public override int UnlitItemID => ItemID == 0xA18 ? ItemID : 0xA25; public override int UnlitItemID => ItemID == 0xA18 ? ItemID : 0xA25;

View file

@ -14,9 +14,9 @@ public partial class PaperLantern : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle150; Light = LightType.Circle150;
Weight = 3.0;
} }
public override double DefaultWeight => 3.0;
public override int LitItemID => 0x24BD; public override int LitItemID => 0x24BD;
public override int UnlitItemID => 0x24BE; public override int UnlitItemID => 0x24BE;
} }

View file

@ -14,9 +14,10 @@ public partial class RedHangingLantern : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle300; Light = LightType.Circle300;
Weight = 3.0;
} }
public override double DefaultWeight => 3.0;
public override int LitItemID => ItemID == 0x24C2 ? 0x24C1 : 0x24C3; public override int LitItemID => ItemID == 0x24C2 ? 0x24C1 : 0x24C3;
public override int UnlitItemID => ItemID == 0x24C1 ? 0x24C2 : 0x24C4; public override int UnlitItemID => ItemID == 0x24C1 ? 0x24C2 : 0x24C4;

View file

@ -14,9 +14,10 @@ public partial class RoundPaperLantern : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle150; Light = LightType.Circle150;
Weight = 3.0;
} }
public override double DefaultWeight => 3.0;
public override int LitItemID => 0x24C9; public override int LitItemID => 0x24C9;
public override int UnlitItemID => 0x24CA; public override int UnlitItemID => 0x24CA;
} }

View file

@ -14,9 +14,9 @@ public partial class ShojiLantern : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle150; Light = LightType.Circle150;
Weight = 3.0;
} }
public override double DefaultWeight => 3.0;
public override int LitItemID => 0x24BB; public override int LitItemID => 0x24BB;
public override int UnlitItemID => 0x24BC; public override int UnlitItemID => 0x24BC;
} }

View file

@ -15,9 +15,10 @@ public partial class Torch : BaseEquipableLight
Stackable = true; Stackable = true;
Light = LightType.Circle300; Light = LightType.Circle300;
Weight = 1.0;
} }
public override double DefaultWeight => 1.0;
public override int LitItemID => 0xA12; public override int LitItemID => 0xA12;
public override int UnlitItemID => 0xF6B; public override int UnlitItemID => 0xF6B;

View file

@ -14,9 +14,10 @@ public partial class WallSconce : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.WestBig; Light = LightType.WestBig;
Weight = 3.0;
} }
public override double DefaultWeight => 3.0;
public override int LitItemID => ItemID == 0x9FB ? 0x9FD : 0xA02; public override int LitItemID => ItemID == 0x9FB ? 0x9FD : 0xA02;
public override int UnlitItemID => ItemID == 0x9FD ? 0x9FB : 0xA00; public override int UnlitItemID => ItemID == 0x9FD ? 0x9FB : 0xA00;

View file

@ -14,9 +14,10 @@ public partial class WallTorch : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.WestBig; Light = LightType.WestBig;
Weight = 3.0;
} }
public override double DefaultWeight => 3.0;
public override int LitItemID => ItemID == 0xA05 ? 0xA07 : 0xA0C; public override int LitItemID => ItemID == 0xA05 ? 0xA07 : 0xA0C;
public override int UnlitItemID => ItemID == 0xA07 ? 0xA05 : 0xA0A; public override int UnlitItemID => ItemID == 0xA07 ? 0xA05 : 0xA0A;

View file

@ -14,9 +14,10 @@ public partial class WhiteHangingLantern : BaseLight
Duration = TimeSpan.Zero; // Never burnt out Duration = TimeSpan.Zero; // Never burnt out
Burning = false; Burning = false;
Light = LightType.Circle300; Light = LightType.Circle300;
Weight = 3.0;
} }
public override double DefaultWeight => 3.0;
public override int LitItemID => ItemID == 0x24C6 ? 0x24C5 : 0x24C7; public override int LitItemID => ItemID == 0x24C6 ? 0x24C5 : 0x24C7;
public override int UnlitItemID => ItemID == 0x24C5 ? 0x24C6 : 0x24C8; public override int UnlitItemID => ItemID == 0x24C5 ? 0x24C6 : 0x24C8;

View file

@ -42,13 +42,14 @@ public partial class MapItem : Item, ICraftable
[Constructible] [Constructible]
public MapItem(Map facet = null) : base(0x14EC) public MapItem(Map facet = null) : base(0x14EC)
{ {
Weight = 1.0;
_width = 200; _width = 200;
_height = 200; _height = 200;
_facet = facet; _facet = facet;
_pins = new List<Point2D>(); _pins = new List<Point2D>();
} }
public override double DefaultWeight => 1.0;
public int OnCraft( public int OnCraft(
int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool,
CraftItem craftItem, int resHue CraftItem craftItem, int resHue

View file

@ -9,12 +9,12 @@ public partial class RobeOfTheEclipse : BaseOuterTorso
[Constructible] [Constructible]
public RobeOfTheEclipse() : base(0x1F03, 0x486) public RobeOfTheEclipse() : base(0x1F03, 0x486)
{ {
Weight = 3.0;
Attributes.Luck = 95; Attributes.Luck = 95;
// TODO: Supports arcane? // TODO: Supports arcane?
} }
public override double DefaultWeight => 3.0;
public override int LabelNumber => 1075082; // Robe of the Eclipse public override int LabelNumber => 1075082; // Robe of the Eclipse
} }

View file

@ -9,13 +9,13 @@ public partial class RobeOfTheEquinox : BaseOuterTorso
[Constructible] [Constructible]
public RobeOfTheEquinox() : base(0x1F04, 0xD6) public RobeOfTheEquinox() : base(0x1F04, 0xD6)
{ {
Weight = 3.0;
Attributes.Luck = 95; Attributes.Luck = 95;
// TODO: Supports arcane? // TODO: Supports arcane?
// TODO: Elves Only // TODO: Elves Only
} }
public override double DefaultWeight => 3.0;
public override int LabelNumber => 1075042; // Robe of the Equinox public override int LabelNumber => 1075042; // Robe of the Equinox
} }

View file

@ -13,9 +13,10 @@ public partial class ArcaneGem : Item
public ArcaneGem() : base(0x1EA7) public ArcaneGem() : base(0x1EA7)
{ {
Stackable = Core.ML; Stackable = Core.ML;
Weight = 1.0;
} }
public override double DefaultWeight => 1.0;
public override string DefaultName => "arcane gem"; public override string DefaultName => "arcane gem";
public override void OnDoubleClick(Mobile from) public override void OnDoubleClick(Mobile from)

View file

@ -20,13 +20,14 @@ public partial class BankCheck : Item
[Constructible] [Constructible]
public BankCheck(int worth) : base(0x14F0) public BankCheck(int worth) : base(0x14F0)
{ {
Weight = 1.0;
Hue = 0x34; Hue = 0x34;
LootType = LootType.Blessed; LootType = LootType.Blessed;
_worth = worth; _worth = worth;
} }
public override double DefaultWeight => 1.0;
public override bool DisplayLootType => Core.AOS; public override bool DisplayLootType => Core.AOS;
public override int LabelNumber => 1041361; // A bank check public override int LabelNumber => 1041361; // A bank check

View file

@ -8,8 +8,9 @@ public partial class Beeswax : Item
[Constructible] [Constructible]
public Beeswax(int amount = 1) : base(0x1422) public Beeswax(int amount = 1) : base(0x1422)
{ {
Weight = 1.0;
Stackable = true; Stackable = true;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
} }

View file

@ -12,11 +12,12 @@ public partial class Bola : Item
[Constructible] [Constructible]
public Bola(int amount = 1) : base(0x26AC) public Bola(int amount = 1) : base(0x26AC)
{ {
Weight = 4.0;
Stackable = true; Stackable = true;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 4.0;
public override void OnDoubleClick(Mobile from) public override void OnDoubleClick(Mobile from)
{ {
if (!IsChildOf(from.Backpack)) if (!IsChildOf(from.Backpack))

View file

@ -8,9 +8,10 @@ public partial class BolaBall : Item
[Constructible] [Constructible]
public BolaBall(int amount = 1) : base(0xE73) public BolaBall(int amount = 1) : base(0xE73)
{ {
Weight = 4.0;
Stackable = true; Stackable = true;
Amount = amount; Amount = amount;
Hue = 0x8AC; Hue = 0x8AC;
} }
public override double DefaultWeight => 4.0;
} }

View file

@ -34,10 +34,11 @@ public partial class ClockworkAssembly : Item
[Constructible] [Constructible]
public ClockworkAssembly() : base(0x1EA8) public ClockworkAssembly() : base(0x1EA8)
{ {
Weight = 5.0;
Hue = 1102; Hue = 1102;
} }
public override double DefaultWeight => 5.0;
public override int LabelNumber => 1073426; // Clockwork Assembly public override int LabelNumber => 1073426; // Clockwork Assembly
public override void OnDoubleClick(Mobile from) public override void OnDoubleClick(Mobile from)

View file

@ -22,10 +22,11 @@ public partial class InteriorDecorator : Item
[Constructible] [Constructible]
public InteriorDecorator() : base(0xFC1) public InteriorDecorator() : base(0xFC1)
{ {
Weight = 1.0;
LootType = LootType.Blessed; LootType = LootType.Blessed;
} }
public override double DefaultWeight => 1.0;
[CommandProperty(AccessLevel.GameMaster)] [CommandProperty(AccessLevel.GameMaster)]
public DecorateCommand Command public DecorateCommand Command
{ {

View file

@ -47,13 +47,13 @@ public partial class Key : Item
public Key(KeyType type, uint val = 0, Item link = null) : base((int)type) public Key(KeyType type, uint val = 0, Item link = null) : base((int)type)
{ {
Weight = 1.0;
_maxRange = 3; _maxRange = 3;
_keyValue = val; _keyValue = val;
_link = link; _link = link;
} }
public override double DefaultWeight => 1.0;
public static uint RandomValue() => (uint)(0xFFFFFFFE * Utility.RandomDouble()) + 1; public static uint RandomValue() => (uint)(0xFFFFFFFE * Utility.RandomDouble()) + 1;
public static void RemoveKeys(Mobile m, uint keyValue) public static void RemoveKeys(Mobile m, uint keyValue)

View file

@ -15,10 +15,11 @@ public partial class KeyRing : Item
[Constructible] [Constructible]
public KeyRing() : base(0x1011) public KeyRing() : base(0x1011)
{ {
Weight = 1.0; // They seem to have no weight on OSI ?!
_keys = new List<Key>(); _keys = new List<Key>();
} }
public override double DefaultWeight => 1.0;
public override bool OnDragDrop(Mobile from, Item dropped) public override bool OnDragDrop(Mobile from, Item dropped)
{ {
if (!IsChildOf(from.Backpack)) if (!IsChildOf(from.Backpack))

View file

@ -8,15 +8,10 @@ public partial class MinotaurArtifact : Item
[Constructible] [Constructible]
public MinotaurArtifact() : base(Utility.RandomList(0xB46, 0xB48, 0x9ED)) public MinotaurArtifact() : base(Utility.RandomList(0xB46, 0xB48, 0x9ED))
{ {
if (ItemID == 0x9ED)
{
Weight = 30;
}
LootType = LootType.Blessed; LootType = LootType.Blessed;
Hue = 0x100; Hue = 0x100;
} }
public override int LabelNumber => 1074826; // Minotaur Artifact public override int LabelNumber => 1074826; // Minotaur Artifact
public override double DefaultWeight => 5.0; public override double DefaultWeight => ItemID == 0x9ED ? 30.0 : 5.0;
} }

View file

@ -20,11 +20,9 @@ public partial class Moonstone : Item
private MoonstoneType _type; private MoonstoneType _type;
[Constructible] [Constructible]
public Moonstone(MoonstoneType type) : base(0xF8B) public Moonstone(MoonstoneType type) : base(0xF8B) => _type = type;
{
Weight = 1.0; public override double DefaultWeight => 1.0;
_type = type;
}
public override int LabelNumber => 1041490 + (int)_type; public override int LabelNumber => 1041490 + (int)_type;

View file

@ -11,9 +11,10 @@ public abstract partial class PromotionalToken : Item
{ {
LootType = LootType.Blessed; LootType = LootType.Blessed;
Light = LightType.Circle300; Light = LightType.Circle300;
Weight = 5.0;
} }
public override double DefaultWeight => 5.0;
public abstract TextDefinition ItemName { get; } public abstract TextDefinition ItemName { get; }
public abstract TextDefinition ItemReceiveMessage { get; } public abstract TextDefinition ItemReceiveMessage { get; }
public abstract TextDefinition ItemGumpName { get; } public abstract TextDefinition ItemGumpName { get; }

View file

@ -9,9 +9,10 @@ public partial class Rope : Item
public Rope(int amount = 1) : base(0x14F8) public Rope(int amount = 1) : base(0x14F8)
{ {
Stackable = true; Stackable = true;
Weight = 1.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -21,9 +22,10 @@ public partial class IronWire : Item
public IronWire(int amount = 1) : base(0x1876) public IronWire(int amount = 1) : base(0x1876)
{ {
Stackable = true; Stackable = true;
Weight = 5.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 5.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -33,9 +35,10 @@ public partial class SilverWire : Item
public SilverWire(int amount = 1) : base(0x1877) public SilverWire(int amount = 1) : base(0x1877)
{ {
Stackable = true; Stackable = true;
Weight = 5.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 5.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -45,9 +48,10 @@ public partial class GoldWire : Item
public GoldWire(int amount = 1) : base(0x1878) public GoldWire(int amount = 1) : base(0x1878)
{ {
Stackable = true; Stackable = true;
Weight = 5.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 5.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -57,9 +61,10 @@ public partial class CopperWire : Item
public CopperWire(int amount = 1) : base(0x1879) public CopperWire(int amount = 1) : base(0x1879)
{ {
Stackable = true; Stackable = true;
Weight = 5.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 5.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -69,9 +74,10 @@ public partial class WhiteDriedFlowers : Item
public WhiteDriedFlowers(int amount = 1) : base(0xC3C) public WhiteDriedFlowers(int amount = 1) : base(0xC3C)
{ {
Stackable = true; Stackable = true;
Weight = 1.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -81,9 +87,10 @@ public partial class GreenDriedFlowers : Item
public GreenDriedFlowers(int amount = 1) : base(0xC3E) public GreenDriedFlowers(int amount = 1) : base(0xC3E)
{ {
Stackable = true; Stackable = true;
Weight = 1.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -93,9 +100,10 @@ public partial class DriedOnions : Item
public DriedOnions(int amount = 1) : base(0xC40) public DriedOnions(int amount = 1) : base(0xC40)
{ {
Stackable = true; Stackable = true;
Weight = 1.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]
@ -105,9 +113,10 @@ public partial class DriedHerbs : Item
public DriedHerbs(int amount = 1) : base(0xC42) public DriedHerbs(int amount = 1) : base(0xC42)
{ {
Stackable = true; Stackable = true;
Weight = 1.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
} }
[SerializationGenerator(0, false)] [SerializationGenerator(0, false)]

View file

@ -9,11 +9,9 @@ namespace Server.Items;
public partial class SpecialBeardDye : Item public partial class SpecialBeardDye : Item
{ {
[Constructible] [Constructible]
public SpecialBeardDye() : base(0xE26) public SpecialBeardDye() : base(0xE26) => LootType = LootType.Newbied;
{
Weight = 1.0; public override double DefaultWeight => 1.0;
LootType = LootType.Newbied;
}
public override int LabelNumber => 1041087; // Special Beard Dye public override int LabelNumber => 1041087; // Special Beard Dye

View file

@ -9,11 +9,9 @@ namespace Server.Items;
public partial class SpecialHairDye : Item public partial class SpecialHairDye : Item
{ {
[Constructible] [Constructible]
public SpecialHairDye() : base(0xE26) public SpecialHairDye() : base(0xE26) => LootType = LootType.Newbied;
{
Weight = 1.0; public override double DefaultWeight => 1.0;
LootType = LootType.Newbied;
}
public override int LabelNumber => 1074402; public override int LabelNumber => 1074402;

View file

@ -8,11 +8,12 @@ public partial class TribalBerry : Item
[Constructible] [Constructible]
public TribalBerry(int amount = 1) : base(0x9D0) public TribalBerry(int amount = 1) : base(0x9D0)
{ {
Weight = 1.0;
Stackable = true; Stackable = true;
Amount = amount; Amount = amount;
Hue = 6; Hue = 6;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1040001; // tribal berry public override int LabelNumber => 1040001; // tribal berry
} }

View file

@ -16,10 +16,11 @@ public partial class TribalPaint : Item
public TribalPaint() : base(0x9EC) public TribalPaint() : base(0x9EC)
{ {
Hue = 2101; Hue = 2101;
Weight = 2.0;
Stackable = Core.ML; Stackable = Core.ML;
} }
public override double DefaultWeight => 2.0;
public override int LabelNumber => 1040000; // savage kin paint public override int LabelNumber => 1040000; // savage kin paint
public override void OnDoubleClick(Mobile from) public override void OnDoubleClick(Mobile from)

View file

@ -73,7 +73,6 @@ public partial class BaseQuiver : Container, ICraftable, IAosItem
public BaseQuiver(int itemID = 0x2FB7) : base(itemID) public BaseQuiver(int itemID = 0x2FB7) : base(itemID)
{ {
Weight = 2.0;
Capacity = 500; Capacity = 500;
Layer = Layer.Cloak; Layer = Layer.Cloak;

View file

@ -9,12 +9,13 @@ public partial class Fish : Item, ICarvable
public Fish(int amount = 1) : base(Utility.Random(0x09CC, 4)) public Fish(int amount = 1) : base(Utility.Random(0x09CC, 4))
{ {
Stackable = true; Stackable = true;
Weight = 1.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
public void Carve(Mobile from, Item item) public void Carve(Mobile from, Item item)
{ {
ScissorHelper(from, new RawFishSteak(), 4); ScissorHelper(from, new RawFishSteak(), 4);
} }
} }

View file

@ -11,10 +11,11 @@ public partial class BoltOfCloth : Item, IScissorable, IDyable, ICommodity
public BoltOfCloth(int amount = 1) : base(0xF95) public BoltOfCloth(int amount = 1) : base(0xF95)
{ {
Stackable = true; Stackable = true;
Weight = 5.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 5.0;
int ICommodity.DescriptionNumber => LabelNumber; int ICommodity.DescriptionNumber => LabelNumber;
bool ICommodity.IsDeedable => true; bool ICommodity.IsDeedable => true;
@ -48,4 +49,4 @@ public partial class BoltOfCloth : Item, IScissorable, IDyable, ICommodity
var amount = (Amount * 50).ToString(); var amount = (Amount * 50).ToString();
from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x3B2, 3, number, "", amount); from.NetState.SendMessageLocalized(Serial, ItemID, MessageType.Label, 0x3B2, 3, number, "", amount);
} }
} }

View file

@ -10,9 +10,10 @@ public partial class Bone : Item, ICommodity
{ {
Stackable = true; Stackable = true;
Amount = amount; Amount = amount;
Weight = 1.0;
} }
public override double DefaultWeight => 1.0;
int ICommodity.DescriptionNumber => LabelNumber; int ICommodity.DescriptionNumber => LabelNumber;
bool ICommodity.IsDeedable => true; bool ICommodity.IsDeedable => true;
} }

View file

@ -10,10 +10,11 @@ public partial class Cotton : Item, IDyable
public Cotton(int amount = 1) : base(0xDF9) public Cotton(int amount = 1) : base(0xDF9)
{ {
Stackable = true; Stackable = true;
Weight = 4.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 4.0;
public bool Dye(Mobile from, DyeTub sender) public bool Dye(Mobile from, DyeTub sender)
{ {
if (Deleted) if (Deleted)

View file

@ -8,13 +8,13 @@ public abstract partial class BaseHides : Item, ICommodity
public BaseHides(CraftResource resource, int amount = 1) : base(0x1079) public BaseHides(CraftResource resource, int amount = 1) : base(0x1079)
{ {
Stackable = true; Stackable = true;
Weight = 5.0;
Amount = amount; Amount = amount;
Hue = CraftResources.GetHue(resource); Hue = CraftResources.GetHue(resource);
_resource = resource; _resource = resource;
} }
public override double DefaultWeight => 5.0;
[SerializableProperty(0)] [SerializableProperty(0)]
[CommandProperty(AccessLevel.GameMaster)] [CommandProperty(AccessLevel.GameMaster)]
public CraftResource Resource public CraftResource Resource

View file

@ -8,13 +8,13 @@ public abstract partial class BaseLeather : Item, ICommodity
public BaseLeather(CraftResource resource, int amount = 1) : base(0x1081) public BaseLeather(CraftResource resource, int amount = 1) : base(0x1081)
{ {
Stackable = true; Stackable = true;
Weight = 1.0;
Amount = amount; Amount = amount;
Hue = CraftResources.GetHue(resource); Hue = CraftResources.GetHue(resource);
_resource = resource; _resource = resource;
} }
public override double DefaultWeight => 1.0;
[SerializableProperty(0)] [SerializableProperty(0)]
[CommandProperty(AccessLevel.GameMaster)] [CommandProperty(AccessLevel.GameMaster)]
public CraftResource Resource public CraftResource Resource

View file

@ -10,10 +10,11 @@ public partial class Wool : Item, IDyable
public Wool(int amount = 1) : base(0xDF8) public Wool(int amount = 1) : base(0xDF8)
{ {
Stackable = true; Stackable = true;
Weight = 4.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 4.0;
public bool Dye(Mobile from, DyeTub sender) public bool Dye(Mobile from, DyeTub sender)
{ {
if (Deleted) if (Deleted)
@ -99,10 +100,11 @@ public partial class TaintedWool : Wool
public TaintedWool(int amount = 1) : base(0x101F) public TaintedWool(int amount = 1) : base(0x101F)
{ {
Stackable = true; Stackable = true;
Weight = 4.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 4.0;
public override void OnSpun(ISpinningWheel wheel, Mobile from, int hue) public override void OnSpun(ISpinningWheel wheel, Mobile from, int hue)
{ {
from.AddToBackpack(new DarkYarn from.AddToBackpack(new DarkYarn

View file

@ -9,10 +9,11 @@ public abstract partial class BaseClothMaterial : Item, IDyable
public BaseClothMaterial(int itemID, int amount = 1) : base(itemID) public BaseClothMaterial(int itemID, int amount = 1) : base(itemID)
{ {
Stackable = true; Stackable = true;
Weight = 1.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 1.0;
public bool Dye(Mobile from, DyeTub sender) public bool Dye(Mobile from, DyeTub sender)
{ {
if (Deleted) if (Deleted)

View file

@ -13,10 +13,10 @@ public partial class ChaosShield : BaseShield
{ {
LootType = LootType.Newbied; LootType = LootType.Newbied;
} }
Weight = 5.0;
} }
public override double DefaultWeight => 4.0;
public override int BasePhysicalResistance => 1; public override int BasePhysicalResistance => 1;
public override int BaseFireResistance => 0; public override int BaseFireResistance => 0;
public override int BaseColdResistance => 0; public override int BaseColdResistance => 0;

View file

@ -13,10 +13,10 @@ public partial class OrderShield : BaseShield
{ {
LootType = LootType.Newbied; LootType = LootType.Newbied;
} }
Weight = 7.0;
} }
public override double DefaultWeight => 7.0;
public override int BasePhysicalResistance => 1; public override int BasePhysicalResistance => 1;
public override int BaseFireResistance => 0; public override int BaseFireResistance => 0;
public override int BaseColdResistance => 0; public override int BaseColdResistance => 0;

View file

@ -11,10 +11,11 @@ public partial class Kindling : Item
public Kindling(int amount = 1) : base(0xDE1) public Kindling(int amount = 1) : base(0xDE1)
{ {
Stackable = true; Stackable = true;
Weight = 5.0;
Amount = amount; Amount = amount;
} }
public override double DefaultWeight => 5.0;
public override void OnDoubleClick(Mobile from) public override void OnDoubleClick(Mobile from)
{ {
if (!VerifyMove(from)) if (!VerifyMove(from))

View file

@ -9,11 +9,9 @@ namespace Server.Items;
public partial class FishingPole : Item public partial class FishingPole : Item
{ {
[Constructible] [Constructible]
public FishingPole() : base(0x0DC0) public FishingPole() : base(0x0DC0) => Layer = Layer.TwoHanded;
{
Layer = Layer.TwoHanded; public override double DefaultWeight => 8.0;
Weight = 8.0;
}
public override void OnDoubleClick(Mobile from) public override void OnDoubleClick(Mobile from)
{ {

View file

@ -17,11 +17,12 @@ public partial class MessageInABottle : Item
[Constructible] [Constructible]
public MessageInABottle(Map map, int level) : base(0x099F) public MessageInABottle(Map map, int level) : base(0x099F)
{ {
Weight = 1.0;
TargetMap = map ?? Map.Trammel; TargetMap = map ?? Map.Trammel;
_level = level; _level = level;
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber => 1041080; // a message in a bottle public override int LabelNumber => 1041080; // a message in a bottle
[SerializableProperty(0)] [SerializableProperty(0)]

View file

@ -77,8 +77,6 @@ public partial class SOS : Item
[Constructible] [Constructible]
public SOS(Map map, int level) : base(0x14EE) public SOS(Map map, int level) : base(0x14EE)
{ {
Weight = 1.0;
_level = level; _level = level;
MessageIndex = Utility.Random(MessageEntries.Length); MessageIndex = Utility.Random(MessageEntries.Length);
TargetMap = map ?? Map.Trammel; TargetMap = map ?? Map.Trammel;
@ -87,6 +85,8 @@ public partial class SOS : Item
UpdateHue(); UpdateHue();
} }
public override double DefaultWeight => 1.0;
public override int LabelNumber public override int LabelNumber
{ {
get get

View file

@ -1,3 +1,4 @@
using System;
using ModernUO.Serialization; using ModernUO.Serialization;
namespace Server.Items; namespace Server.Items;
@ -12,16 +13,10 @@ public partial class ShipwreckedItem : Item, IDyable, IShipwreckedItem
{ {
public ShipwreckedItem(int itemID) : base(itemID) public ShipwreckedItem(int itemID) : base(itemID)
{ {
var weight = ItemData.Weight;
if (weight >= 255)
{
weight = 1;
}
Weight = weight;
} }
public override double DefaultWeight => ItemData.Weight >= 255 ? 1.0 : ItemData.Weight;
public bool Dye(Mobile from, DyeTub sender) public bool Dye(Mobile from, DyeTub sender)
{ {
if (Deleted) if (Deleted)

View file

@ -44,11 +44,9 @@ public partial class SpecialFishingNet : Item
private bool _inUse; private bool _inUse;
[Constructible] [Constructible]
public SpecialFishingNet() : base(0x0DCA) public SpecialFishingNet() : base(0x0DCA) => Hue = Utility.RandomDouble() < 0.01 ? _hues.RandomElement() : 0x8A0;
{
Weight = 1.0; public override double DefaultWeight => 1.0;
Hue = Utility.RandomDouble() < 0.01 ? _hues.RandomElement() : 0x8A0;
}
public override int LabelNumber => 1041079; // a special fishing net public override int LabelNumber => 1041079; // a special fishing net

View file

@ -14,11 +14,12 @@ public partial class GargoylesPickaxe : BaseAxe, IUsesRemaining
[Constructible] [Constructible]
public GargoylesPickaxe(int uses) : base(0xE85 + Utility.Random(2)) public GargoylesPickaxe(int uses) : base(0xE85 + Utility.Random(2))
{ {
Weight = 11.0;
UsesRemaining = uses; UsesRemaining = uses;
ShowUsesRemaining = true; ShowUsesRemaining = true;
} }
public override double DefaultWeight => 11.0;
public override int LabelNumber => 1041281; // a gargoyle's pickaxe public override int LabelNumber => 1041281; // a gargoyle's pickaxe
public override HarvestSystem HarvestSystem => Mining.System; public override HarvestSystem HarvestSystem => Mining.System;

View file

@ -14,11 +14,9 @@ public partial class ProspectorsTool : BaseBashing, IUsesRemaining
private int _usesRemaining; private int _usesRemaining;
[Constructible] [Constructible]
public ProspectorsTool() : base(0xFB4) public ProspectorsTool() : base(0xFB4) => UsesRemaining = 50;
{
Weight = 9.0; public override double DefaultWeight => 9.0;
UsesRemaining = 50;
}
public override int LabelNumber => 1049065; // prospector's tool public override int LabelNumber => 1049065; // prospector's tool

View file

@ -9,12 +9,13 @@ public partial class SturdyPickaxe : BaseAxe, IUsesRemaining
[Constructible] [Constructible]
public SturdyPickaxe(int uses = 180) : base(0xE86) public SturdyPickaxe(int uses = 180) : base(0xE86)
{ {
Weight = 11.0;
Hue = 0x973; Hue = 0x973;
UsesRemaining = uses; UsesRemaining = uses;
ShowUsesRemaining = true; ShowUsesRemaining = true;
} }
public override double DefaultWeight => 11.0;
public override int LabelNumber => 1045126; // sturdy pickaxe public override int LabelNumber => 1045126; // sturdy pickaxe
public override HarvestSystem HarvestSystem => Mining.System; public override HarvestSystem HarvestSystem => Mining.System;

View file

@ -7,12 +7,9 @@ namespace Server.Items;
public partial class SturdyShovel : BaseHarvestTool public partial class SturdyShovel : BaseHarvestTool
{ {
[Constructible] [Constructible]
public SturdyShovel(int uses = 180) : base(0xF39, uses) public SturdyShovel(int uses = 180) : base(0xF39, uses) => Hue = 0x973;
{
Weight = 5.0;
Hue = 0x973;
}
public override double DefaultWeight => 5.0;
public override int LabelNumber => 1045125; // sturdy shovel public override int LabelNumber => 1045125; // sturdy shovel
public override HarvestSystem HarvestSystem => Mining.System; public override HarvestSystem HarvestSystem => Mining.System;
} }

Some files were not shown because too many files have changed in this diff Show more