1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Guess weapon order for factory downloads (since they have no weapon order) #6

This commit is contained in:
NG (Graham)
2025-05-18 20:33:29 -04:00
parent 49781d35b2
commit fd75dba80e
10 changed files with 164 additions and 6 deletions

20
rc_core/src/cubes/mod.rs Normal file
View File

@@ -0,0 +1,20 @@
pub(self) mod parser;
mod weapon_list;
pub use weapon_list::WeaponListParser;
pub struct CubeParsers {
weapon_list: std::sync::Arc<WeaponListParser>,
}
impl CubeParsers {
pub fn new(conf: &crate::ConfigImpl) -> Self {
Self {
weapon_list: std::sync::Arc::new(WeaponListParser::with_cubes(<crate::ConfigImpl as crate::ConfigProvider<()>>::cubes(conf).values())),
}
}
pub fn weapon_order(&self) -> std::sync::Arc<WeaponListParser> {
self.weapon_list.clone()
}
}