fix: Fixes props for interfaces and adds account manipulation (#2179)
This commit is contained in:
parent
f95b3a8b3b
commit
05825a11e2
3 changed files with 14 additions and 9 deletions
|
|
@ -145,16 +145,18 @@ public class CommandPropertyAttribute : Attribute
|
|||
AccessLevel level,
|
||||
bool readOnly = false,
|
||||
bool canModify = false
|
||||
) : this(level, level)
|
||||
) : this(level, level, readOnly, canModify)
|
||||
{
|
||||
ReadOnly = readOnly;
|
||||
CanModify = canModify;
|
||||
}
|
||||
|
||||
public CommandPropertyAttribute(AccessLevel readLevel, AccessLevel writeLevel)
|
||||
public CommandPropertyAttribute(
|
||||
AccessLevel readLevel, AccessLevel writeLevel, bool readOnly = false, bool canModify = false
|
||||
)
|
||||
{
|
||||
ReadLevel = readLevel;
|
||||
WriteLevel = writeLevel;
|
||||
ReadOnly = readOnly;
|
||||
CanModify = canModify;
|
||||
}
|
||||
|
||||
public AccessLevel ReadLevel { get; }
|
||||
|
|
@ -170,16 +172,18 @@ public class SerializedCommandPropertyAttribute : SerializedPropertyAttrAttribut
|
|||
AccessLevel level,
|
||||
bool readOnly = false,
|
||||
bool canModify = false
|
||||
) : this(level, level)
|
||||
) : this(level, level, readOnly, canModify)
|
||||
{
|
||||
ReadOnly = readOnly;
|
||||
CanModify = canModify;
|
||||
}
|
||||
|
||||
public SerializedCommandPropertyAttribute(AccessLevel readLevel, AccessLevel writeLevel)
|
||||
public SerializedCommandPropertyAttribute(
|
||||
AccessLevel readLevel, AccessLevel writeLevel, bool readOnly = false, bool canModify = false
|
||||
)
|
||||
{
|
||||
ReadLevel = readLevel;
|
||||
WriteLevel = writeLevel;
|
||||
ReadOnly = readOnly;
|
||||
CanModify = canModify;
|
||||
}
|
||||
|
||||
public AccessLevel ReadLevel { get; }
|
||||
|
|
|
|||
|
|
@ -895,7 +895,7 @@ public partial class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPro
|
|||
[CommandProperty(AccessLevel.Administrator)]
|
||||
public bool AutoPageNotify { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster, AccessLevel.Owner)]
|
||||
[CommandProperty(AccessLevel.GameMaster, AccessLevel.Administrator, canModify: true)]
|
||||
public IAccount Account { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ using Server.Network;
|
|||
|
||||
namespace Server.Accounting;
|
||||
|
||||
[PropertyObject]
|
||||
[SerializationGenerator(6)]
|
||||
public partial class Account : IAccount, IComparable<Account>
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue