Showing 20 of 20 total issues
Function load
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public load(saveFile: SaveFileService) { this.pauseWildEncounters3Steps = saveFile.getBit(0x29D8, 1, 0); this.grassRate = saveFile.getByte(0x2B33); // Load Grass Pokemon only if there's an encounter rate for it
- Create a ticketCreate a ticket
Function load
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public load(saveFile: SaveFileService) { this.pauseWildEncounters3Steps = saveFile.getBit(0x29D8, 1, 0); this.grassRate = saveFile.getByte(0x2B33); // Load Grass Pokemon only if there's an encounter rate for it
- Read upRead up
- Create a ticketCreate a ticket
Function save
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public save(saveFile: SaveFileService) { const it = saveFile.iterator; saveFile.setBit(0x29D8, 1, 0, this.pauseWildEncounters3Steps);
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
if(this.grassRate > 0) { const grassPokemon = saveFile.getRange(0x2B34, 20); this.grassPokemon = []; for (let i = 0; i < 20; i += 2) {
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
if(this.waterPokemonRate > 0) { const waterPokemon = saveFile.getRange(0x2B51, 20); this.waterPokemon = []; for (let i = 0; i < 20; i += 2) {
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
if(this.grassRate > 0) { it.offsetTo(0x2B34); for (let i = 0; i < 10; i++) { it.setByte(this.grassPokemon[i].level); it.setByte(this.grassPokemon[i].pokemon);
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
if(this.waterPokemonRate > 0) { it.offsetTo(0x2B51); for (let i = 0; i < 10; i++) { it.setByte(this.waterPokemon[i].level); it.setByte(this.waterPokemon[i].pokemon);
- Read upRead up
- Create a ticketCreate a ticket
if statements must be braced Open
if (saveFile !== undefined) this.load(saveFile as SaveFileService);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Type number trivially inferred from a number literal, remove type annotation Open
public waterPokemonRate: number = 0;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Type number trivially inferred from a number literal, remove type annotation Open
public grassRate: number = 0;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
missing whitespace Open
if(this.waterPokemonRate > 0) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Type boolean trivially inferred from a boolean literal, remove type annotation Open
public pauseWildEncounters3Steps: boolean = false;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
missing whitespace Open
if(this.grassRate > 0) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
missing whitespace Open
if(this.waterPokemonRate > 0) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Properties should be separated by semicolons Open
level: number,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Properties should be separated by semicolons Open
pokemon: number,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
missing whitespace Open
if(this.grassRate > 0) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks