Show calendar date/time in the world HUD; base speed 3 in-game min/sec
Bump the engine submodule to 4b91b60 (calendar time of day) and display the current date and time in the world HUD (День N, HH:MM) instead of just the day number. Set the day length to 480 scaled seconds so the base (x1) speed runs at 3 in-game minutes per real second. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
aab59723d3
commit
26e234a35e
@@ -31,8 +31,11 @@ public sealed class WorldScene : Scene
|
||||
{
|
||||
public const int CellSize = 16;
|
||||
|
||||
/// <summary>Сколько секунд масштабированного времени длится один игровой день.</summary>
|
||||
public const float SecondsPerDay = 30f;
|
||||
/// <summary>
|
||||
/// Сколько секунд масштабированного времени длится один игровой день. База (x1) — 3 игровые
|
||||
/// минуты за 1 реальную секунду: сутки = 1440 мин ÷ 3 = 480 с.
|
||||
/// </summary>
|
||||
public const float SecondsPerDay = 480f;
|
||||
|
||||
private readonly WorldConfig _config;
|
||||
private readonly WorldSave? _save;
|
||||
|
||||
@@ -161,8 +161,8 @@ public sealed class GodCameraSystem(
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Строка статуса в HUD: заголовок сцены (ключ локализации с сидом, днём календаря и FPS)
|
||||
/// и подсказка управления. Обновляется 4 раза в секунду; смена языка подхватывается сама.
|
||||
/// Строка статуса в HUD: заголовок сцены (ключ локализации с сидом, датой/временем календаря и
|
||||
/// FPS) и подсказка управления. Обновляется 4 раза в секунду; смена языка подхватывается сама.
|
||||
/// </summary>
|
||||
public sealed class HudSystem(
|
||||
MrGameEng.Core.EngineContext context,
|
||||
@@ -188,9 +188,10 @@ public sealed class HudSystem(
|
||||
var fps = (int)MathF.Round(_frames / _accumulated);
|
||||
_accumulated = 0f;
|
||||
_frames = 0;
|
||||
var when = calendar is null
|
||||
? ""
|
||||
: languages.Format("hud.datetime", calendar.Day, calendar.Hour, calendar.Minute);
|
||||
label.Text =
|
||||
languages.Format(titleKey, seed, calendar?.Day ?? 0, fps)
|
||||
+ "\n"
|
||||
+ languages.Get("hud.controls");
|
||||
languages.Format(titleKey, seed, when, fps) + "\n" + languages.Get("hud.controls");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user