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

Implement non-event part of singleplayer for #7

This commit is contained in:
NGnius (Graham)
2025-03-18 16:47:11 -04:00
parent 792585a031
commit 67c14fe80a
35 changed files with 2127 additions and 17 deletions

View File

@@ -1,15 +1,15 @@
use polariton_server::operations::SimpleFunc;
use polariton::operation::ParameterTable;
//const PLATOON_ID_PARAM_KEY: u8 = 16;
const PLATOON_ID_PARAM_KEY: u8 = 16;
//const PLATOON_LEADER_PARAM_KEY: u8 = 17;
//const USER_LIST_PARAM_KEY: u8 = 7;
pub(super) fn platoon_provider<C: Send + Sync>() -> SimpleFunc<18, crate::UserTy, impl (Fn(ParameterTable<C>, &crate::UserTy) -> Result<ParameterTable<C>, i16>) + Sync + Sync, C> {
SimpleFunc::new(|params, _| {
//let mut params = params.to_dict();
let mut params = params.to_dict();
// if platoon ID is not provided, you're not in a platoon
//Ok(params.into())
Ok(params)
params.insert(PLATOON_ID_PARAM_KEY, polariton::operation::Typed::Null);
Ok(params.into())
})
}