2025-02-23 16:10:21 -05:00
|
|
|
use polariton_server::operations::SimpleFunc;
|
|
|
|
|
use polariton::operation::{ParameterTable, Typed};
|
|
|
|
|
|
2025-03-01 16:22:57 -05:00
|
|
|
const CURRENT_PARAM_KEY: u8 = 214;
|
2025-02-23 16:10:21 -05:00
|
|
|
|
|
|
|
|
pub(super) fn tech_points_provider() -> SimpleFunc<187, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
|
|
|
|
|
SimpleFunc::new(|params, _| {
|
|
|
|
|
let mut params = params.to_dict();
|
2025-03-01 16:22:57 -05:00
|
|
|
params.insert(CURRENT_PARAM_KEY, Typed::Int(1337));
|
|
|
|
|
Ok(params.into())
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const UNCLAIMED_PARAM_KEY: u8 = 212;
|
|
|
|
|
|
|
|
|
|
pub(super) fn tech_points_awards_provider() -> SimpleFunc<185, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
|
|
|
|
|
SimpleFunc::new(|params, _| {
|
|
|
|
|
let mut params = params.to_dict();
|
|
|
|
|
params.insert(UNCLAIMED_PARAM_KEY, Typed::Int(0));
|
2025-02-23 16:10:21 -05:00
|
|
|
Ok(params.into())
|
|
|
|
|
})
|
|
|
|
|
}
|