Group nearby resource tiles of the same type into patches, and label
them on the map, e.g. "Iron ore / 2.4M", or "Crude oil / 12 wells".
- events-library: ResourcePatch model, shared by the server and map.
- events-server-web: ResourcePatchService reads the map-chunk-resource
topic from the beginning (read_committed) into memory, and on request
groups tiles into connected patches (join distance 2 tiles for ore,
12 for infinite resources, whose wells are spread out). Results are
cached until new data arrives.
New endpoint: GET .../servers/{id}/map/resources/s{surface}/patches
- web-map: toggleable "Resource patches" overlay with labels at each
patch centre and a hover tooltip, refreshed every minute. Patches
under 10 tiles are hidden. (Surface 1 only, like the rest of the map.)
- events-mod: mark resources infinite based on the prototype's
infinite_resource. Entity initial_amount is nil for e.g. crude oil, so
oil fields were treated as hundreds of tiny ore patches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- web-map: main() was bound to the whole site state, so every state
update (e.g. each player position update over the websocket)
re-rendered the page and re-attached the Leaflet map to a new
element, blanking the tiles. Only re-render when the view, server
list, or map instance changes.
- web-map: reconnect the websocket when it closes, instead of silently
stopping live updates.
- events-server-web: send websocket pings every 30s, so idle
connections aren't closed by reverse proxies (nginx defaults to a
60s read timeout).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Getting the backend running locally in Docker surfaced several issues:
- geedeecee: REGISTRY_HOST came from the unset Gradle property
'dockerContainerRegistryHost'. A missing value in a MapProperty makes
the whole map absent, so every generated .env was empty and all
docker-compose builds failed. Default it to 'localhost'.
- kafka image: dlcdn.apache.org only hosts current releases, so Kafka
3.3.1 404s. Use archive.apache.org. Replace the deprecated openjdk:11
base with eclipse-temurin:11-jre, bump the download stage from EOL
Debian 11 to 12, and drop 'COPY --chmod' so the image builds without
BuildKit/buildx.
- web-map: the map calls the API and websocket on its own origin
(/kafkatorio/...), which previously relied on an external reverse
proxy. Proxy /kafkatorio/ to events-server-web in the map's nginx so
one port serves everything, and publish that port in the example
platform compose file.
- docs: the example secret config mapped server IDs to descriptions,
but the schema is token (JWT 'sub') -> server ID, and both must match
[a-zA-Z0-9-_]. Descriptions with spaces crashed every service.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its only coordinate (org.jetbrains.kotlinx:kotlinx-nodejs:0.0.7) was
published to Bintray's "kotlinx" repository, which has been shut down
since 2021 - it's unresolvable from any repo configured here (Maven
Central, JitPack, Gradle Plugin Portal, or JetBrains Space all 404 it),
blocking configuration of the whole build whenever a task touched
web-map. Turns out nothing in web-map's source actually imports
kotlinx.nodejs.* - the one require() call nearby is webpack's own
bundler global, unrelated to this library. It was also duplicated next
to a second, redundant kotlinx-html line. Just deleting the dependency
is the correct fix, not re-hosting a defunct artifact.
Verified: `:modules:events-mod:build :modules:events-library:check`
now gets past configuration and all JVM-side tasks succeed (the JS
browser test target still needs a locally installed Chrome for Karma,
which is an unrelated environment requirement, not a dependency issue).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- create LuaJsonList to handle empty Lua JSON lists being sent as empty objects
- fix exporting of resources and entities
- split up map tiles into different layer directories
- add 'chunk size' to MapChunkPosition
- move tests to correct packages
- bump tstl
- decrease tstl logging
- remove some defined, but unused, kafka topics
- syslog, rest, websocket servers & web-map: decrease logging
- webmap: add additional layers for buildings and resources
- minor version bumps
- new Factorio version
- use both prototype name and type to identify a prototype
- kxs-ts-gen: use BrandTyping, but exclude some identifiers
- kxs-ts-gen: manually create zip dist, so it can run after the project compiles
- mod: use typed-factorio strict types
- mod: refactor event handlers to be a little more consistent and object-oriented
- remove http4k
- renamed 'schema' subproject to 'library', because it contains more than just data models
- tiles are now hosted per factorio-server
- changed api base to `kafkatorio/data`
- tidied up some Gradle conf
- remove 'events-processor' subproject - I don't want to set up loads of microservices right now