#[macro_export]
macro_rules! mass {
($p:expr) => {
match $crate::parts_config().parts.get(&$p) {
Some(v) => v.mass,
None => 1.0,
}
};
}
#[macro_export]
macro_rules! capacity {
($p:expr) => {
match $crate::parts_config().parts.get(&$p) {
Some(v) => v.energy_capacity,
None => 0,
}
};
}
#[macro_export]
macro_rules! planet {
($t:expr) => {
$crate::planets_config().planets.get(&$t).unwrap()
};
}
#[macro_export]
macro_rules! part {
($t:expr) => {
$crate::parts_config().parts.get(&$t).unwrap()
};
}