mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 06:19:29 +02:00
Use isNullOrUndefined
, Clean Up Imports
This commit is contained in:
parent
7fac510bb9
commit
5b70b044b3
@ -1,6 +1,7 @@
|
|||||||
import { SettingKeys } from "../../settings/settings";
|
import { SettingKeys } from "#app/system/settings/settings";
|
||||||
import { AbilityAttr, defaultStarterSpecies, DexAttr, SystemSaveData, SessionSaveData } from "../../game-data";
|
import { AbilityAttr, defaultStarterSpecies, DexAttr, SystemSaveData, SessionSaveData } from "#app/system/game-data";
|
||||||
import { allSpecies } from "../../../data/pokemon-species";
|
import { allSpecies } from "#app/data/pokemon-species";
|
||||||
|
import { isNullOrUndefined } from "#app/utils";
|
||||||
|
|
||||||
export const systemMigrators = [
|
export const systemMigrators = [
|
||||||
/**
|
/**
|
||||||
@ -46,7 +47,7 @@ export const systemMigrators = [
|
|||||||
* @param data {@linkcode SystemSaveData}
|
* @param data {@linkcode SystemSaveData}
|
||||||
*/
|
*/
|
||||||
function fixStarterData(data: SystemSaveData) {
|
function fixStarterData(data: SystemSaveData) {
|
||||||
if (data.starterData !== null) {
|
if (!isNullOrUndefined(data.starterData)) {
|
||||||
for (const starterId of defaultStarterSpecies) {
|
for (const starterId of defaultStarterSpecies) {
|
||||||
if (data.starterData[starterId]?.abilityAttr) {
|
if (data.starterData[starterId]?.abilityAttr) {
|
||||||
data.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1;
|
data.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1;
|
||||||
|
Loading…
Reference in New Issue
Block a user