Phase A: wire climate + day/night into the world; design doc

Bump the engine submodule to a684c23 (Climate + day/night ambient). The
world scene now registers UseClimate and UseDayNight, so it darkens at
night and the HUD shows the season and temperature alongside the date.
Add docs/растения.md capturing the whole plant-ecosystem design (growth as
a suitability product, hybrid Mendelian genome, climate, lighting with
shadows, reproduction, persistence) and the A-D phase plan.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-06-12 16:46:05 +03:00
co-authored by Claude Opus 4.8
parent 147ab203f1
commit aff5a947c5
6 changed files with 117 additions and 3 deletions
+12 -1
View File
@@ -13,6 +13,7 @@ using MrGameEng.DevConsole;
using MrGameEng.Graphics;
using MrGameEng.Input;
using MrGameEng.Inspector;
using MrGameEng.Lighting;
using MrGameEng.Tilemaps;
using MrGameEng.UI;
using Myra.Graphics2D;
@@ -74,6 +75,8 @@ public sealed class WorldScene : Scene
this.UseTilemaps();
var calendar = Context.UseCalendar(SecondsPerDay);
var climate = Context.UseClimate(ClimateSettings.Default);
this.UseDayNight(renderer); // мир темнеет ночью — амбиент идёт в рендер
// Рельеф и расстановка растений детерминированы сидом мира (независимые потоки seed).
var plants = new PlantSet(content, atlases, device);
@@ -105,7 +108,15 @@ public sealed class WorldScene : Scene
new GodCameraSystem(camera, input, renderer, console, () => _pause.IsOpen)
);
UpdateSystems.Add(
new HudSystem(Context, content.Languages, hudLabel, "hud.world", _config.Seed, calendar)
new HudSystem(
Context,
content.Languages,
hudLabel,
"hud.world",
_config.Seed,
calendar,
climate
)
);
UpdateSystems.Add(new CallbackSystem(() => Hotkeys(input)));
+10 -1
View File
@@ -185,7 +185,8 @@ public sealed class HudSystem(
Myra.Graphics2D.UI.Label label,
string titleKey,
int seed,
MrGameEng.Core.Calendar? calendar = null
MrGameEng.Core.Calendar? calendar = null,
MrGameEng.Core.Climate? climate = null
) : BaseSystem
{
private float _accumulated;
@@ -206,6 +207,14 @@ public sealed class HudSystem(
var when = calendar is null
? ""
: languages.Format("hud.datetime", calendar.Day, calendar.Hour, calendar.Minute);
if (climate is not null)
{
var season = languages.Get("season." + climate.Season.ToString().ToLowerInvariant());
when +=
" | "
+ languages.Format("hud.climate", season, (int)MathF.Round(climate.Temperature));
}
label.Text =
languages.Format(titleKey, seed, when, fps) + "\n" + languages.Get("hud.controls");
}