From 759d5d27c7773c7fe8b165ce08b57204db990b74 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sun, 3 May 2026 17:31:47 -0400 Subject: move topbar ui rendering into it's own module --- src/solar_system.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/solar_system.rs') diff --git a/src/solar_system.rs b/src/solar_system.rs index cf6a36a..df1d246 100644 --- a/src/solar_system.rs +++ b/src/solar_system.rs @@ -1,6 +1,6 @@ use serde::{Deserialize}; -use crate::{GameState, known_stars::{KNOWN_STARS, StarNotFoundError}, timeman::{Second, TimeMan}}; -use std::{cell::RefCell, error::Error, f64::consts::PI}; +use crate::{known_stars::*, timeman::Second}; +use std::error::Error; const GRAVITATIONAL_CONSTANT: f64 = 6.67408e-20; @@ -33,7 +33,6 @@ pub struct SerialOrbitalBody pub struct OrbitalBody { body: SerialOrbitalBody, - id: BodyId, position: Option> } @@ -71,7 +70,6 @@ impl SolarSystem bodies.push(OrbitalBody { body: record, - id: bodies.len(), position: None }); } @@ -148,7 +146,6 @@ impl SolarSystem impl OrbitalBody { - pub fn id(&self) -> BodyId { self.id } pub fn name(&self) -> &String { &self.body.name } pub fn radius(&self) -> f32 { self.body.radius as f32 } pub fn position(&self) -> cgmath::Vector3 { self.position.unwrap() } -- cgit v1.2.3