diff --git a/src/uicons.test.ts b/src/uicons.test.ts index e7234a5..ab29bef 100644 --- a/src/uicons.test.ts +++ b/src/uicons.test.ts @@ -192,7 +192,10 @@ describe('spawnpoint', () => { }) describe('stations', () => { - test('0.ext', () => { + test('active', () => { + expect(icons.station(true)).toBe(`${BASE_ICON_URL}/station/1.webp`) + }) + test('inactive', () => { expect(icons.station()).toBe(`${BASE_ICON_URL}/station/0.webp`) }) }) diff --git a/src/uicons.ts b/src/uicons.ts index 25b79aa..cba16d0 100644 --- a/src/uicons.ts +++ b/src/uicons.ts @@ -557,12 +557,15 @@ export class UICONS { } /** + * @param active if the station is active or not * @returns the src of the station icon */ - station(): string { + station(active = false): string { if (!this.#isReady('station')) return '' - return `${this.#path}/station/0.${this.#extensionMap.station}` + return `${this.#path}/station/${active ? 1 : 0}.${ + this.#extensionMap.station + }` } /**