The Cove's stream: a stream block whose water only runs downhill (spring to the bay), its own water ribbon, trout, on the map; scenery and landmarks keep clear

This commit is contained in:
Paul Bailey
2026-11-06 21:35:04 +00:00
parent 0209c6149a
commit ad47cd53da
12 changed files with 227 additions and 14 deletions

View File

@@ -1122,6 +1122,9 @@ func _update_grass_cuts() -> void:
## fishing (and later swimming, boats) work on any world that answers it.
func water_at(x: float, z: float) -> Dictionary:
var ground: float = terrain.sample_height(x, z)
var ss: float = terrain.stream_surface(x, z)
if ground < ss:
return {"type": "stream", "surface": ss, "depth": ss - ground}
var beach: bool = terrain.beach_weight(x, z) > 0.5
if terrain.inside_boundary(x, z, -2.0) and ground < terrain.water_level:
if beach and not _in_lake(x, z):
@@ -1161,6 +1164,11 @@ func water_bodies() -> Array:
"beach":
out.append({"type": "sea", "surface": terrain.sea_level,
"center": terrain.shore_point(12.0), "radius": 0.0})
"stream":
if terrain.stream_path.size() >= 2:
var mid: Vector2 = terrain._stream_point(terrain._stream_end * 0.5)
out.append({"type": "stream", "surface": terrain._stream_surface_at(terrain._stream_end * 0.5),
"center": mid, "radius": terrain.stream_width * 0.5, "path": terrain.stream_path})
return out
## Whether (x, z) is in one of the lakes or ponds (not the sea off a beach).