Add minimal robot factory functionality and arc archive support for #6

This commit is contained in:
NG (Graham) committed 2025-05-17 23:06:07 -04:00
1 parent 3f0c30f6c3
commit 3f1438c068
34 files changed
+869 -4

No files matched your search

@@ -0,0 +1,15 @@
use polariton_server::operations::SimpleFunc;
use polariton::operation::{ParameterTable, Typed};
const PARAM_KEY: u8 = 96;
pub(super) fn robot_shop_user_earnings_provider() -> SimpleFunc<88, 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, Typed::HashMap(vec![
(Typed::Str("buyCount".into()), Typed::Int(0)),
(Typed::Str("earnings".into()), Typed::Int(0)),
].into()));
Ok(params.into())
})
}