Phase 4a: Unterrichts-Stationen, FactionSystem, Permadeath-Toggle
- training_station.gd: drei Stationen (Kampftraining -> Kraft, Landnavigation -> Schnelligkeit im Reiterquadranten; Geschichte & RSC -> Verstand im Klassenraum), je +2 auf den Stat (an STAT_MAX geklemmt), Rueckmeldung per Sprechblase, Doppel-Eingabe-Schutz - TimeSystem.try_spend_slot(): erster echter Verbraucher von advance_slot() - Vormittag/Nachmittag ruecken vor, der Abend wird als verbraucht markiert und blockiert weitere Aktivitaeten bis zum Schlafsaal; Slot-Freigabe bei Slot-Wechsel/Reset - FactionSystem als Fassade ueber neues gespeichertes GameState.faction_standings (-100..100, Signal faction_standing_changed), Fraktions-ID gezeichnete; Story-Logik folgt in 4b/4c - Permadeath-Toggle im Hauptmenue (fokus-navigierbar, Text synchron); GameState.reset() laesst is_permadeath_enabled bewusst unangetastet (Menue-Option), Save/Load stellt den Zustand wieder her - Debug-Overlay: Gezeichnete-Standing sichtbar, F9/F10 verschieben es testweise (reine Overlay-Debug-Hilfe ohne Input-Action) - Headless verifiziert (29 Checks): Slot-Kette Vormittag->Nachmittag-> Abend->blockiert->Schlafen, Stat-Zuwaechse aller drei Stationen, Faction-Signal + Save/Load-Roundtrip, Toggle inkl. Reset- und Persistenz-Semantik Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
2ee3c3f782
commit
ef60c96735
10 changed files with 345 additions and 10 deletions
|
|
@ -15,6 +15,7 @@ const CONTINUE_SCENE := "res://scenes/hub/rider_quadrant.tscn"
|
|||
|
||||
@onready var _start_button: Button = $CenterContainer/VBoxContainer/StartButton
|
||||
@onready var _continue_button: Button = $CenterContainer/VBoxContainer/ContinueButton
|
||||
@onready var _permadeath_button: Button = $CenterContainer/VBoxContainer/PermadeathButton
|
||||
@onready var _quit_button: Button = $CenterContainer/VBoxContainer/QuitButton
|
||||
|
||||
|
||||
|
|
@ -25,7 +26,9 @@ func _ready() -> void:
|
|||
_continue_button.visible = SaveSystem.has_save()
|
||||
_start_button.pressed.connect(_on_start_pressed)
|
||||
_continue_button.pressed.connect(_on_continue_pressed)
|
||||
_permadeath_button.pressed.connect(_on_permadeath_pressed)
|
||||
_quit_button.pressed.connect(_on_quit_pressed)
|
||||
_update_permadeath_text()
|
||||
_start_button.grab_focus.call_deferred()
|
||||
|
||||
|
||||
|
|
@ -71,6 +74,19 @@ func _on_continue_pressed() -> void:
|
|||
get_tree().change_scene_to_file(CONTINUE_SCENE)
|
||||
|
||||
|
||||
## Schaltet Permadeath um (SPEC Abschnitt 6: Toggle, Default AN). Die
|
||||
## Wahl übersteht GameState.reset() und wird beim Speichern im Spielstand
|
||||
## abgelegt; Fortsetzen stellt den gespeicherten Zustand wieder her.
|
||||
func _on_permadeath_pressed() -> void:
|
||||
GameState.is_permadeath_enabled = not GameState.is_permadeath_enabled
|
||||
_update_permadeath_text()
|
||||
|
||||
|
||||
## Beendet das Spiel.
|
||||
func _on_quit_pressed() -> void:
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
## Hält den Toggle-Text synchron zum GameState.
|
||||
func _update_permadeath_text() -> void:
|
||||
_permadeath_button.text = "Permadeath: %s" % ("AN" if GameState.is_permadeath_enabled else "AUS")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue