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

Implement most of the occasional packets sent in elimination, expand interface for custom game logic #30

This commit is contained in:
NG (Graham)
2025-07-22 18:27:41 -04:00
parent dfde0247a4
commit 52493bf166
22 changed files with 482 additions and 41 deletions

View File

@@ -0,0 +1,13 @@
use polariton_server::operations::Immediate;
use polariton::operation::Typed;
const CODE: u8 = 60;
const MMR_PARAM_KEY: u8 = 77; // f64
pub(super) fn mmr_provider<C: Clone + Send + Sync>() -> Immediate<CODE, crate::UserTy, C> {
Immediate::new(|| {
let mut params = std::collections::HashMap::with_capacity(1);
params.insert(MMR_PARAM_KEY, Typed::Double(1.0));
params.into()
})
}

View File

@@ -7,6 +7,7 @@ mod search_clan;
mod season_rewards;
mod previous_battle_rewards;
mod platoon_data;
mod calculate_mmr;
use polariton_server::operations::OperationsHandler;
@@ -27,4 +28,5 @@ pub fn handler() -> OperationsHandler<crate::UserTy, crate::data::custom::Custom
.add(previous_battle_rewards::pending_battle_rewards_provider())
.add(platoon_data::platoon_provider())
.add(polariton_server::operations::Ack::<6, _>::default()) // AvatarUpdatedRequest, sent on services_room avatar_set success (just needs to be ack-ed; no params)
.add(calculate_mmr::mmr_provider())
}