Skip to content

Commit

Permalink
fix: region key and other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leaftail1880 committed Aug 27, 2024
1 parent ddd77b8 commit 10b57bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib/region/kinds/region.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export class Region {
static readonly kind: string

protected static generateRegionKey(kind: string, area: string, radius: number) {
return `${kind} ${area}-${radius} ${new Date(Date.now()).toISOString()}`
const date = new Date()
return `${kind}-${area}-${radius}-${date.toYYYYMMDD()}-${date.toHHMM()}`
}

/** Creates a new region */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/rpg/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class Compass {
setMinimapNpcPosition(player, MinimapNpc.Quest, location.x, location.z)
} else {
this.players.delete(player)
resetMinimapNpcPosition(player, MinimapNpc.Quest)
if (player.isValid()) resetMinimapNpcPosition(player, MinimapNpc.Quest)
}
}

Expand Down

0 comments on commit 10b57bc

Please sign in to comment.