~starkingdoms/starkingdoms

ref: 7573667ca598be0f07a81155b5552a7459ef3c7e starkingdoms/crates/unified/src/thrust.rs -rw-r--r-- 503 bytes
7573667cTerraMaster85 feat: some groundwork for thrusters 22 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::collections::BTreeSet;
use bevy::prelude::{Entity, Resource, Compenent};
use serde::{Deserialize, Serialize};

/// A thrust solution, found by the thrust solver on the client.
/// `thrusters_on` is the set of thrusters that should be on.
/// Any thrusters not in this set should be off.
#[derive(Serialize, Deserialize, Eq, PartialEq, Debug, Clone, Resource, Component, MapEntities)]
pub struct ThrustSolution {
    #[entities]
    pub thrusters_on: BTreeSet<Entity>,
    pub converged: bool
}