Ship the 0.8.0 first-hour and campaign milestone
Add the campaign shell, pause-safe checkpoint resume, post-shift campaign continue, confirmed campaign reset, difficulty presets, searchable Help, content-matrix validation, recovery events, contextual dialogue, policy/debrief context and eligible-event previews. Extend persistence with atomic separate files and add campaign/checkpoint/tutorial smokes. Headless 247/247, Python 94/94, tutorial/campaign/session/scenario smokes green.
This commit is contained in:
1 parent
86332cd401
commit
aa51ee331e
38 files changed
+1361
-1144
No files matched your search
@@ -6,12 +6,15 @@ const Strings := preload("res://src/core/strings.gd")
|
||||
const UiArt := preload("res://src/game/ui/art.gd")
|
||||
|
||||
signal restart_requested()
|
||||
signal continue_requested()
|
||||
signal timeline_requested(review: Dictionary)
|
||||
|
||||
## Kept so the timeline button can hand the full review back to the game manager.
|
||||
var _review: Dictionary = {}
|
||||
|
||||
var report_label: Label
|
||||
var _campaign_label: Label = null
|
||||
var _continue_button: Button = null
|
||||
|
||||
func _init() -> void:
|
||||
name = "ShiftReview"
|
||||
@@ -46,6 +49,17 @@ func _init() -> void:
|
||||
report_label.custom_minimum_size = Vector2(720, 0)
|
||||
center.add_child(report_label)
|
||||
|
||||
_campaign_label = Label.new()
|
||||
_campaign_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
_campaign_label.add_theme_color_override("font_color", Color(0.62, 0.8, 0.95))
|
||||
center.add_child(_campaign_label)
|
||||
|
||||
_continue_button = Button.new()
|
||||
_continue_button.text = "Continue campaign"
|
||||
_continue_button.pressed.connect(func(): continue_requested.emit())
|
||||
_continue_button.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
|
||||
center.add_child(_continue_button)
|
||||
|
||||
var timeline := Button.new()
|
||||
timeline.name = "TimelineButton"
|
||||
timeline.text = Strings.lookup("review.timeline_button")
|
||||
@@ -64,6 +78,7 @@ func _init() -> void:
|
||||
quit_btn.pressed.connect(func(): get_tree().quit())
|
||||
quit_btn.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
|
||||
_style_review_button(timeline)
|
||||
_style_review_button(_continue_button)
|
||||
_style_review_button(restart)
|
||||
_style_review_button(quit_btn)
|
||||
center.add_child(quit_btn)
|
||||
@@ -84,7 +99,8 @@ func _style_review_button(button: Button) -> void:
|
||||
button.add_theme_stylebox_override("focus", hover)
|
||||
button.add_theme_stylebox_override("pressed", hover)
|
||||
|
||||
func show_review(review: Dictionary, scenario: Resource, history: Array = []) -> void:
|
||||
func show_review(review: Dictionary, scenario: Resource, history: Array = [],
|
||||
campaign_summary: Dictionary = {}) -> void:
|
||||
_review = review
|
||||
var reputation: Dictionary = review.get("reputation", {})
|
||||
var incidents: Dictionary = review.get("incidents", {})
|
||||
@@ -115,6 +131,7 @@ func show_review(review: Dictionary, scenario: Resource, history: Array = []) ->
|
||||
|
||||
var lines: Array[String] = [
|
||||
"Venue: %s" % (scenario.display_name if scenario else review.get("scenario_id", "")),
|
||||
"Policy: %s" % (scenario.policy_summary if scenario else "See venue policy."),
|
||||
"Grade: %s Score: %.0f/100" % [reputation.get("grade", "?"), reputation.get("rating", 0.0)],
|
||||
history_line,
|
||||
"Incidents handled: %d (peaceful %d)" % [incident_list.size(), peaceful],
|
||||
@@ -135,4 +152,17 @@ func show_review(review: Dictionary, scenario: Resource, history: Array = []) ->
|
||||
if shown >= 12:
|
||||
break
|
||||
report_label.text = "\n".join(lines)
|
||||
var next_venue := str(campaign_summary.get("next_venue", ""))
|
||||
var campaign_complete := bool(campaign_summary.get("complete", false))
|
||||
if _campaign_label:
|
||||
if campaign_complete:
|
||||
_campaign_label.text = "Campaign complete. Free-play venues remain available."
|
||||
elif next_venue != "":
|
||||
_campaign_label.text = "Campaign shift %d complete · next: %s" % [
|
||||
int(campaign_summary.get("shift_number", 1)) - 1,
|
||||
next_venue.replace("_", " ").capitalize()]
|
||||
else:
|
||||
_campaign_label.text = ""
|
||||
if _continue_button:
|
||||
_continue_button.visible = not campaign_complete and next_venue != ""
|
||||
visible = true
|
||||
Reference in new issue
Block a user