fix: Code gens items. Fixes code genning of ore (#684)
### THIS IS A BREAKING CHANGE IF YOU ARE ALREADY USING CODEGEN. IF YOUR WORLD HAS ERRORS LOADING PLEASE CONTACT ME ON DISCORD. ORE MIGHT FAIL TO LOAD. ### Changes * Fixes Components from addons not marking dirty * Code gens BaseAddonContainer * Code gens Ingots * Fixes code gen deserialization for Ore * Code gens dyetubs * Code gens reagents * Code gens tailor commodities * Code gens fish
This commit is contained in:
parent
2de4717390
commit
25fa9b397b
163 changed files with 1128 additions and 2494 deletions
|
|
@ -2,7 +2,8 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Flax : Item
|
||||
[Serializable(0, false)]
|
||||
public partial class Flax : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Flax(int amount = 1) : base(0x1A9C)
|
||||
|
|
@ -12,24 +13,6 @@ namespace Server.Items
|
|||
Amount = amount;
|
||||
}
|
||||
|
||||
public Flax(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
|
|
@ -72,25 +55,24 @@ namespace Server.Items
|
|||
wheel = component.Addon as ISpinningWheel;
|
||||
}
|
||||
|
||||
if (wheel is Item)
|
||||
if (wheel is not Item)
|
||||
{
|
||||
if (!m_Flax.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if (wheel.Spinning)
|
||||
{
|
||||
from.SendLocalizedMessage(502656); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Flax.Consume();
|
||||
wheel.BeginSpin(m_Flax.OnSpun, from, m_Flax.Hue);
|
||||
}
|
||||
from.SendLocalizedMessage(502658); // Use that on a spinning wheel.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_Flax.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if (wheel.Spinning)
|
||||
{
|
||||
from.SendLocalizedMessage(502656); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502658); // Use that on a spinning wheel.
|
||||
m_Flax.Consume();
|
||||
wheel.BeginSpin(m_Flax.OnSpun, from, m_Flax.Hue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue