upd: sync local changes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
447622e813
commit
b6c4aed8d5
9 files changed
+156
-8
No files matched your search
@@ -0,0 +1,18 @@
|
||||
using Cthangover.Core.Settings;
|
||||
|
||||
namespace Cthangover.Cooking
|
||||
{
|
||||
/// <summary>
|
||||
/// Test accessor over <see cref="CookingSettings"/>: the real class exposes
|
||||
/// <c>RationsPerCharacter</c> with a private setter because only the core
|
||||
/// settings pipeline may write it, and the getter is static — mod unit
|
||||
/// tests exercise the clamp through the public <c>ReadValues</c> contract
|
||||
/// and assert via this static passthrough, so no reflection into private
|
||||
/// members is needed. Stateless and harmless in production builds.
|
||||
/// </summary>
|
||||
public static class CookingSettingsForTests
|
||||
{
|
||||
/// <summary>Current parsed value, for test assertions.</summary>
|
||||
public static int RationsPerCharacter => CookingSettings.RationsPerCharacter;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using Cthangover.Core.Settings;
|
||||
using Cthangover.Core.UI;
|
||||
using Godot;
|
||||
|
||||
using Cthangover.Mods.Interface.Base.Lists;
|
||||
namespace Mods.Cooking.Rations
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -5,6 +5,7 @@ using Cthangover.Core.UI.Theming;
|
||||
using Cthangover.Core.Utils;
|
||||
using Godot;
|
||||
|
||||
using Cthangover.Mods.Interface.Base.Lists;
|
||||
namespace Mods.Cooking.Workbench
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,6 +6,7 @@ using Cthangover.Core.UI;
|
||||
using Cthangover.Core.UI.Theming;
|
||||
using Godot;
|
||||
|
||||
using Cthangover.Mods.Interface.Base.Lists;
|
||||
namespace Mods.Cooking.Workbench
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -9,9 +9,11 @@ using Cthangover.Core.Settings;
|
||||
using Cthangover.Core.UI;
|
||||
using Cthangover.Core.UI.Theming;
|
||||
using Cthangover.Core.UI.Tool;
|
||||
using Cthangover.Mods.Time;
|
||||
using Cthangover.Core.UI.Inventory;
|
||||
using Godot;
|
||||
|
||||
using Cthangover.Mods.Interface.Base.Lists;
|
||||
namespace Mods.Cooking.Workbench
|
||||
{
|
||||
/// <summary>
|
||||
@@ -122,12 +124,12 @@ namespace Mods.Cooking.Workbench
|
||||
|
||||
/// <summary>
|
||||
/// Hides the workbench panel and plays a UI close-click sound
|
||||
/// via the scene's <see cref="AudioService"/> node.
|
||||
/// via the scene's <see cref="IAudioService"/> node.
|
||||
/// </summary>
|
||||
public void OnCloseClick()
|
||||
{
|
||||
Hide();
|
||||
var audioService = SceneContextNode.FindNode<AudioService>("AudioService");
|
||||
var audioService = SceneContextNode.FindNode<Node>("AudioService") as IAudioService;
|
||||
audioService?.PlaySound("ui/close_click", SoundType.UI);
|
||||
}
|
||||
|
||||
@@ -160,7 +162,7 @@ namespace Mods.Cooking.Workbench
|
||||
var timer = SceneContextNode.FindNode<TimeController>("TimeController");
|
||||
timer?.UpdateRenderedTime();
|
||||
|
||||
var audioService = SceneContextNode.FindNode<AudioService>("AudioService");
|
||||
var audioService = SceneContextNode.FindNode<Node>("AudioService") as IAudioService;
|
||||
audioService?.PlaySound("ui/cook", SoundType.UI);
|
||||
|
||||
foreach (var recipe in recipes)
|
||||
|
||||
Reference in new issue
Block a user