Add server for game data (implement login sequence)

This commit is contained in:
NGnius (Graham) committed 2025-02-12 18:46:27 -05:00
1 parent ca4a0ce675
commit d8885d811f
52 files changed
+2734 -5

No files matched your search

@@ -0,0 +1,18 @@
use polariton_server::operations::SimpleFunc;
use polariton::operation::ParameterTable;
use crate::data::cosmetic_limits::CosmeticLimitsData;
const PARAM_KEY: u8 = 196;
pub(super) fn cosmetic_limits_config_provider() -> SimpleFunc<72, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
SimpleFunc::new(|params, _| {
let mut params = params.to_dict();
params.insert(PARAM_KEY, CosmeticLimitsData {
others_max_holo_and_trails: 16,
others_max_headlamps: 8,
others_max_cosmetic_items_with_particles: 12,
}.as_transmissible());
Ok(params.into())
})
}