T4: Old Tam's tips in normal worlds, with a setting

This commit is contained in:
Paul Bailey
2026-11-05 16:22:38 +00:00
parent 73d27f1dcb
commit bd7d10a829
12 changed files with 462 additions and 4 deletions

View File

@@ -187,6 +187,7 @@ func heat_at(pos: Vector3, holder: Node = null) -> float:
## Death: everything you carried goes into a grave where you fell, and you
## wake up at the island start. The world carries on.
func _on_player_died() -> void:
Hints.event("died")
var pos := player.global_position
pos.y = terrain.sample_height(pos.x, pos.z)
if pos.y < terrain.water_level:
@@ -245,6 +246,7 @@ func respawn_after_death() -> void:
## Online: the server says we died. Same screen; Respawn asks the server.
func died_online(text: String, has_items: bool, to_bed: bool, penalty: String = "grave") -> void:
Hints.event("died")
dead_waiting = true
player.velocity = Vector3.ZERO
player.set_physics_process(false)
@@ -404,6 +406,10 @@ func _on_terrain_ready() -> void:
player.set_physics_process(true)
set_physics_process(true)
creatures.setup(self)
# Old Tam's tips (T4): your own world or a server's, not the tutorial's.
if not server_mode and not menu_mode and not bool(Saves.read_meta(Saves.current_id).get("tutorial", false)) \
and not "--tutorial" in OS.get_cmdline_user_args():
Hints.start(self)
if is_online():
_go_online()
_maybe_capture()
@@ -553,6 +559,8 @@ func _exit_tree() -> void:
save_now()
if Guide.world == self:
Guide.stop()
if Hints.world == self:
Hints.stop()
func _notification(what: int) -> void:
if what != NOTIFICATION_WM_CLOSE_REQUEST or menu_mode: