Skip to content

Commit

Permalink
fix pos and facing being 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenni009 committed Nov 19, 2023
1 parent 3e53fac commit 5c1006b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import type { TeleportEndpoint, TeleporterTypes } from './types/teleportEndpoint

type Pos = [number, number, number];

const randomNumber = Math.random();

export function createEndpoint(
name: string = '',
teleporterType: TeleporterTypes = 'Spacestation',
Expand All @@ -11,8 +13,8 @@ export function createEndpoint(
galaxy: number = 0,
systemIndex: number = 0,
planet: number = 0,
position: Pos = [0, 0, 0],
facing: Pos = [0, 0, 0],
position: Pos = [randomNumber, randomNumber, randomNumber],
facing: Pos = [randomNumber, randomNumber, randomNumber],
isFeatured: boolean = false,
calcWarpOffset: boolean = false
): TeleportEndpoint {
Expand Down

0 comments on commit 5c1006b

Please sign in to comment.