Skip to content

Commit

Permalink
fix: move uniqueid is sometimes a number
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Aug 28, 2023
1 parent 8f1412e commit 2bd27aa
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4,312 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pogo-data-generator",
"version": "1.16.1",
"version": "1.16.2",
"description": "Pokemon GO project data generator",
"author": "TurtIeSocks",
"license": "Apache-2.0",
Expand Down
5 changes: 4 additions & 1 deletion src/classes/Move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ export default class Moves extends Masterfile {
if (id || id === 0) {
this.parsedMoves[id] = {
moveId: id,
moveName: this.capitalize(combatMove.uniqueId.replace('_FAST', '')),
moveName:
typeof combatMove.uniqueId === 'string'
? this.capitalize(combatMove.uniqueId.replace('_FAST', ''))
: this.capitalize(templateId.substring(18)),
proto: templateId.substring(18),
type: Rpc.HoloPokemonType[combatMove.type as TypeProto],
power: combatMove.power,
Expand Down
2 changes: 1 addition & 1 deletion src/typings/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export interface NiaMfObj {
}[]
}
combatMove?: {
uniqueId: string
uniqueId: string | number
type: string
power: number
}
Expand Down
Loading

0 comments on commit 2bd27aa

Please sign in to comment.