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

Update for event system in (failed) attempt to get Singleplayer to spawn robots

This commit is contained in:
NGnius (Graham)
2025-03-18 22:30:20 -04:00
parent 67c14fe80a
commit 78941fb8ff
17 changed files with 132 additions and 153 deletions

View File

@@ -14,8 +14,8 @@ impl <C> Operation<C> for MoreLobbyAuth {
fn handle(&self, params: polariton::operation::ParameterTable<C>, _: &mut Self::State, user: &Self::User) -> polariton::operation::OperationResponse<C> {
let params_dict = params.to_dict();
if let Some(Typed::Str(auth_payload)) = params_dict.get(&Self::AUTH_PAYLOAD_KEY) {
let mut write_lock = user.write().unwrap();
if write_lock.update_with_auth(&auth_payload.string) {
//let mut write_lock = user.write().unwrap();
if user.update_with_auth(&auth_payload.string) {
let mut resp_params = std::collections::HashMap::new();
resp_params.insert(Self::AUTH_PAYLOAD_KEY, polariton::operation::Typed::Byte(0));
return polariton::operation::OperationResponse {