P5 the Old Stag: standing stones and altar, three-phase boss with charges, stun window, spirit wolves and stomps; antler pickaxe and trophy; group scaling and credit for every fighter; online 3-player test (protocol 12)
This commit is contained in:
@@ -67,6 +67,7 @@ var wolves: Node3D ## wolf_pack.gd (null if this seed has no den si
|
||||
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 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)
|
||||
var _saved_bear: Dictionary = {} ## its saved state, kept until bears exists (and re-saved if it never does)
|
||||
var net_sync: Node ## net_sync.gd when playing on a server, else null
|
||||
@@ -352,6 +353,12 @@ func _on_terrain_ready() -> void:
|
||||
add_child(barrow)
|
||||
if barrow.place(self):
|
||||
_update_grass_cuts()
|
||||
# The standing stones (P5): where the Old Stag is called.
|
||||
stones = preload("res://scripts/world/standing_stones.gd").new()
|
||||
stones.name = "StandingStones"
|
||||
add_child(stones)
|
||||
if stones.place(self):
|
||||
_update_grass_cuts()
|
||||
if DisplayServer.get_name() != "headless":
|
||||
var fish := preload("res://scripts/fishing/lake_fish.gd").new()
|
||||
fish.name = "LakeFish"
|
||||
@@ -366,6 +373,7 @@ func _on_terrain_ready() -> void:
|
||||
hazards.name = "Hazards"
|
||||
add_child(hazards)
|
||||
hazards.setup(self, not is_online())
|
||||
stones.deciding = not is_online()
|
||||
if server_mode:
|
||||
if Saves.has_world():
|
||||
var saved: Dictionary = Saves.load_state(Saves.current_id)
|
||||
@@ -601,6 +609,7 @@ func collect_save() -> Dictionary:
|
||||
"pieces": pieces,
|
||||
"bear": bears.save_data() if bears != null else _saved_bear,
|
||||
"barrow": barrow.save_data() if barrow != null else {},
|
||||
"stones": stones.save_data() if stones != null else {},
|
||||
}
|
||||
|
||||
func _shared_state(harvested: Dictionary, regrow: Dictionary, taken: Array, dropped: Array, pieces: Array) -> Dictionary:
|
||||
@@ -614,6 +623,7 @@ func _shared_state(harvested: Dictionary, regrow: Dictionary, taken: Array, drop
|
||||
"pieces": pieces,
|
||||
"bear": bears.save_data() if bears != null else _saved_bear,
|
||||
"barrow": barrow.save_data() if barrow != null else {},
|
||||
"stones": stones.save_data() if stones != null else {},
|
||||
}
|
||||
|
||||
## The live pieces (placed and not being removed).
|
||||
@@ -742,6 +752,8 @@ func _apply_save(s: Dictionary, with_player: bool) -> void:
|
||||
props.restore_regrow(s.get("regrow", {}))
|
||||
if barrow != null:
|
||||
barrow.load_data(s.get("barrow", {}))
|
||||
if stones != null:
|
||||
stones.load_data(s.get("stones", {}))
|
||||
# The bear (bear_range.gd): applied when it's set up, after loading.
|
||||
_saved_bear = s.get("bear", {})
|
||||
if bears != null:
|
||||
|
||||
Reference in New Issue
Block a user