diff --git a/README.md b/README.md index d334a07..ce60bcb 100644 --- a/README.md +++ b/README.md @@ -2026,6 +2026,37 @@ a message that says so; none is passed over in silence: | Writing a unit's position, cloak or tint | the game refuses these itself (*Units*) | | Playing on the classic game (1.16.1) | `trigger()` only | +### Coming from 3.12 + +A 3.12 script builds into the same map, and its programs now build *without eudplib*: +TrigScript lays them out itself when you save, in under a second, with nothing to install +and no Build step. The eudplib plugin is no longer required, and a map that used it keeps +working. What 4.0 changed around that: + +- **What the build refuses, it says.** A script with something TrigScript does not take is + not built; Problems marks the line, and Save offers to save without it. Nothing is built + through another compiler behind your back. +- **Tests run in the game as well.** With the lifted game installed, *Run all tests in the + game* judges each test twice, and a test's frames carry a cost in milliseconds of + Remastered's time. Every address a build touches is checked against what Remastered + allows, line by line, before a map is written. +- **The language grew**: [functions as values](#functions-as-values) and closures, [`try` + / `catch` / `throw`](#errors), `async` functions, tasks and `Promise.*` ([Waiting and + tasks](#waiting-and-tasks)), [`on.*` events](#events), [numbers with a + fraction](#numbers-with-a-fraction), [the game's tables and `memory`](#the-games-tables-and-memory), + [`local` reads and `sync()`](#keys-the-mouse-and-chat), programs of a force or a list + of players ([Owners](#owners-and-per-player-programs)), [sounds](#sounds), pictures and + videos the script imports, and a [standard library](#the-standard-library) of nine + modules. +- **Input is the build's own.** Keys, clicks, the mouse and typed lines reach every + player's computer in step without MSQC or a chat plugin: `keyPressed`, `keyHeld`, + `clicked`, `mouse`, `chatted`, `on.key`, `on.chat`. +- **Units** gained `buildTime`, `rank`, `matrix`, `speed`, `speedUpgrade`, `hasTarget`, + `inTransport` and a writable `hallucinated`, and `bounds(location)` reads a location + where it is now. `underAttack` is the game's own alert: a hit out of the player's view. +- **Other plugins build with TrigScript** through the `trigscript.build` service ([For + other plugins](#for-other-plugins)); Magenta 0.12 is the first. + ### Coming from 3.9 Nothing of the language has changed; a 3.9 script builds into the same map. What is new is diff --git a/package-lock.json b/package-lock.json index a7a4be8..f3882fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "scmjs-plugin-trigscript", - "version": "3.12.0", + "version": "4.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "scmjs-plugin-trigscript", - "version": "3.12.0", + "version": "4.0.0", "license": "MIT", "devDependencies": { "@scm-js/plugin-api": "^1.61.0", diff --git a/package.json b/package.json index 6350547..492e039 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scmjs-plugin-trigscript", - "version": "3.12.0", + "version": "4.0.0", "private": true, "description": "TrigScript — TypeScript that builds into triggers; a plugin for the scmJS StarCraft map editor.", "author": "Jeany", diff --git a/plugin.json b/plugin.json index 8878203..aaada59 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "TrigScript", "id": "trigscript", - "version": "3.12.0", + "version": "4.0.0", "description": "TypeScript kept inside the map. Ordinary TypeScript — files, imports, helpers, loops — runs when the script is applied and records one trigger per trigger() call: ordinary triggers that play on every version. Code inside program(() => { … }) runs in the game — variables, loops, functions, sleep — and is built into the map by TrigScript itself when you save; a map with a program needs StarCraft: Remastered. Checked as you type against the map's own names, with a built-in simulator.", "author": "Jeany", "homepage": "https://github.com/scm-js/plugin-trigscript", diff --git a/version.ts b/version.ts index 6a640e0..bd3eb3f 100644 --- a/version.ts +++ b/version.ts @@ -5,4 +5,4 @@ * has been compiled into the editor (`compile.ts`). `tests/script.test.ts` keeps this * equal to the manifest's. */ -export const VERSION = "3.12.0"; +export const VERSION = "4.0.0";