Compare commits

..
3 Commits
Author SHA1 Message Date
cthangover 914849d9eb Rename cthangover_story to cthangover_game
The mod holding the main game's own scenes and story follows the <game>_game
naming rule; further parts stay <game>_<part>, reusable content is <theme>_pack.
2026-10-18 19:45:46 +02:00
cthangover 0bc9040c28 Mod naming rule and engine UI in engine mods
Mods are renamed by role (shell2d_base, menu_base, ui_base, live2d_base,
editor_tools, cthangover_story, cthangover_murakami, cthangover_party) and
every reference follows. Engine UI prefabs (dialog, answers, message, game
menu, inventory, map, skills) and their panel entries moved out of the story
mod into the subsystem mods; the card_novel and vn_starter_novel collections
are removed.
2026-10-18 19:00:09 +02:00
cthangover f11cbbb651 cooking_walk: find the answer box by type, not by name
The previous answer box is freed with QueueFree when hidden; when the next
question opens in the same frame the new box gets an auto name and the old
one, still named AnswerBox, is already queued for deletion. On a slow disk
this happened often and the test failed to find the variants.
2026-10-18 15:54:15 +02:00
4 changed files with 29 additions and 5 deletions

No files matched your search

+1 -1
View File
@@ -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",
+2 -2
View File
@@ -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");
+1 -1
View File
@@ -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;