1.0.2 • Published 6 years ago

screeps-mapgen v1.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

Screeps SVG Map Generator (screeps-mapgen)

CLI Usage

usage: screeps-mapgen [-h] [-v] [-g] [-s] [-b] [-t] data

Generate a SVG map from screeps terrian data

Positional arguments:
  data              Map data (JSON or raw) or path to input file

Optional arguments:
  -h, --help        Show this help message and exit.
  -v, --version     Show program's version number and exit.
  -g, --grid        Draw a grid over the map
  -s, --swamp       Draw swamp on the map
  -b, --background  Include background image under the map
  -t, --no-terrain  Disable drawing of terrain on the map

Script Usage

'use strict'

const Map = require('screeps-mapgen')
const roomData = require('.../rooms.terrain.json')

// Draw maps
const svgData = roomData.map(room => new Map(room.terrain).buildSVG(
  true, // Grid overlay
  true, // Draw swamp
  true, // Draw terrain
  true  // Include background
))

// Write maps (svgData) to different files
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago