2025-07-03 21:53:34 -04:00
|
|
|
mod validate_game_guid;
|
2025-07-06 17:36:52 -04:00
|
|
|
mod loading_progress;
|
|
|
|
|
mod all_loading_progress;
|
|
|
|
|
mod weapon_select;
|
|
|
|
|
mod activate_sync;
|
2025-07-03 21:53:34 -04:00
|
|
|
|
|
|
|
|
pub async fn handler(init_ctx: &crate::InitConfig) -> crate::handler::LnlEventHandler {
|
2025-07-06 17:36:52 -04:00
|
|
|
crate::handler::LnlEventHandler::new(init_ctx.users.clone(), crate::vehicle_motion::handler(init_ctx))
|
2025-07-03 21:53:34 -04:00
|
|
|
.add(validate_game_guid::handler(init_ctx))
|
2025-07-06 17:36:52 -04:00
|
|
|
.add(loading_progress::handler(init_ctx))
|
|
|
|
|
.add(all_loading_progress::handler(init_ctx))
|
|
|
|
|
.add(weapon_select::handler(init_ctx))
|
|
|
|
|
.add(activate_sync::handler(init_ctx))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
|
pub fn log_channel_send_failure<T>(result: Result<(), tokio::sync::mpsc::error::SendError<T>>) {
|
|
|
|
|
if result.is_err() {
|
|
|
|
|
log::error!("Failed to send game message");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
|
pub fn log_lnl_send_failure(result: std::io::Result<usize>) {
|
|
|
|
|
if let Err(e) = result {
|
|
|
|
|
log::error!("Failed to send packet: {}", e);
|
|
|
|
|
}
|
2025-07-03 21:53:34 -04:00
|
|
|
}
|