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