mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 13:33:01 +02:00
fixed formattign
This commit is contained in:
parent
079d50e2e0
commit
a7b5a4d2e1
@ -1,6 +1,5 @@
|
|||||||
import type { Abilities } from "#enums/abilities";
|
import type { Abilities } from "#enums/abilities";
|
||||||
import type { PokemonType } from "#enums/pokemon-type";
|
import type { PokemonType } from "#enums/pokemon-type";
|
||||||
import { isNullOrUndefined } from "#app/utils/common";
|
|
||||||
import type { Nature } from "#enums/nature";
|
import type { Nature } from "#enums/nature";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -15,12 +14,10 @@ export class CustomPokemonData {
|
|||||||
public types: PokemonType[];
|
public types: PokemonType[];
|
||||||
|
|
||||||
constructor(data?: CustomPokemonData | Partial<CustomPokemonData>) {
|
constructor(data?: CustomPokemonData | Partial<CustomPokemonData>) {
|
||||||
if (!isNullOrUndefined(data)) {
|
this.spriteScale = data?.spriteScale ?? 1;
|
||||||
this.spriteScale = data.spriteScale ?? 1;
|
this.ability = data?.ability ?? -1;
|
||||||
this.ability = data.ability ?? -1;
|
this.passive = data?.passive ?? -1;
|
||||||
this.passive = data.passive || data.spriteScale;
|
this.nature = data?.nature ?? -1;
|
||||||
this.spriteScale = this.spriteScale || data.spriteScale;
|
this.types = data?.types ?? [];
|
||||||
this.types = data.types || this.types;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user