Run the bridge on the STS2 v0.113 beta and stable #27

Merged
nelson merged 1 commit from spirelens-99-sts2-v0113 into main 2026-11-13 20:31:24 -08:00
Owner

Makes the MCP bridge run on the STS2 v0.113 public beta while still running on the stable build. The beta made HoverTip.Id get-only, so the Instant Mode tooltip threw every time Settings opened; it also moved shop inventories and purchases to MerchantSynchronizer and changed NGame.StartNewSingleplayerRun. A new McpMod.GameCompat.cs resolves each of these at runtime, returning an error instead of throwing when a member is missing.

Compiles against the beta and against SpireLens's lib/sts2.dll; not yet run in the game.

Work package: https://openproject.romaine.life/wp/SPIRELENS-99

Makes the MCP bridge run on the STS2 v0.113 public beta while still running on the stable build. The beta made HoverTip.Id get-only, so the Instant Mode tooltip threw every time Settings opened; it also moved shop inventories and purchases to MerchantSynchronizer and changed NGame.StartNewSingleplayerRun. A new McpMod.GameCompat.cs resolves each of these at runtime, returning an error instead of throwing when a member is missing. Compiles against the beta and against SpireLens's lib/sts2.dll; not yet run in the game. Work package: https://openproject.romaine.life/wp/SPIRELENS-99
SPIRELENS-99: survive STS2 v0.113 beta API changes
All checks were successful
CI / changes (pull_request) Successful in 46s
CI / whitespace (pull_request) Successful in 47s
CI / pytest (pull_request) Successful in 46s
88cb69bafc
v0.113 made HoverTip.Id get-only, so the Instant Mode tooltip postfix threw
"Property set method not found" every time the settings screen opened. It also
moved shop inventories and purchases onto RunManager.MerchantSynchronizer and
made NGame.StartNewSingleplayerRun take a caller-built Player, so the bridge no
longer compiled against the beta, and the v0.111 build hit MissingMethodException
on shop_purchase, shop state and dev start_singleplayer_run.

Resolve all three by reflection in McpMod.GameCompat.cs so one source runs on
v0.111 and v0.113: the tooltip falls back to the property's backing field and
keeps the Fast Mode tip if neither exists; shops read the local inventory from
the synchronizer or the room and buy through PurchaseLocalEntry or
OnTryPurchaseWrapper; the run start binds arguments by parameter name. Shop
purchases index the same card/relic/potion/removal order the shop state
reports, since v0.113's AllEntries puts Blitz entries before card removal.
nelson merged commit 58fd588e65 into main 2026-11-13 20:31:24 -08:00
nelson deleted branch spirelens-99-sts2-v0113 2026-11-13 20:31:24 -08:00
Sign in to join this conversation.
No description provided.