Fix compile errors surfaced by actually building against Factorio 2.0.77
typed-factorio 2.0.0+ stopped declaring types as ambient globals - they
now live in virtual modules ("factorio:runtime", "factorio:common",
"factorio:settings") and must be explicitly imported. Adds those imports
throughout events-mod. Also:
- Bumps typescript-to-lua 1.11.1 -> 1.25.2 and typescript 4.9 -> 5.4.2,
since tstl pins an exact peer TypeScript version and typed-factorio
3.x needs a newer one than 4.9 supports (a real compiler bug in
TS 4.9 against the generated defines.segmented_unit_ai_state enum).
- Bumps the pinned isolated Node (14.19.1 -> 24.21.0), since
typescript-to-lua 1.25.2 requires Node >=16.10.0.
- Renames bare uint/int -> uint32/int32 (import aliases), since the
unsized aliases no longer exist.
- Drops OnEntityDestroyedEvent from an unused documentation-only union
type - that event no longer exists in the 2.0 API.
- LuaEntityPrototype.max_health is now get_max_health() (quality-aware).
- Fixes a branded-type mismatch between our generated schema's
ForceIndex and typed-factorio's own ForceIndex.
Verified by actually running tstl end-to-end (clean compile, Lua
emitted) after installing a real JDK and Node toolchain.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
072d1a2845
commit
e296a9aa90
26 changed files with 285 additions and 79 deletions
|
|
@ -52,9 +52,9 @@ nimbusJoseJwt = "9.25.6" # https://search.maven.org/artifact/com.
|
|||
## npm ##
|
||||
|
||||
npm-luaTypes = "2.13.1" # https://www.npmjs.com/package/lua-types
|
||||
npm-typescriptToLua = "1.11.1" # https://www.npmjs.com/package/typescript-to-lua
|
||||
npm-typescriptToLua = "1.25.2" # peer-pins typescript 5.4.2, matching typed-factorio's own dev dependency; https://www.npmjs.com/package/typescript-to-lua
|
||||
npm-typedFactorio = "3.36.0" # targets Factorio 2.0.75 ("factorio-2.0" dist-tag); https://github.com/GlassBricks/typed-factorio/blob/main/Changelog.md https://www.npmjs.com/package/typed-factorio
|
||||
npm-typescript = "4.9" # https://github.com/microsoft/TypeScript/releases
|
||||
npm-typescript = "5.4.2" # https://github.com/microsoft/TypeScript/releases
|
||||
|
||||
npm-bootswatch = "5.2.2" # https://www.jsdelivr.com/package/npm/bootswatch
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue