Compare commits

..
7 Commits
Author SHA1 Message Date
cthangover 3efb289bde Mod cover 2026-10-22 17:09:43 +02:00
cthangover ad3ab315ea Line endings: LF everywhere
.gitattributes forces LF (CRLF only for .bat/.cmd), core.autocrlf is off;
files that differed only by CRLF are normalized.
2026-10-21 13:29:32 +02:00
cthangover 422802b12e Commit pending working-tree changes (local edits, line endings) 2026-10-21 12:31:48 +02:00
iisaev 134cc686ec new 4x pixelart resources 2026-10-20 19:50:39 +03:00
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
8 changed files with 59 additions and 5 deletions

No files matched your search

+30
View File
@@ -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
View File
@@ -11,7 +11,7 @@
"test_sources": [ "test_sources": [
"tests/*.cs" "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": [ "ui": [
{ {
"id": "cooking_workbench", "id": "cooking_workbench",
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

+2 -2
View File
@@ -5,9 +5,9 @@
"src/*.cs" "src/*.cs"
], ],
"depends": [ "depends": [
"visual_novel_core>=1", "cthangover_game>=1",
"items_base>=1", "items_base>=1",
"interface>=1", "ui_base>=1",
"dialog_base>=1" "dialog_base>=1"
] ]
} }
@@ -435,7 +435,7 @@ namespace Mods.CookingWalkTest
{ {
// IDialogBox — контракт ядра без Node-членов; сам бокс живёт // IDialogBox — контракт ядра без Node-членов; сам бокс живёт
// под concrete-узлом DialogBox в дереве. // под concrete-узлом DialogBox в дереве.
var box = (dialogBox as Node)?.FindChild("AnswerBox", true, false) as Control; var box = FindAnswerBox(dialogBox as Node);
if (box == null) if (box == null)
throw new CheckException("AnswerBox node not found under dialog box"); throw new CheckException("AnswerBox node not found under dialog box");
var content = box.FindChild("Content", true, false); 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) private bool TryGetDialogBox(out IDialogBox box)
{ {
var node = SceneContextNode.FindNode<Node>("DialogBox"); var node = SceneContextNode.FindNode<Node>("DialogBox");
+1 -1
View File
@@ -89,7 +89,7 @@ namespace Cthangover.Cooking.Tests
ModAssert.NotNull(raw, "manifest.json exists"); ModAssert.NotNull(raw, "manifest.json exists");
using var doc = JsonDocument.Parse(raw); using var doc = JsonDocument.Parse(raw);
var depends = doc.RootElement.GetProperty("depends"); 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) foreach (var dep in found)
{ {
var ok = false; var ok = false;