Skip to content

Commit

Permalink
Update for 2.14.0-beta.dev.20240927.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Spacetech committed Sep 27, 2024
1 parent 0b26d50 commit ab77748
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"watch": "npx tsc --build --watch --pretty --preserveWatchOutput"
},
"devDependencies": {
"@wayward/types": "^2.14.0-beta.dev.20240926.1",
"@wayward/types": "^2.14.0-beta.dev.20240927.1",
"rimraf": "3.0.2",
"typescript": "^5.6.2"
}
Expand Down
10 changes: 10 additions & 0 deletions src/core/navigation/NavigationKdTrees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ export class NavigationKdTrees {
private readonly seaWaterTypes: Set<TerrainType> = new Set();
private readonly gatherableTypes: Set<TerrainType> = new Set();

private loaded = false;

public load(): void {
this.unload();

this.loaded = true;

for (const tileType of Enums.values(TerrainType)) {
const tileTypeName = TerrainType[tileType];

Expand All @@ -56,6 +60,12 @@ export class NavigationKdTrees {
}

public unload(): void {
if (!this.loaded) {
return;
}

this.loaded = false;

eventManager.deregisterEventBusSubscriber(this);

this.maps = new WeakMap();
Expand Down

0 comments on commit ab77748

Please sign in to comment.