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

Add server for game data (implement login sequence)

This commit is contained in:
NGnius (Graham)
2025-02-12 18:46:27 -05:00
parent ca4a0ce675
commit d8885d811f
52 changed files with 2734 additions and 5 deletions

View File

@@ -0,0 +1,29 @@
use polariton_server::operations::SimpleFunc;
use polariton::operation::{ParameterTable, Typed, Dict};
const PLATFORM_CONFIG_KEY: u8 = 197;
pub(super) fn platform_config_provider() -> SimpleFunc<165, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
SimpleFunc::new(|params, _| {
let mut params = params.to_dict();
params.insert(PLATFORM_CONFIG_KEY, Typed::Dict(Dict {
key_ty: 42, // obj
val_ty: 42, // obj
items: vec![
(Typed::Str("BuyPremiumAvailable".into()), Typed::Bool(false.into())),
(Typed::Str("MainShopButtonAvailable".into()), Typed::Bool(false.into())),
(Typed::Str("RoboPassButtonAvailable".into()), Typed::Bool(false.into())),
(Typed::Str("LanguageSelectionAvailable".into()), Typed::Bool(false.into())),
(Typed::Str("AutoJoinPublicChatRoom".into()), Typed::Bool(false.into())), // TODO maybe?
(Typed::Str("CanCreateChatRooms".into()), Typed::Bool(false.into())), // TODO
(Typed::Str("CurseVoiceEnabled".into()), Typed::Bool(false.into())),
(Typed::Str("DeltaDNAEnabled".into()), Typed::Bool(false.into())),
(Typed::Str("UseDecimalSystem".into()), Typed::Bool(false.into())),
(Typed::Str("FeedbackURL".into()), Typed::Str("https://mstdn.ca/@ngram".into())),
(Typed::Str("SupportURL".into()), Typed::Str("https://git.ngni.us/OpenJam/servers".into())),
(Typed::Str("WikiURL".into()), Typed::Str("https://docs.rs/libfj/latest/libfj/".into())),
].into(),
}));
Ok(params.into())
})
}