From 558999faa82c6ce12db45295e10cf464c332e075 Mon Sep 17 00:00:00 2001 From: Bastiaan <17990055+bbassie@users.noreply.github.com> Date: Sun, 13 Sep 2026 15:45:50 +0200 Subject: [PATCH] Parse the Map Settings field in the load scenario modal (#1032) The Map Settings block parsed values.mapGenSettings, so filling in only Map Settings failed with "undefined" is not valid JSON and the modal would not submit, while filling in both sent the map gen settings JSON to Factorio as --map-settings. Co-authored-by: Claude Opus 5 (1M context) --- packages/web_ui/src/components/LoadScenarioModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web_ui/src/components/LoadScenarioModal.tsx b/packages/web_ui/src/components/LoadScenarioModal.tsx index b83edb6c..135d38e3 100644 --- a/packages/web_ui/src/components/LoadScenarioModal.tsx +++ b/packages/web_ui/src/components/LoadScenarioModal.tsx @@ -44,7 +44,7 @@ export default function LoadScenarioModal(props: LoadScenarioModalProps) { } if (values.mapSettings && values.mapSettings.trim()) { try { - mapSettings = JSON.parse(values.mapGenSettings); + mapSettings = JSON.parse(values.mapSettings); } catch (err: any) { form.setFields([{ name: "mapSettings", errors: [err.message] }]); return;