RPG map editor test advances dialogs on RPG Plus
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1622a2fc51
commit
9325bde61b
2 files changed
+8
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "RPG Map Editor Test",
|
||||
"description": "GUI test of the RPG map editor on the rpg_demo maps: opens the window, picks a tile in the palette, paints it on the main layer with the mouse, undoes with Ctrl+Z, adds an event by double-clicking on the events layer, and closes without saving (the mod's files stay untouched). Activated by --itest=rpg_editor_edit with --game=rpg_demo --new; --shots=<dir> saves screenshots (windowed runs only).",
|
||||
"description": "GUI test of the RPG map editor on the rpg_demo_game maps of rpg_plus: opens the window, picks a tile in the palette, paints it on the main layer with the mouse, undoes with Ctrl+Z, adds an event by double-clicking on the events layer, and closes without saving (the mod's files stay untouched). Activated by --itest=rpg_editor_edit with --game=rpg_plus --new (the prologue is clicked through first); --shots=<dir> saves screenshots (windowed runs only).",
|
||||
"sources": [
|
||||
"src/*.cs"
|
||||
],
|
||||
|
||||
@@ -84,14 +84,20 @@ namespace Cthangover.Tools.RpgEditor.Tests
|
||||
switch (step)
|
||||
{
|
||||
case 0:
|
||||
if (!Boot.IsReady || RpgWorldHost.Current?.View == null)
|
||||
if (!Boot.IsReady || string.IsNullOrEmpty(GetTree().Root.GetNodeOrNull<SceneManager>("SceneManager")?.CurrentSceneName))
|
||||
return;
|
||||
// Dialogs first: the rpg_plus prologue runs before any map is shown.
|
||||
var box = RpgInput.FindDialogBox();
|
||||
if (box != null && box.IsRunning)
|
||||
{
|
||||
if (box.IsWaitingAnswer)
|
||||
box.TrySelectVariant(0);
|
||||
else
|
||||
box.NextAction();
|
||||
return;
|
||||
}
|
||||
if (RpgWorldHost.Current?.View == null)
|
||||
return;
|
||||
window = ToolWindow.Open<RpgMapEditorWindow>();
|
||||
step++;
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user