feat: config-gated flat-scalar sea level (D-033, terrain-water task 04)
SeaLevelModel: "flat" (one scalar, SeaLevelValue) or "field" (the legacy latitude Lerp 0.26..0.15). Only GetSeaLevel's body changes — all nine call sites (crater carve target, both flood fills, biome split, beach band, Capitol window, town filters, A* zero-point) inherit the model automatically; no consumer re-tuning. Default: flat 0.15, pinned in ServerConfig.json. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
1f957b3430
commit
200adcaf5a
3 changed files with 31 additions and 2 deletions
|
|
@ -1212,7 +1212,13 @@ public partial class MapGenerator : TextureRect
|
|||
return astar.GetPointPath(from, to);
|
||||
}
|
||||
|
||||
private float GetSeaLevel(float t) => Mathf.Lerp(0.26f, 0.15f, Mathf.Clamp(t, 0f, 1f));
|
||||
// Sea-level model gate (D-033, task 04): "flat" returns the configured scalar;
|
||||
// "field" is the legacy latitude Lerp. Pure numeric mapping either way (D-035);
|
||||
// all nine call sites inherit whichever model config selects.
|
||||
private float GetSeaLevel(float t) =>
|
||||
ConfigManager.SeaLevelModel == "flat"
|
||||
? ConfigManager.SeaLevelValue
|
||||
: Mathf.Lerp(0.26f, 0.15f, Mathf.Clamp(t, 0f, 1f));
|
||||
|
||||
private Vector2I FindClosestPixel(Vector2 pos, HashSet<Vector2I> set) {
|
||||
Vector2I closest = new Vector2I(0,0); float min = float.MaxValue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue