This commit is contained in:
2025-07-27 17:02:34 +08:00
parent 502edf03a0
commit 0ed7bb14d1
9 changed files with 273 additions and 56 deletions

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
using Verse;
using RimWorld;
using LudeonTK;
namespace WulaFallenEmpire
{
public static class WulaDebugActions
{
[DebugAction("Wula Fallen Empire", "Open Custom UI...", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.Playing)]
private static void OpenCustomUI()
{
List<DebugMenuOption> list = new List<DebugMenuOption>();
foreach (CustomUIDef localDef in DefDatabase<CustomUIDef>.AllDefs)
{
// Capture the local variable for the lambda
CustomUIDef currentDef = localDef;
list.Add(new DebugMenuOption(currentDef.defName, DebugMenuOptionMode.Action, delegate
{
Find.WindowStack.Add(new Dialog_CustomDisplay(currentDef));
}));
}
Find.WindowStack.Add(new Dialog_DebugOptionListLister(list));
}
}
}