mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
57 lines
1.2 KiB
C#
57 lines
1.2 KiB
C#
using System;
|
|
|
|
namespace Editor;
|
|
|
|
/// <summary>
|
|
/// Represents a variable.
|
|
/// </summary>
|
|
public partial class MapClassVariable
|
|
{
|
|
/// <summary>
|
|
/// The internal name.
|
|
/// </summary>
|
|
public string Name { get; set; }
|
|
|
|
/// <summary>
|
|
/// The user friendly name for UI.
|
|
/// </summary>
|
|
public string LongName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Description for this variable.
|
|
/// </summary>
|
|
public string Description { get; set; }
|
|
|
|
/// <summary>
|
|
/// Category or group for this variable.
|
|
/// </summary>
|
|
public string GroupName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Data type for this variable.
|
|
/// </summary>
|
|
public Type PropertyType { get; set; }
|
|
|
|
/// <summary>
|
|
/// Default value for this variable.
|
|
/// </summary>
|
|
public object DefaultValue { get; set; }
|
|
|
|
/// <summary>
|
|
/// Internal, used to override the type to one the tools understand.
|
|
/// </summary>
|
|
public string PropertyTypeOverride { get; set; }
|
|
|
|
/// <summary>
|
|
/// General purpose key-value store to alter functionality of UI, map compilation, editor helpers, etc.
|
|
/// </summary>
|
|
public Dictionary<string, string> Metadata { get; set; } = new();
|
|
|
|
// Min/Max, Hidden, Important, Randomizable
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"MapClassVariable( {Name} )";
|
|
}
|
|
}
|