W3: the Cove (bay, pond, pier for sea fishing), mackerel and cod (cod only in deep water), non-start worldlets offered for testing when run from source
This commit is contained in:
@@ -31,6 +31,7 @@ const FLOWER_COLORS := [
|
||||
@export var grass_tiles_per_update: int = 6
|
||||
|
||||
var terrain: Node3D
|
||||
var pier: Node3D ## the Cove's pier, kept clear of scenery (set by the world)
|
||||
var _player: Node3D
|
||||
var _spawn := Vector3.ZERO
|
||||
var _forest_noise := FastNoiseLite.new()
|
||||
@@ -417,7 +418,10 @@ func _scatter_trees() -> void:
|
||||
|
||||
## Open grassy strip along the sea-cliff edge: no trees, bushes or boulders, so
|
||||
## the view out to sea is clear and you can walk right up to the edge.
|
||||
## (Also kept clear: the Cove's pier and the sand by its foot.)
|
||||
func _on_clifftop(x: float, z: float) -> bool:
|
||||
if pier != null and pier.covers(x, z, 2.0):
|
||||
return true
|
||||
return terrain.sea_weight(x, z) > 0.5 and not terrain.inside_boundary(x, z, 10.0) \
|
||||
and terrain.inside_boundary(x, z, -8.0)
|
||||
|
||||
@@ -486,7 +490,7 @@ func _scatter_rocks() -> void:
|
||||
# Sea stacks: tall pillars standing off the cliff (no collision, unreachable).
|
||||
var placed := 0
|
||||
var tries := 0
|
||||
while placed < 9 and tries < 200:
|
||||
while placed < 9 and tries < 200 and terrain._has_sea: # (only off a sea cliff)
|
||||
tries += 1
|
||||
var ang: float = terrain.sea_angle_deg + rng.randf_range(-1.0, 1.0) * (terrain.sea_half_width_deg + 8.0)
|
||||
var p: Vector2 = terrain.coast_point(ang, rng.randf_range(10.0, 48.0))
|
||||
@@ -672,7 +676,7 @@ func _scatter_pickups() -> void:
|
||||
continue
|
||||
var h: float = terrain.sample_height(x, z)
|
||||
var n: Vector3 = terrain.sample_normal(x, z)
|
||||
if h < terrain.water_level + 0.3 or n.y < 0.8:
|
||||
if h < terrain.water_level + 0.3 or n.y < 0.8 or (pier != null and pier.covers(x, z, 1.0)):
|
||||
continue
|
||||
var chance := 1.0
|
||||
match id:
|
||||
|
||||
Reference in New Issue
Block a user