using System; namespace Barotrauma; [AttributeUsage(AttributeTargets.Property)] class Editable : Attribute { /// /// Maximum length of the value if the value is a string. Only has an effect is larger than 0. /// public int MaxLength = -1; public int DecimalCount = 1; public int MinValueInt = int.MinValue, MaxValueInt = int.MaxValue; public float MinValueFloat = float.MinValue, MaxValueFloat = float.MaxValue; public bool ForceShowPlusMinusButtons; public float ValueStep; /// /// Should the value customized in the editor be applied to the new item swapped in place of this item. /// Used e.g. for transferring the auto operate properties from one turret to another installed on place of it. /// public bool TransferToSwappedItem; /// /// Labels of the components of a vector property (defaults to x,y,z,w) /// public string[] VectorComponentLabels; /// /// If a translation can't be found for the property name, this tag is used instead /// public string FallBackTextTag; /// /// Currently implemented only for int and bool fields. TODO: implement the remaining types (SerializableEntityEditor) /// public bool ReadOnly; public Editable() { } public Editable(int minValue, int maxValue) { MinValueInt = minValue; MaxValueInt = maxValue; } public Editable(float minValue, float maxValue, int decimals = 1) { MinValueFloat = minValue; MaxValueFloat = maxValue; DecimalCount = decimals; } } [AttributeUsage(AttributeTargets.Property)] sealed class InGameEditable : Editable { }