mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-11-30 04:40:47 +01:00
more kill info
This commit is contained in:
parent
c8664f9e47
commit
5d1729110b
7 changed files with 196 additions and 99 deletions
|
|
@ -4,17 +4,17 @@ use crate::raw_event::{subject_parser, RawSubject};
|
|||
use crate::{Error, Event, Result};
|
||||
use std::net::SocketAddr;
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct ShotFiredEvent<'a> {
|
||||
pub weapon: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct ShotHitEvent<'a> {
|
||||
pub weapon: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct DamageEvent<'a> {
|
||||
#[event(name = "against")]
|
||||
#[event(default)]
|
||||
|
|
@ -25,18 +25,20 @@ pub struct DamageEvent<'a> {
|
|||
pub weapon: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct KillEvent<'a> {
|
||||
#[event(unnamed)]
|
||||
#[event(subject)]
|
||||
pub target: RawSubject<'a>,
|
||||
#[event(name = "with")]
|
||||
pub weapon: &'a str,
|
||||
#[event(name = "customkill")]
|
||||
pub custom_kill: Option<&'a str>,
|
||||
pub attacker_position: Option<(i32, i32, i32)>,
|
||||
pub victim_position: Option<(i32, i32, i32)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct KillAssistEvent<'a> {
|
||||
#[event(name = "against")]
|
||||
pub target: RawSubject<'a>,
|
||||
|
|
@ -44,75 +46,75 @@ pub struct KillAssistEvent<'a> {
|
|||
pub victim_position: Option<(i32, i32, i32)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct SpawnEvent {
|
||||
#[event(name = "as")]
|
||||
pub class: Option<Class>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct RoleChangeEvent {
|
||||
#[event(name = "to")]
|
||||
pub class: Option<Class>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct ConnectedEvent {
|
||||
#[event(name = "address")]
|
||||
pub address: SocketAddr,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct JoinedTeamEvent {
|
||||
pub team: Team,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct CommittedSuicideEvent<'a> {
|
||||
#[event(name = "with")]
|
||||
pub weapon: &'a str,
|
||||
pub attacker_position: Option<(i32, i32, i32)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct PickedUpEvent<'a> {
|
||||
pub item: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct DominationEvent<'a> {
|
||||
pub against: RawSubject<'a>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct RevengeEvent<'a> {
|
||||
pub against: RawSubject<'a>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct DisconnectEvent<'a> {
|
||||
pub reason: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct BuiltObjectEvent<'a> {
|
||||
pub object: Option<&'a str>,
|
||||
pub position: Option<(i32, i32, i32)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct BuiltCarryEvent<'a> {
|
||||
pub object: Option<&'a str>,
|
||||
pub position: Option<(i32, i32, i32)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct DropObjectEvent<'a> {
|
||||
pub object: Option<&'a str>,
|
||||
pub position: Option<(i32, i32, i32)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct KilledObjectEvent<'a> {
|
||||
pub object: Option<&'a str>,
|
||||
pub weapon: Option<&'a str>,
|
||||
|
|
@ -121,14 +123,14 @@ pub struct KilledObjectEvent<'a> {
|
|||
pub attacker_position: Option<(i32, i32, i32)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct ObjectDetonatedEvent<'a> {
|
||||
pub object: Option<&'a str>,
|
||||
#[event(name = "attacker_position")]
|
||||
pub position: Option<(i32, i32, i32)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct ExtinguishedEvent<'a> {
|
||||
pub against: RawSubject<'a>,
|
||||
pub with: &'a str,
|
||||
|
|
@ -136,13 +138,13 @@ pub struct ExtinguishedEvent<'a> {
|
|||
pub victim_position: Option<(i32, i32, i32)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct SayEvent<'a> {
|
||||
#[event(unnamed)]
|
||||
pub text: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Debug, Event)]
|
||||
#[derive(Debug, Event, Clone)]
|
||||
pub struct SayTeamEvent<'a> {
|
||||
#[event(unnamed)]
|
||||
pub text: &'a str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue