The Cove's shore life: crabs up the beach from dusk till dawn (keep to the sand, pinch if you get close, crab meat to cook), gulls after food on the sand and fish on a smoking rack; online too
This commit is contained in:
@@ -74,6 +74,7 @@ var bobber: Node3D ## bobber.gd: the cast fishing float, if any
|
||||
var wolves: Node3D ## wolf_pack.gd (null if this seed has no den site)
|
||||
var bears: Node3D ## bear_range.gd: the island's bear (null online as a client)
|
||||
var thieves: Node3D ## thieves.gd: crows and foxes after food left out
|
||||
var shore: Node3D ## shore.gd: the Cove's crabs (null in a land without them)
|
||||
var hazards: Node3D ## hazards.gd: lightning on trees, hard-winter ice (P4)
|
||||
var stones: Node3D ## standing_stones.gd: the altar and the Old Stag (P5)
|
||||
var barrow: Node3D ## barrow.gd: the burial mound and its guards (scenery; guards where creatures run)
|
||||
@@ -513,6 +514,12 @@ func _setup_bear() -> void:
|
||||
thieves.enabled = not "--no-creatures" in OS.get_cmdline_user_args()
|
||||
if barrow != null and barrow.found and thieves.enabled:
|
||||
barrow.start()
|
||||
if has_wildlife("crabs"):
|
||||
shore = preload("res://scripts/creatures/shore.gd").new()
|
||||
shore.name = "Shore"
|
||||
add_child(shore)
|
||||
shore.setup(self)
|
||||
shore.enabled = thieves.enabled
|
||||
if not has_place("bear"):
|
||||
return # (bears only in the lands that list one: the Valley)
|
||||
bears = preload("res://scripts/creatures/bear_range.gd").new()
|
||||
@@ -1314,6 +1321,11 @@ func has_place(kind: String) -> bool:
|
||||
return kind in DEFAULT_PLACES
|
||||
return places.any(func(p): return p is Dictionary and String(p.get("type", "")) == kind)
|
||||
|
||||
## Whether this land has wildlife `kind` beyond the usual ("crabs",
|
||||
## "gulls"): its worldlet's "wildlife" list (0.6.0; the Cove's).
|
||||
func has_wildlife(kind: String) -> bool:
|
||||
return kind in Array(terrain.worldlet.get("wildlife", []))
|
||||
|
||||
## This worldlet's id ("valley") and its whole definition.
|
||||
func worldlet_id() -> String:
|
||||
return terrain.worldlet_id
|
||||
|
||||
Reference in New Issue
Block a user