feat: Adds SerializedCommandProperty (#1249)

## Breaking Change
* Removes `SerializableFieldAttrAttribute` in favor of `SerializedPropertyAttr`.

## Important Change
* Adds `SerializedCommandProperty`

Example:
```cs
    [InvalidateProperties]
    [SerializableField(0)]
    [SerializedCommandProperty(AccessLevel.GameMaster)]
    private Mobile _completedBy;
```
This commit is contained in:
Kamron Batman 2022-11-14 18:24:33 -08:00 • committed by GitHub
parent 5660f4636e
commit 936000ecf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 272 additions and 231 deletions

View file

@ -25,28 +25,28 @@ public partial class Teleporter : Item
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TeleporterFlags _flags;
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TimeSpan _delay;
[EncodedInt]
[InvalidateProperties]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _soundID;
[InvalidateProperties]
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Point3D _pointDest;
[InvalidateProperties]
[SerializableField(4)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Map _mapDest;
[Constructible]
@ -307,18 +307,18 @@ public partial class SkillTeleporter : Teleporter
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SkillName _skill;
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private double _required;
[CanBeNull]
[InvalidateProperties]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TextDefinition _message;
[Constructible]
@ -423,15 +423,15 @@ public partial class SkillTeleporter : Teleporter
public partial class KeywordTeleporter : Teleporter
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _substring;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _keyword;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _range;
[Constructible]
@ -513,18 +513,18 @@ public partial class WaitTeleporter : KeywordTeleporter
[CanBeNull]
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TextDefinition _startMessage;
[CanBeNull]
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TextDefinition _progressMessage;
[InvalidateProperties]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _showTimeRemaining;
[Constructible]