fix: Optimizes items to use default weights. (Part 3) (#2242)
This commit is contained in:
parent
2c5441731e
commit
40ba85d7b8
104 changed files with 497 additions and 425 deletions
|
|
@ -11,10 +11,11 @@ public partial class Kindling : Item
|
|||
public Kindling(int amount = 1) : base(0xDE1)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 5.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 5.0;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!VerifyMove(from))
|
||||
|
|
|
|||
|
|
@ -9,11 +9,9 @@ namespace Server.Items;
|
|||
public partial class FishingPole : Item
|
||||
{
|
||||
[Constructible]
|
||||
public FishingPole() : base(0x0DC0)
|
||||
{
|
||||
Layer = Layer.TwoHanded;
|
||||
Weight = 8.0;
|
||||
}
|
||||
public FishingPole() : base(0x0DC0) => Layer = Layer.TwoHanded;
|
||||
|
||||
public override double DefaultWeight => 8.0;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,11 +17,12 @@ public partial class MessageInABottle : Item
|
|||
[Constructible]
|
||||
public MessageInABottle(Map map, int level) : base(0x099F)
|
||||
{
|
||||
Weight = 1.0;
|
||||
TargetMap = map ?? Map.Trammel;
|
||||
_level = level;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1041080; // a message in a bottle
|
||||
|
||||
[SerializableProperty(0)]
|
||||
|
|
|
|||
|
|
@ -77,8 +77,6 @@ public partial class SOS : Item
|
|||
[Constructible]
|
||||
public SOS(Map map, int level) : base(0x14EE)
|
||||
{
|
||||
Weight = 1.0;
|
||||
|
||||
_level = level;
|
||||
MessageIndex = Utility.Random(MessageEntries.Length);
|
||||
TargetMap = map ?? Map.Trammel;
|
||||
|
|
@ -87,6 +85,8 @@ public partial class SOS : Item
|
|||
UpdateHue();
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
|
@ -12,16 +13,10 @@ public partial class ShipwreckedItem : Item, IDyable, IShipwreckedItem
|
|||
{
|
||||
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)
|
||||
{
|
||||
if (Deleted)
|
||||
|
|
|
|||
|
|
@ -44,11 +44,9 @@ public partial class SpecialFishingNet : Item
|
|||
private bool _inUse;
|
||||
|
||||
[Constructible]
|
||||
public SpecialFishingNet() : base(0x0DCA)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = Utility.RandomDouble() < 0.01 ? _hues.RandomElement() : 0x8A0;
|
||||
}
|
||||
public SpecialFishingNet() : base(0x0DCA) => Hue = Utility.RandomDouble() < 0.01 ? _hues.RandomElement() : 0x8A0;
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override int LabelNumber => 1041079; // a special fishing net
|
||||
|
||||
|
|
|
|||
|
|
@ -14,11 +14,12 @@ public partial class GargoylesPickaxe : BaseAxe, IUsesRemaining
|
|||
[Constructible]
|
||||
public GargoylesPickaxe(int uses) : base(0xE85 + Utility.Random(2))
|
||||
{
|
||||
Weight = 11.0;
|
||||
UsesRemaining = uses;
|
||||
ShowUsesRemaining = true;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 11.0;
|
||||
|
||||
public override int LabelNumber => 1041281; // a gargoyle's pickaxe
|
||||
public override HarvestSystem HarvestSystem => Mining.System;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,11 +14,9 @@ public partial class ProspectorsTool : BaseBashing, IUsesRemaining
|
|||
private int _usesRemaining;
|
||||
|
||||
[Constructible]
|
||||
public ProspectorsTool() : base(0xFB4)
|
||||
{
|
||||
Weight = 9.0;
|
||||
UsesRemaining = 50;
|
||||
}
|
||||
public ProspectorsTool() : base(0xFB4) => UsesRemaining = 50;
|
||||
|
||||
public override double DefaultWeight => 9.0;
|
||||
|
||||
public override int LabelNumber => 1049065; // prospector's tool
|
||||
|
||||
|
|
|
|||
|
|
@ -9,12 +9,13 @@ public partial class SturdyPickaxe : BaseAxe, IUsesRemaining
|
|||
[Constructible]
|
||||
public SturdyPickaxe(int uses = 180) : base(0xE86)
|
||||
{
|
||||
Weight = 11.0;
|
||||
Hue = 0x973;
|
||||
UsesRemaining = uses;
|
||||
ShowUsesRemaining = true;
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 11.0;
|
||||
|
||||
public override int LabelNumber => 1045126; // sturdy pickaxe
|
||||
public override HarvestSystem HarvestSystem => Mining.System;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,9 @@ namespace Server.Items;
|
|||
public partial class SturdyShovel : BaseHarvestTool
|
||||
{
|
||||
[Constructible]
|
||||
public SturdyShovel(int uses = 180) : base(0xF39, uses)
|
||||
{
|
||||
Weight = 5.0;
|
||||
Hue = 0x973;
|
||||
}
|
||||
public SturdyShovel(int uses = 180) : base(0xF39, uses) => Hue = 0x973;
|
||||
|
||||
public override double DefaultWeight => 5.0;
|
||||
public override int LabelNumber => 1045125; // sturdy shovel
|
||||
public override HarvestSystem HarvestSystem => Mining.System;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue