Modularized existing vessel systems into separate modules (AIS, GPS, Radar) and restructured the project for improved maintainability. Updated references and documentation accordingly.

This commit is contained in:
geoffsee
2025-07-03 11:58:55 -04:00
parent f0935f2b54
commit 3f694f4494
13 changed files with 440 additions and 419 deletions

View File

@@ -0,0 +1 @@
pub mod player;

View File

@@ -0,0 +1,26 @@
use bevy::prelude::*;
use components::{setup_instrument_cluster, VesselData, update_vessel_data, update_instrument_displays};
use crate::vessel::vessel_systems::{create_vessel_systems, VesselSystem};
pub struct PlayerPlugin;
/// bind domain to bevy
impl Plugin for PlayerPlugin {
fn build(&self, app: &mut App) {
app.init_resource::<VesselData>()
.add_systems(
Update,
(update_vessel_data, update_instrument_displays)
);
}
}
/// Setup function called by the main app
pub fn setup_instrument_cluster_system() -> impl Fn(Commands) {
setup_instrument_cluster
}
/// Initialize vessel systems - returns the systems for registration
pub fn get_vessel_systems() -> Vec<Box<dyn VesselSystem>> {
create_vessel_systems()
}