mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Make static cpu limits Immediate
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
use polariton_server::operations::SimpleFunc;
|
||||
use polariton_server::operations::Immediate;
|
||||
use polariton::operation::ParameterTable;
|
||||
|
||||
use crate::data::cpu_limits::CpuLimitsData;
|
||||
|
||||
const PARAM_KEY: u8 = 194;
|
||||
|
||||
pub(super) fn cpu_config_provider() -> SimpleFunc<75, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
|
||||
SimpleFunc::new(|params, _| {
|
||||
let mut params = params.to_dict();
|
||||
pub(super) fn cpu_config_provider() -> Immediate<75, crate::UserTy> {
|
||||
Immediate::new(|| {
|
||||
let mut params = ParameterTable::with_capacity(2);
|
||||
params.insert(PARAM_KEY, CpuLimitsData {
|
||||
premium_for_life_cosmetic_gpu: 12,
|
||||
premium_cosmetic_cpu: 6,
|
||||
@@ -15,6 +15,6 @@ pub(super) fn cpu_config_provider() -> SimpleFunc<75, crate::UserTy, impl (Fn(Pa
|
||||
max_regular_health: 200_000_000,
|
||||
max_megabot_health: 2_000_000_000,
|
||||
}.as_transmissible());
|
||||
Ok(params.into())
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user