Repository navigation
After #96: autoMining() and autoRestore(), guards on the order verbs, the card library on a branch - #97
Merged
Conversation
buildAutoMiningProgram() and buildAutoRestoreProgram() said how they are built. The rest of the standard library names what a thing does for the map (every, after, choose, say), and the reason for the longer names is gone: a call inside a program is now an error at the call, which says to move it to the top of the file. Both libraries have a test of that error. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VEdp4YG8zxHxfqFjpBsycX
The three write an order into the unit, past everything the game checks before it takes a command. A burrowed Drone and an SCV in a Dropship have no such command: a right-click does nothing for either. The lowering and the simulator now test the unit's status first (burrowed, in a transport or a Bunker) and write nothing for such a unit. The doc comments said "as a right-click does" and "as the Stop button does". They now say what is written and what is not checked. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VEdp4YG8zxHxfqFjpBsycX
The card library tells Classic graphics from Remastered's by sending the player's view to the middle of the map and back at the start of the game, and its button positions were measured on one computer. It was played on a Mac only. As a module of the standard library its names are public from the first release that has it, so it leaves main until it has been played on more setups: the module, the toggle option of autoRestore(), their ledger rows and their tests. The `card-right-click` branch brings all of it back in one commit. Two things this also settles for plain autoRestore(): importing trigscript/spells no longer reserves one of the map's locations for the card's measurement, and the program is one program again, not a copy for each player. local.mouse.buttons, local.card.buttonSet and local.screen.width stay: they are reads, each played. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VEdp4YG8zxHxfqFjpBsycX
Nothing in the library looked at the Medic's own state, so one in stasis, under Maelstrom, or loaded in a transport or a Bunker could be given the cast when its order read as idle. It could not carry the cast out, and while it held the order its target counted as taken, so no other Medic went. Such a Medic is no longer a candidate; the next nearest that can cast goes. A Medic under Maelstrom is itself a unit to restore, as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VEdp4YG8zxHxfqFjpBsycX
The lifted game's test world read where an order is aimed and whether it has a target, but not the target itself: `u.orderTarget` in a script's test was nothing where the game had a unit. It is the pointer `hasTarget` reads, taken to its slot of the unit table. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VEdp4YG8zxHxfqFjpBsycX
…open Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VEdp4YG8zxHxfqFjpBsycX
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The follow-up to #96, which was merged as it was. These are the changes the review on #88 asked for, and the ones found reading #96.
What changes
autoMining()andautoRestore(), notbuildAutoMiningProgram()andbuildAutoRestoreProgram(). The rest of the standard library names what a thing does for the map. The longer names were there to say "top of the script only"; since A function that reaches program() or trigger() is refused where a program calls it #90 the compiler says that itself, at the call. Both libraries have a test of that error.u.gather(),u.cast()andu.stop()leave a burrowed or loaded unit as it is. The three write an order into the unit, past everything the game checks before it takes a command. The player has no command for a burrowed Drone or an SCV in a Dropship, so the lowering and the simulator test the unit's status first (bits 0x10 and 0x40) and write nothing. The doc comments say what is written, where they said "as a right-click does".autoRestore()passes over a Medic that cannot cast: in stasis, under Maelstrom, or loaded. Nothing looked at the Medic's own state, so such a Medic could be given the cast and then hold its target, and no other Medic went. A Medic under Maelstrom is still a unit to restore.u.orderTarget. The lifted game's test world had the two positions andhasTarget, not the unit.trigscript/cardand auto-restore's right-click toggle leave main and wait on thecard-right-clickbranch, which brings them back in one commit. The card library finds which graphics are on by sending the view to the middle of the map and back at the start of the game, and its button positions were measured on one computer. A library module's names are public from the first release that has it, so it should be played on more setups first. This also means importingtrigscript/spellsno longer reserves a location for the card's measurement.local.mouse.buttons,local.card.buttonSetandlocal.screen.widthstay.docs/v4-plan.mdhas a section for this work and its open list: what the card branch waits on, what has not been played in Remastered, the fixed worker and Medic types (a mod's worker gets nothing),cast()being Restoration only.Testing
npm run typecheckis clean andnpm testpasses: 83 files, 1484 tests.program(); a burrowed Drone, a loaded SCV and a loaded Medic left alone by the three verbs, the simulator and the emitted triggers agreeing; four Medics around an ensnared Marine, of which only the one that can cast goes;orderTargetread from a stand-in game's memory.After this
Tag 4.5.0, move the editor's pin, and scm-js/scm-js#233 takes the two new names and holds its card and toggle sections back.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VEdp4YG8zxHxfqFjpBsycX