feat: Updates to Serialization Generator v2.2 (#1157)
* Adds `SerializationProperty` - This will generate the private variable for serialization. Also provides an option `useField` to specify your own. Example: ```cs [SerializationProperty(0, useField: nameof(_resource)] ```
This commit is contained in:
parent
d82028a071
commit
89815ad4d3
50 changed files with 242 additions and 361 deletions
|
|
@ -58,8 +58,6 @@ public partial class WoodenBowl : Item
|
|||
[SerializationGenerator(0, false)]
|
||||
public partial class SackFlour : Item, IHasQuantity
|
||||
{
|
||||
private int _quantity;
|
||||
|
||||
[Constructible]
|
||||
public SackFlour() : base(0x1039)
|
||||
{
|
||||
|
|
@ -68,7 +66,7 @@ public partial class SackFlour : Item, IHasQuantity
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
[SerializableField(0)]
|
||||
[SerializableProperty(0)]
|
||||
public int Quantity
|
||||
{
|
||||
get => _quantity;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue