~starkingdoms/starkingdoms

ref: 02e7f65abd9f13361fff020bd4c4e9df6df3f91c starkingdoms/crates/unified/src/thrust.rs -rw-r--r-- 579 bytes
02e7f65aghostly_zsh fix: starfield is now changing mode to stop unreasonable computations 20 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::collections::BTreeSet;
use bevy::ecs::entity::MapEntities;
use bevy::prelude::{Entity, Resource};
use serde::{Deserialize, Serialize};
use crate::prelude::{Component, Message};

/// 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, Message)]
pub struct ThrustSolution {
    #[entities]
    pub thrusters_on: BTreeSet<Entity>,
    pub converged: bool
}