Skip to content

Commit ef42695

Browse files
Fixing lint errors
1 parent 95a3db4 commit ef42695

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

src/game-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export async function runGameServer(): Promise<void> {
130130
world = new World();
131131
await injectPlugins();
132132

133-
world.init();//.then(() => delete cache.mapData);
133+
world.init(); // .then(() => delete cache.mapData);
134134

135135
if(process.argv.indexOf('-fakePlayers') !== -1) {
136136
world.generateFakePlayers();

src/world/actor/pathfinding.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ export class Pathfinding {
170170
throw new Error(`Out of range.`);
171171
}
172172

173-
let destinationIndexX = destinationX - position.x + searchRadius;
174-
let destinationIndexY = destinationY - position.y + searchRadius;
175-
let startingIndexX = searchRadius;
176-
let startingIndexY = searchRadius;
173+
const destinationIndexX = destinationX - position.x + searchRadius;
174+
const destinationIndexY = destinationY - position.y + searchRadius;
175+
const startingIndexX = searchRadius;
176+
const startingIndexY = searchRadius;
177177

178178
const pointLen = searchRadius * 2;
179179

src/world/map/chunk-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class ChunkManager {
1515
this.chunkMap = new Map<string, Chunk>();
1616
}
1717

18-
public async generateCollisionMaps(): Promise<void> {
18+
public generateCollisionMaps(): void {
1919
logger.info('Generating game world collision maps...');
2020

2121
const tileList = cache.mapData.tiles;

src/world/world.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ export class World {
6565
}
6666

6767
public async init(): Promise<void> {
68-
this.chunkManager.generateCollisionMaps();
69-
this.spawnNpcs();
70-
this.spawnScenery();
68+
await new Promise(() => {
69+
this.chunkManager.generateCollisionMaps();
70+
this.spawnNpcs();
71+
this.spawnScenery();
72+
});
7173
}
7274

7375
/**

0 commit comments

Comments
 (0)