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 Cotton : Item, IDyable
|
||||
[Serializable(0, false)]
|
||||
public partial class Cotton : Item, IDyable
|
||||
{
|
||||
[Constructible]
|
||||
public Cotton(int amount = 1) : base(0xDF9)
|
||||
|
|
@ -12,10 +13,6 @@ namespace Server.Items
|
|||
Amount = amount;
|
||||
}
|
||||
|
||||
public Cotton(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
|
|
@ -28,20 +25,6 @@ namespace Server.Items
|
|||
return true;
|
||||
}
|
||||
|
||||
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))
|
||||
|
|
@ -84,25 +67,24 @@ namespace Server.Items
|
|||
wheel = component.Addon as ISpinningWheel;
|
||||
}
|
||||
|
||||
if (wheel is Item)
|
||||
if (wheel is not Item)
|
||||
{
|
||||
if (!m_Cotton.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_Cotton.Consume();
|
||||
wheel.BeginSpin(m_Cotton.OnSpun, from, m_Cotton.Hue);
|
||||
}
|
||||
from.SendLocalizedMessage(502658); // Use that on a spinning wheel.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_Cotton.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_Cotton.Consume();
|
||||
wheel.BeginSpin(m_Cotton.OnSpun, from, m_Cotton.Hue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue