fix(codegen): Reverts & Disables codegen (for now) (#625)
After speaking with the C# devs, it is clear that code gen is not ready. I can get around this by doing the following: 1. Creating a library 2. Splitting out the schema writing from the source generator 3. Moving the schema loading to `AdditionalFiles` 4. Writing a new post-build application using Roslyn to write the schema files after building.
This commit is contained in:
parent
6e9108302a
commit
f2d44e0283
84 changed files with 1053 additions and 487 deletions
|
|
@ -6,8 +6,7 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Serializable(0)]
|
||||
public partial class Fireflies : Item, IAddon
|
||||
public class Fireflies : Item, IAddon
|
||||
{
|
||||
[Constructible]
|
||||
public Fireflies(int itemID = 0x1596)
|
||||
|
|
@ -17,11 +16,35 @@ namespace Server.Items
|
|||
Movable = false;
|
||||
}
|
||||
|
||||
public Fireflies(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1150061;
|
||||
|
||||
public bool FacingSouth => ItemID == 0x2336;
|
||||
public bool FacingSouth
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ItemID == 0x2336)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public Item Deed => new FirefliesDeed();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public Item Deed
|
||||
{
|
||||
get
|
||||
{
|
||||
var deed = new FirefliesDeed();
|
||||
|
||||
return deed;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CouldFit(IPoint3D p, Map map)
|
||||
{
|
||||
|
|
@ -30,9 +53,12 @@ namespace Server.Items
|
|||
return false;
|
||||
}
|
||||
|
||||
return FacingSouth ?
|
||||
BaseAddon.IsWall(p.X, p.Y - 1, p.Z, map) :
|
||||
BaseAddon.IsWall(p.X - 1, p.Y, p.Z, map);
|
||||
if (FacingSouth)
|
||||
{
|
||||
return BaseAddon.IsWall(p.X, p.Y - 1, p.Z, map); // north wall
|
||||
}
|
||||
|
||||
return BaseAddon.IsWall(p.X - 1, p.Y, p.Z, map); // west wall
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
@ -58,10 +84,23 @@ namespace Server.Items
|
|||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable(0)]
|
||||
public partial class FirefliesDeed : Item
|
||||
public class FirefliesDeed : Item
|
||||
{
|
||||
[Constructible]
|
||||
public FirefliesDeed()
|
||||
|
|
@ -71,6 +110,11 @@ namespace Server.Items
|
|||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public FirefliesDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1150061;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
@ -99,6 +143,20 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
private class FacingGump : Gump
|
||||
{
|
||||
private readonly FirefliesDeed m_Deed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue