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
|
|
@ -47,8 +47,15 @@ func _on_dialogue_finished(_dialogue_id: String) -> void:
|
|||
|
||||
|
||||
## Merkt sich das zuletzt benutzte Eingabegerät anhand des Event-Typs;
|
||||
## Stick-Rauschen unterhalb der Deadzone wird ignoriert.
|
||||
## Stick-Rauschen unterhalb der Deadzone wird ignoriert. F9/F10
|
||||
## verschieben testweise das Gezeichneten-Standing (reine Debug-Hilfe des
|
||||
## Overlays, bewusst ohne Input-Action — fliegt mit dem Overlay raus).
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventKey and event.pressed and not event.echo:
|
||||
if event.physical_keycode == KEY_F9:
|
||||
FactionSystem.adjust_standing(FactionSystem.MARKED_FACTION_ID, -5)
|
||||
elif event.physical_keycode == KEY_F10:
|
||||
FactionSystem.adjust_standing(FactionSystem.MARKED_FACTION_ID, 5)
|
||||
if event is InputEventKey or event is InputEventMouseButton or event is InputEventMouseMotion:
|
||||
_active_device = "Tastatur/Maus"
|
||||
elif event is InputEventJoypadButton:
|
||||
|
|
@ -76,6 +83,7 @@ func _process(_delta: float) -> void:
|
|||
for npc_id in TRACKED_NPC_IDS:
|
||||
relationship_parts.append("%s %+d" % [npc_id.capitalize(), RelationshipSystem.get_relationship(npc_id)])
|
||||
lines.append("Beziehungen: %s" % " ".join(relationship_parts))
|
||||
lines.append("Gezeichnete-Standing: %+d (F9/F10 zum Testen)" % FactionSystem.get_standing(FactionSystem.MARKED_FACTION_ID))
|
||||
var npc_states := PackedStringArray()
|
||||
for npc in get_tree().get_nodes_in_group("npc"):
|
||||
if npc.has_method("get_state_name"):
|
||||
|
|
|
|||
|
|
@ -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