From 75f329fc5b8f3bdaa09f8b045914111f0ace3c21 Mon Sep 17 00:00:00 2001 From: VariableVince <24507472+VariableVince@users.noreply.github.com> Date: Sat, 4 Apr 2026 21:47:05 +0200 Subject: [PATCH] Map-Generator README: Add needed steps (#3576) ## Description: Map-Generator README: - Add needed step to open map-generator folder before installing depenencies and running the generator. Otherwise errors will arise. - And add last step to run Prettier with some information on other options, as map makers aren't generally developers per se. - Reword/reorder a bit for easier understanding. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: tryout33 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- map-generator/README.md | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/map-generator/README.md b/map-generator/README.md index 7fa443205..cb69dc6e3 100644 --- a/map-generator/README.md +++ b/map-generator/README.md @@ -11,8 +11,9 @@ the [Official Openfront Wiki](https://openfront.wiki/Map_Making) ## Installation 1. Install go -2. Install dependencies: `go mod download` -3. Run the generator: `go run .` +2. Go to map-generator folder: `cd map-generator` +3. Install dependencies: `go mod download` +4. Run the generator for all maps: `go run .` ## Creating a new map @@ -20,18 +21,23 @@ the [Official Openfront Wiki](https://openfront.wiki/Map_Making) 2. Create `assets/maps//image.png` 3. Create `assets/maps//info.json` with name and countries 4. Add the map name in `main.go` The `` in `{Name: ""},` should match the `` folder at `assets/maps/` -5. Run the generator: `go run .` +5. Run the generator for your map: `go run . --maps=` + + By default, `go run .` will process all defined maps. + + Use `--maps` to process a single map: + + `go run . --maps=fourislands` + + To process a subset of maps, pass a comma-separated list: + + `go run . --maps=northamerica,world` + 6. Find the output folder at `../resources/maps/` - -By default, this will process all defined maps. - -Use `--maps` to process a single map: - -`go run . --maps=fourislands` - -To process a subset of maps, pass a comma-separated list: - -`go run . --maps=northamerica,world` +7. Go back to the root directory: `cd ..` +8. Run Prettier: `npm run format` + This rewrites ALL files in place. Git figures out which files are actually changed, don't worry. + Alternatively, you can either run Prettier per file: `npx prettier --write resources/maps//` or in VSCode install the Prettier extension and per file do Show and run Commands > Format Document. ## Output Files