movement j119 Task A: make the shipped TFIL heat shape env-overridable (default path byte-identical)
This commit is contained in:
@@ -247,13 +247,21 @@ proc printEffectiveValues(ctx: EnvReportContext) =
|
|||||||
emit("TR_POWER_FINISH_KILL", onOff(PowerFinishKill),
|
emit("TR_POWER_FINISH_KILL", onOff(PowerFinishKill),
|
||||||
sourceOf("TR_POWER_FINISH_KILL"))
|
sourceOf("TR_POWER_FINISH_KILL"))
|
||||||
|
|
||||||
# ── movement (TFIL ring) ──────────────────────────────────────────────────
|
# ── movement (TFIL heat shape + ring) ─────────────────────────────────────
|
||||||
|
# NOTE (j119): `TR_TFIL_CORRIDOR_HEAT` / `TR_TFIL_WALL_HOTNESS` drive BOTH
|
||||||
|
# movers now — the ring's own copies (reported here) AND the shipped base
|
||||||
|
# field (the_floor_is_lava, shipped defaults 20/30/10). The two modules export
|
||||||
|
# the same symbol names, so the reads below are module-qualified.
|
||||||
emit("TR_TFIL_RANGE_LO", $RangeLo, sourceOf("TR_TFIL_RANGE_LO"))
|
emit("TR_TFIL_RANGE_LO", $RangeLo, sourceOf("TR_TFIL_RANGE_LO"))
|
||||||
emit("TR_TFIL_RANGE_HI", $RangeHi, sourceOf("TR_TFIL_RANGE_HI"))
|
emit("TR_TFIL_RANGE_HI", $RangeHi, sourceOf("TR_TFIL_RANGE_HI"))
|
||||||
emit("TR_TFIL_RANGE_TEMP", $RangeTemp, sourceOf("TR_TFIL_RANGE_TEMP"))
|
emit("TR_TFIL_RANGE_TEMP", $RangeTemp, sourceOf("TR_TFIL_RANGE_TEMP"))
|
||||||
emit("TR_TFIL_RANGE_K", $RangeK, sourceOf("TR_TFIL_RANGE_K"))
|
emit("TR_TFIL_RANGE_K", $RangeK, sourceOf("TR_TFIL_RANGE_K"))
|
||||||
emit("TR_TFIL_CORRIDOR_HEAT", $CorridorHeat, sourceOf("TR_TFIL_CORRIDOR_HEAT"))
|
emit("TR_TFIL_CORRIDOR_HEAT", $the_floor_is_lava_ring.CorridorHeat,
|
||||||
emit("TR_TFIL_WALL_HOTNESS", $WallHotness, sourceOf("TR_TFIL_WALL_HOTNESS"))
|
sourceOf("TR_TFIL_CORRIDOR_HEAT"))
|
||||||
|
emit("TR_TFIL_WALL_HOTNESS", $the_floor_is_lava_ring.WallHotness,
|
||||||
|
sourceOf("TR_TFIL_WALL_HOTNESS"))
|
||||||
|
emit("TR_TFIL_WALL_RADIANCE", $the_floor_is_lava.WallRadiance,
|
||||||
|
sourceOf("TR_TFIL_WALL_RADIANCE"))
|
||||||
emit("TR_TFIL_TILE_REPLAN", tileReplanName(TfilTileReplanMode),
|
emit("TR_TFIL_TILE_REPLAN", tileReplanName(TfilTileReplanMode),
|
||||||
sourceOf("TR_TFIL_TILE_REPLAN"))
|
sourceOf("TR_TFIL_TILE_REPLAN"))
|
||||||
emit("TR_TFIL_COMMIT_TICKS", $TfilCommitTicks, sourceOf("TR_TFIL_COMMIT_TICKS"))
|
emit("TR_TFIL_COMMIT_TICKS", $TfilCommitTicks, sourceOf("TR_TFIL_COMMIT_TICKS"))
|
||||||
@@ -449,6 +457,7 @@ proc knownEnvNames*(): seq[string] =
|
|||||||
"TR_RAM_PLAN_MARGIN", "TR_RAM_PLAN_HITRATE", "TR_RAM_LOG",
|
"TR_RAM_PLAN_MARGIN", "TR_RAM_PLAN_HITRATE", "TR_RAM_LOG",
|
||||||
"TR_TFIL_RANGE_LO", "TR_TFIL_RANGE_HI", "TR_TFIL_RANGE_TEMP",
|
"TR_TFIL_RANGE_LO", "TR_TFIL_RANGE_HI", "TR_TFIL_RANGE_TEMP",
|
||||||
"TR_TFIL_RANGE_K", "TR_TFIL_CORRIDOR_HEAT", "TR_TFIL_WALL_HOTNESS",
|
"TR_TFIL_RANGE_K", "TR_TFIL_CORRIDOR_HEAT", "TR_TFIL_WALL_HOTNESS",
|
||||||
|
"TR_TFIL_WALL_RADIANCE",
|
||||||
"TR_TFIL_TILE_REPLAN", "TR_TFIL_COMMIT_TICKS", "TR_TFIL_NO_REV",
|
"TR_TFIL_TILE_REPLAN", "TR_TFIL_COMMIT_TICKS", "TR_TFIL_NO_REV",
|
||||||
"TR_TFIL_COMMIT_LOG",
|
"TR_TFIL_COMMIT_LOG",
|
||||||
"TR_TFIL_HEAT_TIME", "TR_TFIL_HEAT_TAU", "TR_TFIL_HEAT_POWER_GAIN",
|
"TR_TFIL_HEAT_TIME", "TR_TFIL_HEAT_TAU", "TR_TFIL_HEAT_POWER_GAIN",
|
||||||
|
|||||||
@@ -26,10 +26,23 @@ const EnemyAuraRadius = 54.0 ## 18 + 36
|
|||||||
const EnemyCore = 40.0 ## lava per tile overlapping enemy body circle
|
const EnemyCore = 40.0 ## lava per tile overlapping enemy body circle
|
||||||
const EnemyAura = 10.0 ## lava per tile in enemy aura ring
|
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
|
var
|
||||||
const WallRadiance = 10.0
|
CorridorHeat* = DefaultCorridorHeat
|
||||||
|
WallHotness* = DefaultWallHotness
|
||||||
|
WallRadiance* = DefaultWallRadiance
|
||||||
|
|
||||||
## The "virtual centre pillar": heat OUR code paints on the arena centre even
|
## 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
|
## though the arena has NO physical pillar there. The shipped default is now
|
||||||
@@ -135,6 +148,19 @@ proc loadTfilPillarEnv*() =
|
|||||||
|
|
||||||
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) ─────
|
# ── 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
|
# WHY: the flat model gives every bullet-overlapping tile the same heat and
|
||||||
|
|||||||
Reference in New Issue
Block a user