Use controller.hosts.records for the host datastore (#520)

clusterio #1180 made controller.hosts a HostManager. The datastore with
set and the update event now lives on controller.hosts.records.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
BastiaanandClaude Opus 5.5 authored and GitHub committed 2026-11-07 14:29:58 +00:00
1 parent d59e246278
commit 2cca280e30
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ async function startPlugin(t2, setup = () => {}) {
}
function addHost(controller, id, publicAddress = "") {
controller.hosts.set(new HostRecord(id, `host-${id}`, "2.0.0", new Map(), true, "", publicAddress));
controller.hosts.records.set(new HostRecord(id, `host-${id}`, "2.0.0", new Map(), true, "", publicAddress));
}
function addInstance(controller, id, { hostId = 1, status = "running", gamePort, factorioVersion, fields = {} } = {}) {