1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00
Files
ojrc/rc_services_room/src/operations/last_completed_campaign.rs
2025-09-03 22:33:32 -04:00

15 lines
581 B
Rust

use polariton_server::operations::SimpleFunc;
use polariton::operation::{ParameterTable, Typed};
// const CAMPAIGN_ID_PARAM_KEY: u8 = 22; // str
// const DIFFICULTY_PARAM_KEY: u8 = 22; // int
const AVAILABLE_PARAM_KEY: u8 = 89; // bool
pub(super) fn completed_campaign_provider() -> SimpleFunc<77, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
SimpleFunc::new(|params, _| {
let mut params = params.to_dict();
params.insert(AVAILABLE_PARAM_KEY, Typed::Bool(false));
Ok(params.into())
})
}