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
+23 -23
View File
@@ -9,36 +9,36 @@ import { ServerEntity } from '../serverInterfaces';
import { setEntityName } from '../entityUtils';
export function createPaletteMap(world: World) {
const map = createServerMap('palette', MapType.None, 10, 10, TileType.Grass);
const map = createServerMap('palette', MapType.None, 10, 10, TileType.Grass);
map.spawnArea = rect(map.width / 2, map.height / 2, 0, 0);
map.spawnArea = rect(map.width / 2, map.height / 2, 0, 0);
function add(entity: ServerEntity) {
world.addEntity(entity, map);
}
function add(entity: ServerEntity) {
world.addEntity(entity, map);
}
add(createSign(map.width / 2, map.height / 2, 'Go back', (_, client) => goToMap(world, client, '', 'center')));
add(createSign(map.width / 2, map.height / 2, 'Go back', (_, client) => goToMap(world, client, '', 'center')));
const pad = 5;
let x = pad;
let y = pad;
const pad = 5;
let x = pad;
let y = pad;
for (const name of allEntities) {
const entityOrEntities = (entities as any)[name](x, y);
const ents = Array.isArray(entityOrEntities) ? entityOrEntities : [entityOrEntities];
for (const name of allEntities) {
const entityOrEntities = (entities as any)[name](x, y);
const ents = Array.isArray(entityOrEntities) ? entityOrEntities : [entityOrEntities];
for (const entity of ents) {
add(entity);
setEntityName(entity, name);
}
for (const entity of ents) {
add(entity);
setEntityName(entity, name);
}
x += 3;
x += 3;
if (x > (map.width - pad)) {
x = pad;
y += 3;
}
}
if (x > (map.width - pad)) {
x = pad;
y += 3;
}
}
return map;
return map;
}