~starkingdoms/starkingdoms

ref: f5b36bb07dfc827a4435fd116c1438f7776c1fa0 starkingdoms/crates/unified/src/config/world.rs -rw-r--r-- 877 bytes
f5b36bb0ghostly_zsh fix: orbit predictor is scaled and positioned constantly on hte screen 18 days 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
29
30
31
32
33
34
35
use bevy::asset::Asset;
use crate::prelude::*;
use serde::Deserialize;

#[derive(Deserialize, Asset, TypePath, Clone)]
pub struct GlobalWorldConfig {
    pub world: WorldConfig,
    pub part: WPartConfig,
    pub hearty: HeartyConfig,
}

#[derive(Deserialize, Asset, TypePath, Clone)]
pub struct WorldConfig {
    pub gravity: f32,
    pub spawn_parts_at: String,
    pub spawn_parts_interval_secs: f32,
}

#[derive(Deserialize, Asset, TypePath, Clone, Debug)]
pub struct WPartConfig {
    pub default_width: f32,
    pub default_height: f32,
    pub default_mass: f32,
    pub joint_align_compliance: f32,
    pub joint_angle_compliance: f32,
    pub joint_limit_compliance: f32,
    pub joint_linear_damping: f32,
    pub joint_angular_damping: f32,
}

#[derive(Deserialize, Asset, TypePath, Clone)]
pub struct HeartyConfig {
    pub thrust: f32,
    pub spawn_at: String,
}