cirnogodot/Scripts/Resources/DebugMenu/DebugMapSelectResource.cs
2025-02-21 11:39:22 +01:00

35 lines
No EOL
830 B
C#

using Godot;
namespace Cirno.Scripts.Resources.DebugMenu;
[GlobalClass]
public partial class DebugMapSelectResource : Resource
{
[Export] public bool Enabled { get; private set; } = true;
[Export] public string Path { get; private set; }
[Export] private string _name { get; set; }
[Export] public MapStartDataResource StartData { get; private set; }
[Export] public Texture2D Icon { get; private set; }
public string DisplayName
{
get
{
if (!string.IsNullOrWhiteSpace(_name))
{
return _name;
}
if (!string.IsNullOrWhiteSpace(Path))
{
return Path.Split("/")[^1].Split(".")[0];
}
return string.Empty;
}
set => _name = value;
}
}