~starkingdoms/starkingdoms

ref: f85bb4de01556b03b4b711345acb2bcf3c370502 starkingdoms/crates/unified/src/ship_editor/components.rs -rw-r--r-- 826 bytes
f85bb4deghostly_zsh ship editor fix: thruster attachment and connected part sprite 2 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use bevy::camera::visibility::RenderLayers;
use crate::prelude::{Component, Handle, Entity, Resource};
use crate::shared::config::part::PartConfig;
use crate::shared::config::ship_editor::ShipEditorConfig;

pub const MAIN_RENDER_LAYER: RenderLayers = RenderLayers::layer(0);
pub const GHOST_RENDER_LAYER: RenderLayers = RenderLayers::layer(1);

#[derive(Component)]
pub struct GhostModule;
#[derive(Component)]
pub struct Part;
#[derive(Component)]
pub struct PartConfigHolder(pub PartConfig);

#[derive(Component)]
pub struct MainCamera;
#[derive(Component)]
pub struct GhostCamera;
#[derive(Component)]
pub struct PlayerPartRequest;
#[derive(Component)]
pub struct SpawnPartRequest(pub Handle<PartConfig>);

#[derive(Resource, Default)]
pub struct ShipEditorConfigHolder {
    pub handle: Option<Handle<ShipEditorConfig>>,
}