Something went wrong. Try again.
Starship Simulator Controls thoriumsim.com
Something went wrong. Try again.
577 B · 14 lines
TypeScript
at develop
123456789101112131415import type { Entity } from "@thorium/utils/ecs";
export function getClassification(object: Entity) { if (!object) return ""; if (object.components.isPlanet) return `Class ${object.components.isPlanet.classification} Planet`; if (object.components.isStar) return `Class ${object.components.isStar.spectralType} Star`; if (object.components.isShip) return `${ object.components.isShip.shipClass ? `${object.components.isShip.shipClass} Class ` : "" }${object.components.isShip.category}`; if (object.components.isSolarSystem) return "Solar System"; return "";}