Merge 6ba31c8d2f into 582330df33
commit
9df36cfaea
7
.env
7
.env
|
|
@ -1,2 +1,5 @@
|
||||||
VITE_BYPASS_LOGIN=0
|
# Production environment
|
||||||
VITE_BYPASS_TUTORIAL=0
|
VITE_ENVIRONMENT="production"
|
||||||
|
VITE_API_BASE_URL="api"
|
||||||
|
VITE_BYPASS_LOGIN=false
|
||||||
|
VITE_BYPASS_TUTORIAL=false
|
||||||
|
|
@ -1,2 +1,5 @@
|
||||||
VITE_BYPASS_LOGIN=1
|
# Development environment
|
||||||
VITE_BYPASS_TUTORIAL=0
|
VITE_ENVIRONMENT="local"
|
||||||
|
VITE_API_BASE_URL="http://localhost:8001"
|
||||||
|
VITE_BYPASS_LOGIN=true
|
||||||
|
VITE_BYPASS_TUTORIAL=false
|
||||||
|
|
@ -63,7 +63,7 @@ import { STARTING_WAVE_OVERRIDE, OPP_SPECIES_OVERRIDE, SEED_OVERRIDE, STARTING_B
|
||||||
import {InputsController} from "./inputs-controller";
|
import {InputsController} from "./inputs-controller";
|
||||||
import {UiInputs} from "./ui-inputs";
|
import {UiInputs} from "./ui-inputs";
|
||||||
|
|
||||||
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
|
export const bypassLogin = Boolean(import.meta.env.VITE_BYPASS_LOGIN);
|
||||||
|
|
||||||
const DEBUG_RNG = false;
|
const DEBUG_RNG = false;
|
||||||
|
|
||||||
|
|
@ -94,7 +94,7 @@ export default class BattleScene extends SceneBase {
|
||||||
public gameSpeed: integer = 1;
|
public gameSpeed: integer = 1;
|
||||||
public damageNumbersMode: integer = 0;
|
public damageNumbersMode: integer = 0;
|
||||||
public showLevelUpStats: boolean = true;
|
public showLevelUpStats: boolean = true;
|
||||||
public enableTutorials: boolean = import.meta.env.VITE_BYPASS_TUTORIAL === "1";
|
public enableTutorials: boolean = Boolean(import.meta.env.VITE_BYPASS_TUTORIAL);
|
||||||
public enableRetries: boolean = false;
|
public enableRetries: boolean = false;
|
||||||
public uiTheme: UiTheme = UiTheme.DEFAULT;
|
public uiTheme: UiTheme = UiTheme.DEFAULT;
|
||||||
public windowType: integer = 0;
|
public windowType: integer = 0;
|
||||||
|
|
|
||||||
|
|
@ -220,9 +220,8 @@ export function executeIf<T>(condition: boolean, promiseFunc: () => Promise<T>):
|
||||||
}
|
}
|
||||||
|
|
||||||
export const sessionIdKey = 'pokerogue_sessionId';
|
export const sessionIdKey = 'pokerogue_sessionId';
|
||||||
export const isLocal = window.location.hostname === 'localhost';
|
export const isLocal = import.meta.env.VITE_ENVIRONMENT === 'local';
|
||||||
export const serverUrl = isLocal ? 'http://localhost:8001' : '';
|
export const apiUrl = import.meta.env.VITE_API_BASE_URL || (!isLocal ? 'api' : '');
|
||||||
export const apiUrl = isLocal ? serverUrl : 'api';
|
|
||||||
|
|
||||||
export function setCookie(cName: string, cValue: string): void {
|
export function setCookie(cName: string, cValue: string): void {
|
||||||
const expiration = new Date();
|
const expiration = new Date();
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
interface ImportMetaEnv {
|
interface ImportMetaEnv {
|
||||||
readonly VITE_BYPASS_LOGIN: string;
|
readonly VITE_ENVIRONMENT: string;
|
||||||
readonly VITE_BYPASS_TUTORIAL: string;
|
|
||||||
readonly VITE_API_BASE_URL: string;
|
readonly VITE_API_BASE_URL: string;
|
||||||
|
readonly VITE_BYPASS_LOGIN: boolean;
|
||||||
|
readonly VITE_BYPASS_TUTORIAL: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ImportMeta {
|
interface ImportMeta {
|
||||||
Loading…
Reference in New Issue