From 972488c1d54d4e8171361de83c30ea0ccf06bed1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 13 Nov 2026 15:09:19 +0100 Subject: [PATCH] expose Point --- src/data/mod.rs | 14 ++++++++++++++ src/module/kills.rs | 15 +-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/data/mod.rs b/src/data/mod.rs index f3ac95b..b0a1ab9 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -1,3 +1,17 @@ mod weapons; +use serde::Serialize; pub use weapons::Weapon; + +#[derive(Serialize, PartialEq)] +pub struct Position { + pub x: i32, + pub y: i32, + pub z: i32, +} + +impl From<(i32, i32, i32)> for Position { + fn from((x, y, z): (i32, i32, i32)) -> Self { + Position { x, y, z } + } +} diff --git a/src/module/kills.rs b/src/module/kills.rs index 232dee7..c421aa3 100644 --- a/src/module/kills.rs +++ b/src/module/kills.rs @@ -1,5 +1,5 @@ use crate::common::{Class, SubjectId}; -use crate::data::Weapon; +use crate::data::{Position, Weapon}; use crate::event::{GameEvent, KillAssistEvent, KillEvent, MedicDeathExEvent}; use crate::module::GlobalData; use crate::raw_event::RawEventType; @@ -15,19 +15,6 @@ pub struct Participant { pub class: Class, } -#[derive(Serialize, PartialEq)] -pub struct Position { - pub x: i32, - pub y: i32, - pub z: i32, -} - -impl From<(i32, i32, i32)> for Position { - fn from((x, y, z): (i32, i32, i32)) -> Self { - Position { x, y, z } - } -} - #[derive(Serialize, PartialEq)] #[serde(rename_all = "kebab-case")] pub enum KillKind {