mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-11-30 04:40:47 +01:00
handle some more event types
This commit is contained in:
parent
f5957059d8
commit
3ad9ebafd7
5 changed files with 33 additions and 5 deletions
|
|
@ -93,14 +93,29 @@ pub enum GameEvent<'a> {
|
|||
PointCaptured(PointCapturedEvent<'a>),
|
||||
CurrentScore(CurrentScoreEvent),
|
||||
BuiltObject(BuiltObjectEvent<'a>),
|
||||
DropObject(DropObjectEvent<'a>),
|
||||
CarryObject(BuiltCarryEvent<'a>),
|
||||
KilledObject(KilledObjectEvent<'a>),
|
||||
Extinguished(ExtinguishedEvent<'a>),
|
||||
GameOver(GameOverEvent<'a>),
|
||||
FinalScore(FinalScoreEvent),
|
||||
ObjectDetonated(ObjectDetonatedEvent<'a>),
|
||||
Request(UnparsedEvent<'a>),
|
||||
Response(UnparsedEvent<'a>),
|
||||
LogFileClosed,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct UnparsedEvent<'a> {
|
||||
pub params: &'a str,
|
||||
}
|
||||
|
||||
impl<'a> Event<'a> for UnparsedEvent<'a> {
|
||||
fn parse(input: &'a str) -> IResult<Self> {
|
||||
Ok(("", UnparsedEvent { params: input }))
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ParamIter<'a> {
|
||||
input: &'a str,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue