~starkingdoms/starkingdoms

ref: 6f949473ea4886e5054dc2e360af440501a8a0b2 starkingdoms/crates/unified/src/shared/thrust.rs -rw-r--r-- 557 bytes
6f949473 — core netcode: fix attachment(2) (i odiot) 4 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::collections::BTreeSet;
use bevy::ecs::entity::MapEntities;
use bevy::prelude::{Component, Entity, Message, Resource};
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(Eq, PartialEq, Debug, Clone, Resource, Component, Message, Serialize, Deserialize, MapEntities)]
pub struct ThrustSolution {
    #[entities]
    pub thrusters_on: BTreeSet<Entity>,
    pub converged: bool
}