From 8fc4ec939706d9b67dbeca236b7d1ce2e9dac652 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Sat, 25 Apr 2026 22:43:42 +0100 Subject: add workshop download support Co-authored-by: Copilot --- entrypoint.mjs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/entrypoint.mjs b/entrypoint.mjs index 10c90d7..968c760 100644 --- a/entrypoint.mjs +++ b/entrypoint.mjs @@ -77,5 +77,26 @@ for (const { name, type } of CONFIG_FIELDS) { writeFileSync(CONFIG_PATH, JSON.stringify(config, null, 2) + "\n"); +// Do we have any workshop items to download? +if (process.env.WORKSHOP_ITEMS) { + const itemIds = process.env.WORKSHOP_ITEMS.split(",").map((id) => id.trim()); + console.log(`Downloading workshop items: ${itemIds.join(", ")}`); + for (const itemId of itemIds) { + execFileSync( + "steamcmd", + [ + "+login", + STEAM_USERNAME, + STEAM_PASSWORD || "", + "+workshop_download_item", + "3930080", + itemId, + "+quit", + ], + { stdio: "inherit" }, + ); + } +} + // Run the server execFileSync("sh", ["/app/RunServer.sh"], { stdio: "inherit" }); -- cgit v1.2.3