From eed11be0122defc42a89d0a3b3c823572a0a428f Mon Sep 17 00:00:00 2001 From: Mink80 <46659983+Mink80@users.noreply.github.com> Date: Sat, 20 Jul 2024 00:21:44 +0200 Subject: [PATCH] fix(Flax.cs): Makes flax flippable and fixes stacking (#1874) --- .../UOContent/Items/Resources/Tailor/Flax.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Projects/UOContent/Items/Resources/Tailor/Flax.cs b/Projects/UOContent/Items/Resources/Tailor/Flax.cs index ee44d6f8b..77f684f23 100644 --- a/Projects/UOContent/Items/Resources/Tailor/Flax.cs +++ b/Projects/UOContent/Items/Resources/Tailor/Flax.cs @@ -4,16 +4,29 @@ using Server.Targeting; namespace Server.Items; [SerializationGenerator(0, false)] +[Flippable(0x1A9C, 0x1A9D)] public partial class Flax : Item { [Constructible] public Flax(int amount = 1) : base(0x1A9C) { Stackable = true; - Weight = 1.0; Amount = amount; } + public override double DefaultWeight => 1; + + public override int LabelNumber => 1026812; // Flax Bundle + + public override bool CanStackWith(Item dropped) => + dropped.Stackable && Stackable && + dropped.GetType() == GetType() && + dropped.ItemID is 0x1A9C or 0x1A9D && + dropped.Hue == Hue && + dropped.Name == Name && + dropped.Amount + Amount <= 60000 && + dropped != this; + public override void OnDoubleClick(Mobile from) { if (IsChildOf(from.Backpack)) @@ -77,4 +90,4 @@ public partial class Flax : Item } } } -} \ No newline at end of file +}