junebug12851/pokered-save-editor

View on GitHub
src/app/data/savefile-expanded/sections/Area/AreaPlayer.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 31 of 31 total issues

Function load has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

public load(saveFile: SaveFileService) {
this.yCoord = saveFile.getByte(0x260D);
this.xCoord = saveFile.getByte(0x260E);
this.yBlockCoord = saveFile.getByte(0x260F);
this.xBlockCoord = saveFile.getByte(0x2610);
Severity: Minor
Found in src/app/data/savefile-expanded/sections/Area/AreaPlayer.ts - About 1 hr to fix

Function save has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

public save(saveFile: SaveFileService) {
saveFile.setByte(0x260D, this.yCoord);
saveFile.setByte(0x260E, this.xCoord);
saveFile.setByte(0x260F, this.yBlockCoord);
saveFile.setByte(0x2610, this.xBlockCoord);
Severity: Minor
Found in src/app/data/savefile-expanded/sections/Area/AreaPlayer.ts - About 1 hr to fix

Type number trivially inferred from a number literal, remove type annotation
Open

public playerJumpingYScrnCoords: number = 0;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public flyOutofBattle: boolean = false;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public standingOnDoor: boolean = false;

Type number trivially inferred from a number literal, remove type annotation
Open

public safariBallCount: number = 0;

Type number trivially inferred from a number literal, remove type annotation
Open

public xOffsetSinceLastSpecialWarp: number = 0;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public strengthOutsideBattle: boolean = false;

Type number trivially inferred from a number literal, remove type annotation
Open

public playerCurDir: number = 0;

Type number trivially inferred from a number literal, remove type annotation
Open

public walkBikeSurf: number = 0;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public movingThroughDoor: boolean = false;

Type number trivially inferred from a number literal, remove type annotation
Open

public yOffsetSinceLastSpecialWarp: number = 0;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public standingOnWarp: boolean = false;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public usedCardKey: boolean = false;

Type number trivially inferred from a number literal, remove type annotation
Open

public playerLastStopDir: number = 0;

Type number trivially inferred from a number literal, remove type annotation
Open

public safariSteps: number = 0;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public noBattles: boolean = false;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public battleEndedOrBlackout: boolean = false;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public safariGameOver: boolean = false;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public finalLedgeJumping: boolean = false;

Type number trivially inferred from a number literal, remove type annotation
Open

public xCoord: number = 0;

Type number trivially inferred from a number literal, remove type annotation
Open

public yBlockCoord: number = 0;

Type number trivially inferred from a number literal, remove type annotation
Open

public yCoord: number = 0;

Type number trivially inferred from a number literal, remove type annotation
Open

public xBlockCoord: number = 0;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public isBattle: boolean = false;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public isTrainerBattle: boolean = false;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public usingLinkCable: boolean = false;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public surfingAllowed: boolean = false;

if statements must be braced
Open

if (saveFile !== undefined)
this.load(saveFile as SaveFileService);

Type number trivially inferred from a number literal, remove type annotation
Open

public playerMoveDir: number = 0;

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public spinPlayer: boolean = false;
Category
Status