movement j119 Task A: make the shipped TFIL heat shape env-overridable (default path byte-identical)

This commit is contained in:
2026-09-26 01:38:51 +02:00
parent c07e6d9599
commit 7311aaef5a
2 changed files with 41 additions and 6 deletions
+29 -3
View File
@@ -26,10 +26,23 @@ const EnemyAuraRadius = 54.0 ## 18 + 36
const EnemyCore = 40.0 ## lava per tile overlapping enemy body circle
const EnemyAura = 10.0 ## lava per tile in enemy aura ring
const CorridorHeat = 20.0
## The shipped heat SHAPE, env-overridable since j119 (the same pattern j106
## used for the virtual pillar). The DEFAULTS below are the shipped values, so
## the default path is unchanged; the vars are read once at module init by
## `loadTfilHeatShapeEnv`. This is what makes the heat axis sweepable on ONE
## frozen binary (before this it was a Nim `const`, so no env arm could move it).
## TR_TFIL_CORRIDOR_HEAT default 20.0 lava per corridor-overlapping tile
## TR_TFIL_WALL_HOTNESS default 30.0 peak wall radiance
## TR_TFIL_WALL_RADIANCE default 10.0 wall radiance falloff
const
DefaultCorridorHeat = 20.0
DefaultWallHotness = 30.0
DefaultWallRadiance = 10.0
const WallHotness = 30.0
const WallRadiance = 10.0
var
CorridorHeat* = DefaultCorridorHeat
WallHotness* = DefaultWallHotness
WallRadiance* = DefaultWallRadiance
## The "virtual centre pillar": heat OUR code paints on the arena centre even
## though the arena has NO physical pillar there. The shipped default is now
@@ -135,6 +148,19 @@ proc loadTfilPillarEnv*() =
loadTfilPillarEnv()
proc loadTfilHeatShapeEnv*() =
## Read the shipped-mover heat-shape overrides. Called once at module init;
## callable again after `putEnv` so one process can A/B the fields. The
## defaults reproduce the shipped `const`s exactly, so the default field is
## bit-identical. The `TR_TFIL_CORRIDOR_HEAT` / `TR_TFIL_WALL_HOTNESS` names
## are shared with the ring mover (which reads its own copies with its own
## retuned defaults); `TR_TFIL_WALL_RADIANCE` is new here.
CorridorHeat = max(0.0, getEnvFloat("TR_TFIL_CORRIDOR_HEAT", DefaultCorridorHeat))
WallHotness = max(0.0, getEnvFloat("TR_TFIL_WALL_HOTNESS", DefaultWallHotness))
WallRadiance = max(0.0, getEnvFloat("TR_TFIL_WALL_RADIANCE", DefaultWallRadiance))
loadTfilHeatShapeEnv()
# ── Time-indexed bullet heat (TR_TFIL_HEAT_TIME=1, default OFF = shipped) ─────
#
# WHY: the flat model gives every bullet-overlapping tile the same heat and