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
|
|
@ -32,12 +32,6 @@ public partial class MahjongGame : Item, ISecurable
|
|||
[SerializableField(5, setter: "private")]
|
||||
private MahjongPlayers _players;
|
||||
|
||||
// Field 6
|
||||
private bool _showScores;
|
||||
|
||||
// Field 7
|
||||
private bool _spectatorVision;
|
||||
|
||||
private DateTime _lastReset;
|
||||
|
||||
[Constructible]
|
||||
|
|
@ -56,7 +50,7 @@ public partial class MahjongGame : Item, ISecurable
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
[SerializableField(6)]
|
||||
[SerializableProperty(6)]
|
||||
public bool ShowScores
|
||||
{
|
||||
get => _showScores;
|
||||
|
|
@ -81,7 +75,7 @@ public partial class MahjongGame : Item, ISecurable
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
[SerializableField(7)]
|
||||
[SerializableProperty(7)]
|
||||
public bool SpectatorVision
|
||||
{
|
||||
get => _spectatorVision;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue