mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-14 20:32:17 +02:00
Feature: Displaying all starters based on environment parameters.
This commit is contained in:
parent
bf1233d7ad
commit
daaf2ef532
@ -3,3 +3,6 @@ VITE_ENVIRONMENT="local"
|
|||||||
VITE_API_BASE_URL="http://localhost:8001"
|
VITE_API_BASE_URL="http://localhost:8001"
|
||||||
VITE_BYPASS_LOGIN=true
|
VITE_BYPASS_LOGIN=true
|
||||||
VITE_BYPASS_TUTORIAL=false
|
VITE_BYPASS_TUTORIAL=false
|
||||||
|
|
||||||
|
# Debug
|
||||||
|
VITE_ACTIVATE_ALL_POKEMON_STARTERS=false
|
@ -1094,3 +1094,13 @@ export const defaultStarterSpecies: Species[] = [
|
|||||||
Species.GROOKEY, Species.SCORBUNNY, Species.SOBBLE,
|
Species.GROOKEY, Species.SCORBUNNY, Species.SOBBLE,
|
||||||
Species.SPRIGATITO, Species.FUECOCO, Species.QUAXLY
|
Species.SPRIGATITO, Species.FUECOCO, Species.QUAXLY
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if(Boolean(import.meta.env.VITE_ACTIVATE_ALL_POKEMON_STARTERS)){
|
||||||
|
console.log('je suis passé')
|
||||||
|
defaultStarterSpecies.length = 0;
|
||||||
|
for (const value in Species) {
|
||||||
|
if (isNaN(Number(value))) {
|
||||||
|
defaultStarterSpecies.push(Species[value as keyof typeof Species]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1308,7 +1308,9 @@ export class GameData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fixStarterData(systemData: SystemSaveData): void {
|
fixStarterData(systemData: SystemSaveData): void {
|
||||||
|
if(!Boolean(import.meta.env.VITE_ACTIVATE_ALL_POKEMON_STARTERS)){
|
||||||
for (let starterId of defaultStarterSpecies)
|
for (let starterId of defaultStarterSpecies)
|
||||||
systemData.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1;
|
systemData.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
13
src/vite-env.d.ts
vendored
Normal file
13
src/vite-env.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
|
interface ImportMetaEnv {
|
||||||
|
readonly VITE_ENVIRONMENT: string
|
||||||
|
readonly VITE_API_BASE_URL: string
|
||||||
|
readonly VITE_BYPASS_LOGIN: boolean
|
||||||
|
readonly VITE_BYPASS_TUTORIAL: boolean
|
||||||
|
readonly VITE_ACTIVATE_ALL_POKEMON_STARTERS: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImportMeta {
|
||||||
|
readonly env: ImportMetaEnv
|
||||||
|
}
|
12
vite.env.d.ts
vendored
12
vite.env.d.ts
vendored
@ -1,12 +0,0 @@
|
|||||||
/// <reference types="vite/client" />
|
|
||||||
|
|
||||||
interface ImportMetaEnv {
|
|
||||||
readonly VITE_ENVIRONMENT: string;
|
|
||||||
readonly VITE_API_BASE_URL: string;
|
|
||||||
readonly VITE_BYPASS_LOGIN: boolean;
|
|
||||||
readonly VITE_BYPASS_TUTORIAL: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ImportMeta {
|
|
||||||
readonly env: ImportMetaEnv;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user