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

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

View file

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