The Cove's wreck: driftwood and salt on the beach, the captain's sea chest (a treasure map, nails, salt; once each), each player's own X on the map; online too

This commit is contained in:
Paul Bailey
2026-11-07 02:00:31 +00:00
parent ec8caa9ef4
commit 419c71e638
17 changed files with 470 additions and 7 deletions

View File

@@ -664,9 +664,9 @@ func _scatter_pickups() -> void:
rng.seed = world_seed + 6
# Order matters: new kinds go at the END so existing saves keep their ids.
var want := {"stick": 260, "stone": 170, "flint": 80, "mushroom": 110, "feather": 70, "fiber": 150,
"iron_nugget": 70, "clay": 60, "salt": 40}
"iron_nugget": 70, "clay": 60, "salt": 40, "driftwood": 45}
var radius: Dictionary = {"stick": 0.35, "stone": 0.25, "flint": 0.25, "mushroom": 0.25, "feather": 0.25, "fiber": 0.45,
"iron_nugget": 0.25, "clay": 0.3, "salt": 0.25}
"iron_nugget": 0.25, "clay": 0.3, "salt": 0.25, "driftwood": 0.5}
for id: String in want:
# Fibre grows as a plant (wild flax) you pick, 2 fibre a clump.
var mesh: Mesh = ItemMeshes.build("fiber_plant") if id == "fiber" else ItemDB.mesh_for(id)
@@ -709,10 +709,17 @@ func _scatter_pickups() -> void:
var shore: float = 1.0 - smoothstep(terrain.water_level + 0.4, terrain.water_level + 1.8, h)
chance = shore * 0.95 if by_lake else 0.0
"salt":
# Crusts on the cliff tops above the sea (P4).
# Crusts on the cliff tops above the sea (P4), or (the Cove)
# on the sand just above the waterline.
chance = 0.95 if terrain.sea_weight(x, z) > 0.6 and _near_rim(x, z) > 0.35 else 0.0
if terrain.beach_weight(x, z) > 0.6 and h < terrain.water_level + 1.2:
chance = 0.6
"driftwood":
# Washed up along a beach (the Cove), near the waterline:
# what a boat's hull is made of.
chance = 0.95 if terrain.beach_weight(x, z) > 0.6 and h < terrain.water_level + 1.6 else 0.0
# A few right by the spawn so the first craft is quick.
if Vector2(x - _spawn.x, z - _spawn.z).length() < 18.0 and not id in ["iron_nugget", "clay", "salt"]:
if Vector2(x - _spawn.x, z - _spawn.z).length() < 18.0 and not id in ["iron_nugget", "clay", "salt", "driftwood"]:
chance += 0.5
if keep > chance:
continue