Skip to content

49_allies: add Back buttons and stop printing -1.0% in end statistics - #2929

Open
dj803 wants to merge 1 commit into
daid:masterfrom
dj803:pr/2287-allies-text
Open

dj803 wants to merge 1 commit into
daid:masterfrom
dj803:pr/2287-allies-text

Conversation

@dj803

@dj803 dj803 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Refs #2287 (some items only, listed below).

Hello! A small pass on some items in #2287; please say if I misread any.

Change (5 insertions, 2 deletions)

  • End statistics used -1 as a "not applicable" sentinel that was printed as "-1.0%"; now nil, so the banner line is skipped.
  • Added "Back" replies to 3 dead-end comms menus.

Checks

  • Lua 5.4 syntax parse of scripts/**.lua (the engine's own Lua): 0 failed.
  • Windows 11, headless (2026-11-13), real scenario_49_allies.lua on a recent master build; a test script spawns two Atlantis + a human and an independent station, docks, and drives the station comms by index, then ends the scenario through its own plotChoose -> endStatistics(). Control = unmodified master scripts.
master this branch
"What type of ordnance?" menu (HVLI offered) HVLI reply only, no Back HVLI + Back; Back returns to the station menu
"Repair crew member hired", human station 0 replies (dead end) Back; returns to the station menu
"Repair crew member hired", independent station 0 replies (dead end) Back; returns to the station menu
end banner, game with no neutral stations Neutral stations: survived:-1.0%, strength:-1.0% neutral line omitted
end banner, game with neutral stations Neutral stations: survived:100.0%, strength:100.0% identical
  • GUI, this branch (Windows 11, Allies and Enemies, Murphy Easy, Atlantis docked at a Human Navy station, Relay > Open comms): the ordnance menu shows nukes/mines/HVLI + Back and Back returns to the station menu; "Repair crew member hired" shows Back and Back returns to the station menu.

NOT tested

  • In the GUI: independent-station crew hire (headless only), the end-statistics banner (headless only), HVLI purchase, and the unmodified-master build.
  • The crew-hire offer appears 1 time in 5; the headless script forces that roll. The "Insufficient reputation" branch and a game that ends with stations destroyed were not run (victory was forced with an empty mission list, all stations alive).
  • Ship types Hornet/Phobos/Lindworm hit a separate setPlayers error on master (p.setWarpDrive(true) with a dot); not changed here, see the separate PR. The tests used Atlantis.
  • Not changed: "(cost: %.1f reputation)" vs %i, "Tell me about %s" and the remaining replies=0 menus; GM "Spawn Ship(s)" nil call.
  • Linux, macOS.

🤖 Generated with Claude Code

The repair-crew-hired and ordnance restock menus end without a Back button, and
a faction with no stations printed a -1.0% survival figure on the main screen.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant