Add travel
This commit is contained in:
parent
fa02c95c41
commit
540319541d
2 changed files with 9 additions and 2 deletions
|
|
@ -8,6 +8,10 @@ import {
|
|||
import type { IPlayer } from "./structures/entities.js";
|
||||
import { getSpeed } from "./entity.js";
|
||||
|
||||
const existsLocation = (name: string): boolean => {
|
||||
return locations.find((location) => location.name === name) !== undefined;
|
||||
};
|
||||
|
||||
const getLocation = (id: Location): ILocation => {
|
||||
const location = locations.find((location) => location.id === id);
|
||||
|
||||
|
|
@ -93,6 +97,7 @@ const finishTravel = (
|
|||
};
|
||||
|
||||
export {
|
||||
existsLocation,
|
||||
getLocation,
|
||||
getLocationByName,
|
||||
getLocationDistance,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue