Event-driven dialog queue, story flag command, mod unit tests
Push-based event chains, runtime fixes (single end, goto lifecycle, if, busy box, held delay, empty options, timed/animated/effect actions), the 'flag name value' DSL command, autoplay --dialogs=N, 19 mod unit tests.
This commit is contained in:
1 parent
9f86bdbb0c
commit
bd55716349
86 files changed
+3173
-2181
No files matched your search
@@ -0,0 +1,25 @@
|
||||
namespace Cthangover.Mods.Dialog.Tests
|
||||
{
|
||||
using Cthangover.Mods.Dialog.Action;
|
||||
|
||||
/// <summary>
|
||||
/// Debugger stand-in that holds the runtime once, right before
|
||||
/// <see cref="Target"/> — what the scenario studio does on a breakpoint.
|
||||
/// </summary>
|
||||
public class HoldDebugger : IDialogDebugger
|
||||
{
|
||||
private bool held;
|
||||
|
||||
/// <summary>The action to hold before.</summary>
|
||||
public IActionCommand Target { get; set; }
|
||||
|
||||
/// <summary>Holds before <see cref="Target"/> the first time it is reached.</summary>
|
||||
public bool ShouldHold(DialogRuntime runtime, IActionCommand action)
|
||||
{
|
||||
if (held || action != Target)
|
||||
return false;
|
||||
held = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user