Compare commits
7
Commits
0a32c0756c
...
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3efb289bde | ||
|
|
ad3ab315ea | ||
|
|
422802b12e | ||
|
|
134cc686ec | ||
|
|
914849d9eb | ||
|
|
0bc9040c28 | ||
|
|
f11cbbb651 |
No files matched your search
@@ -0,0 +1,30 @@
|
||||
# Line endings: LF everywhere, on every OS, whatever core.autocrlf says.
|
||||
* text=auto eol=lf
|
||||
|
||||
# cmd.exe misreads labels and goto in LF batch files, so they stay CRLF.
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
|
||||
# Binaries: never converted, never diffed as text.
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.webp binary
|
||||
*.svg text
|
||||
*.ogg binary
|
||||
*.wav binary
|
||||
*.mp3 binary
|
||||
*.ttf binary
|
||||
*.otf binary
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
*.dll binary
|
||||
*.so binary
|
||||
*.dylib binary
|
||||
*.pdb binary
|
||||
*.exe binary
|
||||
*.zip binary
|
||||
*.pck binary
|
||||
*.moc3 binary
|
||||
*.res binary
|
||||
*.scn binary
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 108 KiB |
+1
-1
@@ -11,7 +11,7 @@
|
||||
"test_sources": [
|
||||
"tests/*.cs"
|
||||
],
|
||||
"depends": [ "visual_novel_core>=1", "interface>=1", "items_base>=1", "time_base>=1" ],
|
||||
"depends": [ "cthangover_game>=1", "ui_base>=1", "items_base>=1", "time_base>=1" ],
|
||||
"ui": [
|
||||
{
|
||||
"id": "cooking_workbench",
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
"src/*.cs"
|
||||
],
|
||||
"depends": [
|
||||
"visual_novel_core>=1",
|
||||
"cthangover_game>=1",
|
||||
"items_base>=1",
|
||||
"interface>=1",
|
||||
"ui_base>=1",
|
||||
"dialog_base>=1"
|
||||
]
|
||||
}
|
||||
@@ -435,7 +435,7 @@ namespace Mods.CookingWalkTest
|
||||
{
|
||||
// IDialogBox — контракт ядра без Node-членов; сам бокс живёт
|
||||
// под concrete-узлом DialogBox в дереве.
|
||||
var box = (dialogBox as Node)?.FindChild("AnswerBox", true, false) as Control;
|
||||
var box = FindAnswerBox(dialogBox as Node);
|
||||
if (box == null)
|
||||
throw new CheckException("AnswerBox node not found under dialog box");
|
||||
var content = box.FindChild("Content", true, false);
|
||||
@@ -451,6 +451,30 @@ namespace Mods.CookingWalkTest
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ищет показанный AnswerBox по типу, а не по имени узла: прошлый бокс
|
||||
/// освобождается через QueueFree при скрытии, и если следующий вопрос
|
||||
/// открывается в том же кадре, новый бокс получает автоимя
|
||||
/// (<c>@Control@N</c>), а старый с именем «AnswerBox» уже помечен на удаление.
|
||||
/// </summary>
|
||||
private static Cthangover.Mods.Dialog.AnswerBox FindAnswerBox(Node node)
|
||||
{
|
||||
if (node == null)
|
||||
return null;
|
||||
|
||||
foreach (var child in node.GetChildren())
|
||||
{
|
||||
if (child is Cthangover.Mods.Dialog.AnswerBox box && !box.IsQueuedForDeletion() && box.Visible)
|
||||
return box;
|
||||
|
||||
var found = FindAnswerBox(child);
|
||||
if (found != null)
|
||||
return found;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool TryGetDialogBox(out IDialogBox box)
|
||||
{
|
||||
var node = SceneContextNode.FindNode<Node>("DialogBox");
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Cthangover.Cooking.Tests
|
||||
ModAssert.NotNull(raw, "manifest.json exists");
|
||||
using var doc = JsonDocument.Parse(raw);
|
||||
var depends = doc.RootElement.GetProperty("depends");
|
||||
var found = new[] { "visual_novel_core", "interface", "items_base", "time_base" };
|
||||
var found = new[] { "cthangover_game", "ui_base", "items_base", "time_base" };
|
||||
foreach (var dep in found)
|
||||
{
|
||||
var ok = false;
|
||||
|
||||
Reference in new issue
Block a user