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:
parent
5660f4636e
commit
936000ecf7
79 changed files with 272 additions and 231 deletions
|
|
@ -220,11 +220,11 @@ public abstract partial class BaseBeverage : Item, IHasQuantity
|
|||
private static readonly Dictionary<Mobile, Timer> m_Table = new();
|
||||
|
||||
[SerializableField(0)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private Poison _poison;
|
||||
|
||||
[SerializableField(1)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private Mobile _poisoner;
|
||||
|
||||
public BaseBeverage() => ItemID = ComputeItemID();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Server.Items;
|
|||
public abstract partial class CookableFood : Item
|
||||
{
|
||||
[SerializableField(0)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private int _cookingLevel;
|
||||
|
||||
public CookableFood(int itemID, int cookingLevel) : base(itemID) => _cookingLevel = cookingLevel;
|
||||
|
|
|
|||
|
|
@ -8,15 +8,15 @@ namespace Server.Items;
|
|||
public abstract partial class Food : Item
|
||||
{
|
||||
[SerializableField(0)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private Mobile _poisoner;
|
||||
|
||||
[SerializableField(1)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private Poison _poison;
|
||||
|
||||
[SerializableField(2)]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private int _fillFactor;
|
||||
|
||||
public Food(int itemID, int amount = 1) : base(itemID)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue