|
@ -283,13 +283,6 @@ impl<EG: EntityGateway> ShipServerState<EG> { |
|
|
},
|
|
|
},
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
fn update_config(&mut self, id: ClientId, update_config: &UpdateConfig) -> Box<dyn Iterator<Item = (ClientId, SendShipPacket)> + Send> {
|
|
|
|
|
|
let client = self.clients.get_mut(&id).ok_or(ShipError::ClientNotFound(id)).unwrap();
|
|
|
|
|
|
client.character.config.update(update_config);
|
|
|
|
|
|
self.entity_gateway.save_character(&client.character);
|
|
|
|
|
|
Box::new(None.into_iter())
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
impl<EG: EntityGateway> ServerState for ShipServerState<EG> {
|
|
|
impl<EG: EntityGateway> ServerState for ShipServerState<EG> {
|
|
@ -343,7 +336,7 @@ impl<EG: EntityGateway> ServerState for ShipServerState<EG> { |
|
|
handler::room::room_name_request(id, &self.client_location, &self.rooms)
|
|
|
handler::room::room_name_request(id, &self.client_location, &self.rooms)
|
|
|
},
|
|
|
},
|
|
|
RecvShipPacket::UpdateConfig(pkt) => {
|
|
|
RecvShipPacket::UpdateConfig(pkt) => {
|
|
|
self.update_config(id, pkt)
|
|
|
|
|
|
|
|
|
handler::settings::update_config(id, pkt, &mut self.clients, &mut self.entity_gateway)
|
|
|
},
|
|
|
},
|
|
|
RecvShipPacket::ViewInfoboardRequest(pkt) => {
|
|
|
RecvShipPacket::ViewInfoboardRequest(pkt) => {
|
|
|
handler::communication::request_infoboard(id, pkt, &self.client_location, &self.clients)
|
|
|
handler::communication::request_infoboard(id, pkt, &self.client_location, &self.clients)
|
|
|