sparkletown/sparkle

View on GitHub
src/components/templates/AnimateMap/game/map/MapContainer.ts

Summary

Maintainability
D
1 day
Test Coverage

Function initSystems has 110 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private initSystems() {
    this._tooltipContainer = new Container();
    this.addChild(this._tooltipContainer);
    this._bubbleContainer = new Container();
    this.addChild(this._bubbleContainer);
Severity: Major
Found in src/components/templates/AnimateMap/game/map/MapContainer.ts - About 4 hrs to fix

File MapContainer.ts has 349 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Engine } from "@ash.ts/ash";
import { Application, Container } from "pixi.js";
import { Viewport } from "pixi-viewport";

import { setAnimateMapPointer } from "store/actions/AnimateMap";
Severity: Minor
Found in src/components/templates/AnimateMap/game/map/MapContainer.ts - About 4 hrs to fix

Function initEntities has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private initEntities(): Promise<void> {
    if (!this.entityFactory) {
      return Promise.reject();
    }

Severity: Major
Found in src/components/templates/AnimateMap/game/map/MapContainer.ts - About 3 hrs to fix

Function initMap has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private initMap(config: any) {
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    const objectsLayer = config.layers.find((o: any) => o.name === "objects");

    if (objectsLayer) {
Severity: Minor
Found in src/components/templates/AnimateMap/game/map/MapContainer.ts - About 1 hr to fix

Avoid deeply nested control flow statements.
Open

                if (soundProp) {
                  const sound = soundProp.value;

                  if (sounds.hasOwnProperty(sound)) {
                    this.entityFactory?.createSoundEmitter(
Severity: Major
Found in src/components/templates/AnimateMap/game/map/MapContainer.ts - About 45 mins to fix

There are no issues that match your filters.

Category
Status