mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Implement minimal chat service, fix some implement bugs
This commit is contained in:
1 parent
2907376722
commit
2106613f62
21 files changed
+227
-194
No files matched your search
@@ -1,12 +1,14 @@
|
||||
use polariton_server::operations::SimpleFunc;
|
||||
use polariton::operation::{ParameterTable, Typed};
|
||||
|
||||
const PARAM_KEY: u8 = 2;
|
||||
const MESSAGE_PARAM_KEY: u8 = 2;
|
||||
const DISPLAY_TIME_PARAM_KEY: u8 = 15;
|
||||
|
||||
pub(super) fn dev_message_provider() -> SimpleFunc<8, 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::Bytes(Vec::from("No jam was harmed in the reverse-engineering of this game".as_bytes()).into()));
|
||||
params.insert(MESSAGE_PARAM_KEY, Typed::Bytes(Vec::from("No jam was harmed in the reverse-engineering of this game".as_bytes()).into()));
|
||||
params.insert(DISPLAY_TIME_PARAM_KEY, Typed::Int(60 /* seconds??? */));
|
||||
Ok(params.into())
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user