Skip to content

Commit

Permalink
forgot to dispose solar panels
Browse files Browse the repository at this point in the history
  • Loading branch information
BarthPaleologue committed Sep 20, 2024
1 parent 909b29f commit 1d565b7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/ts/spacestation/spaceStation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,19 @@ import { TransformNode } from "@babylonjs/core/Meshes";
import { OrbitProperties } from "../orbit/orbitProperties";
import { Vector3 } from "@babylonjs/core/Maths/math.vector";
import { OrbitalObjectPhysicalProperties } from "../architecture/physicalProperties";
import { PhysicsAggregate } from "@babylonjs/core/Physics/v2/physicsAggregate";
import { CelestialBody } from "../architecture/celestialBody";
import i18n from "../i18n";
import { SpaceStationNodeType } from "../assets/procedural/spaceStation/spaceStationNode";
import { UtilitySection } from "../assets/procedural/spaceStation/utilitySection";
import { HelixHabitat } from "../assets/procedural/spaceStation/helixHabitat";
import { RingHabitat } from "../assets/procedural/spaceStation/ringHabitat";
import { Transformable } from "../architecture/transformable";
import { getSolarPanelSurfaceFromEnergyRequirement } from "../utils/solarPanels";
import { StellarObject } from "../architecture/stellarObject";
import { SolarSection } from "../assets/procedural/spaceStation/solarSection";
import { Axis } from "@babylonjs/core/Maths/math.axis";
import { wheelOfFortune } from "../utils/random";
import { CylinderHabitat } from "../assets/procedural/spaceStation/cylinderHabitat";
import { LandingBay } from "../assets/procedural/spaceStation/landingBay";
import { LandingPad } from "../assets/procedural/landingPad/landingPad";
import { LandingRequest, ManagesLandingPads } from "../utils/managesLandingPads";
import { getEdibleEnergyPerHaPerDay } from "../utils/agriculture";
import { Settings } from "../settings";
import { EngineBay } from "../assets/procedural/spaceStation/engineBay";
import { StarSystemModel } from "../starSystem/starSystemModel";
Expand All @@ -55,8 +50,6 @@ export class SpaceStation implements OrbitalObject, Cullable, ManagesLandingPads

readonly postProcesses: PostProcessType[] = [];

readonly childAggregates: PhysicsAggregate[] = [];

readonly parent: OrbitalObject | null = null;

readonly solarSections: SolarSection[] = [];
Expand Down Expand Up @@ -254,14 +247,14 @@ export class SpaceStation implements OrbitalObject, Cullable, ManagesLandingPads
}

dispose() {
this.root.dispose();
this.solarSections.forEach((solarSection) => solarSection.dispose());
this.utilitySections.forEach((utilitySection) => utilitySection.dispose());
this.helixHabitats.forEach((helixHabitat) => helixHabitat.dispose());
this.ringHabitats.forEach((ringHabitat) => ringHabitat.dispose());
this.cylinderHabitats.forEach((cylinderHabitat) => cylinderHabitat.dispose());
this.landingBays.forEach((landingBay) => landingBay.dispose());
this.engineBays.forEach((engineBay) => engineBay.dispose());

this.childAggregates.forEach((childAggregate) => childAggregate.dispose());
this.root.dispose();
}
}

0 comments on commit 1d565b7

Please sign in to comment.