fix: Codegens construction items (#1520)

This commit is contained in:
Kamron Batman 2023-09-29 23:28:51 -07:00 • committed by GitHub
parent 972949455b
commit 5dc2d09392
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 972 additions and 1859 deletions

View file

@ -1,42 +1,26 @@
namespace Server.Items
using ModernUO.Serialization;
namespace Server.Items;
[SerializationGenerator(0, false)]
public partial class Vines : Item
{
public class Vines : Item
[Constructible]
public Vines() : this(Utility.Random(8))
{
[Constructible]
public Vines() : this(Utility.Random(8))
{
}
[Constructible]
public Vines(int v) : base(0xCEB)
{
if (v is < 0 or > 7)
{
v = 0;
}
ItemID += v;
Weight = 1.0;
}
public Vines(Serial serial) : base(serial)
{
}
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
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();
}
}
[Constructible]
public Vines(int v) : base(0xCEB)
{
if (v is < 0 or > 7)
{
v = 0;
}
ItemID += v;
Weight = 1.0;
}
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
}