Revert codestyle changes (#40)

* Revert "7f7efbb94bab8574e42d942ad82d414e007b2970"

Code style changes should probably be part of a PR
This commit is contained in:
Eliot Partridge
2019-08-30 10:53:14 -05:00
committed by GitHub
parent eefd9e9a2c
commit caf70a864f
446 changed files with 70667 additions and 70655 deletions
+17 -17
View File
@@ -15,28 +15,28 @@ import { pathTo } from '../paths';
const mapData = JSON.parse(fs.readFileSync(pathTo('src', 'maps', 'custom.json'), 'utf8'));
export function createCustomMap(world: World) {
// size: 4 by 4 regions -> 32 by 32 tiles
// default tiles: grass
const map = createServerMap('custom', MapType.None, 4, 4, TileType.Grass);
// size: 4 by 4 regions -> 32 by 32 tiles
// default tiles: grass
const map = createServerMap('custom', MapType.None, 4, 4, TileType.Grass);
// initialize tiles
deserializeMap(map, mapData);
// initialize tiles
deserializeMap(map, mapData);
// place default spawn point at the center of the map
map.spawnArea = rect(map.width / 2, map.height / 2, 0, 0);
// place default spawn point at the center of the map
map.spawnArea = rect(map.width / 2, map.height / 2, 0, 0);
// shorthand for adding entities
function add(entity: ServerEntity) {
world.addEntity(entity, map);
}
// shorthand for adding entities
function add(entity: ServerEntity) {
world.addEntity(entity, map);
}
// place return sign 2 tiles north of center of the map
add(createSign(map.width / 2, map.height / 2 - 2, 'Go back', (_, client) => goToMap(world, client, '', 'center')));
// place return sign 2 tiles north of center of the map
add(createSign(map.width / 2, map.height / 2 - 2, 'Go back', (_, client) => goToMap(world, client, '', 'center')));
// place barrel at 5, 5 location
add(entities.barrel(5, 5));
// place barrel at 5, 5 location
add(entities.barrel(5, 5));
// place more entities here ...
// place more entities here ...
return map;
return map;
}