mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-11-30 04:40:47 +01:00
expose Point
This commit is contained in:
parent
c539a5eaa5
commit
972488c1d5
2 changed files with 15 additions and 14 deletions
|
|
@ -1,3 +1,17 @@
|
||||||
mod weapons;
|
mod weapons;
|
||||||
|
|
||||||
|
use serde::Serialize;
|
||||||
pub use weapons::Weapon;
|
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 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::common::{Class, SubjectId};
|
use crate::common::{Class, SubjectId};
|
||||||
use crate::data::Weapon;
|
use crate::data::{Position, Weapon};
|
||||||
use crate::event::{GameEvent, KillAssistEvent, KillEvent, MedicDeathExEvent};
|
use crate::event::{GameEvent, KillAssistEvent, KillEvent, MedicDeathExEvent};
|
||||||
use crate::module::GlobalData;
|
use crate::module::GlobalData;
|
||||||
use crate::raw_event::RawEventType;
|
use crate::raw_event::RawEventType;
|
||||||
|
|
@ -15,19 +15,6 @@ pub struct Participant {
|
||||||
pub class: Class,
|
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)]
|
#[derive(Serialize, PartialEq)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
pub enum KillKind {
|
pub enum KillKind {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue