mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-01 09:37:03 +02:00
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
37 lines
824 B
C#
37 lines
824 B
C#
using System;
|
|
|
|
namespace Robust.Shared.ViewVariables
|
|
{
|
|
/// <summary>
|
|
/// Attribute to make a property or field accessible to VV.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
|
|
public sealed class ViewVariablesAttribute : Attribute
|
|
{
|
|
public readonly VVAccess Access = VVAccess.ReadOnly;
|
|
|
|
public ViewVariablesAttribute()
|
|
{
|
|
|
|
}
|
|
|
|
public ViewVariablesAttribute(VVAccess access)
|
|
{
|
|
Access = access;
|
|
}
|
|
}
|
|
|
|
public enum VVAccess : byte
|
|
{
|
|
/// <summary>
|
|
/// This property can only be read, not written.
|
|
/// </summary>
|
|
ReadOnly = 0,
|
|
|
|
/// <summary>
|
|
/// This property is read and writable.
|
|
/// </summary>
|
|
ReadWrite,
|
|
}
|
|
}
|