fix(Flax.cs): Makes flax flippable and fixes stacking (#1874)
This commit is contained in:
parent
db31c07017
commit
eed11be012
1 changed files with 15 additions and 2 deletions
|
|
@ -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
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue