1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-03 18:24:05 +02:00

handle spec chat

This commit is contained in:
Robin Appelman 2019-03-05 23:16:54 +01:00
commit a0322d9885
2 changed files with 10 additions and 7 deletions

12
Cargo.lock generated
View file

@ -16,7 +16,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -46,7 +46,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -113,7 +113,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -133,7 +133,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -157,7 +157,7 @@ dependencies = [
[[package]]
name = "syn"
version = "0.15.26"
version = "0.15.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
@ -219,7 +219,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum serde_repr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "27eea49bc616621e68d4de38110ff9e18ab8bd4c61dae48c477e85587571afc1"
"checksum snap 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "95d697d63d44ad8b78b8d235bf85b34022a78af292c8918527c5f0cffdde7f43"
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
"checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9"
"checksum syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)" = "525bd55255f03c816e5d7f615587bd13030c7103354fadb104993dcee6a788ec"
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"

View file

@ -109,6 +109,8 @@ pub enum ChatMessageKind {
ChatAllDead,
#[serde(rename = "TF_Chat_Team_Dead")]
ChatTeamDead,
#[serde(rename = "TF_Chat_AllSpec")]
ChatAllSpec,
NameChange,
}
@ -121,7 +123,8 @@ impl BitRead<LittleEndian> for ChatMessageKind {
"TF_Chat_Team_Dead" => ChatMessageKind::ChatTeamDead,
"#TF_Name_Change" => ChatMessageKind::NameChange,
"TF_Chat_All" => ChatMessageKind::ChatAll,
_ => unreachable!("unknown chat kind"),
"TF_Chat_AllSpec" => ChatMessageKind::ChatAllSpec,
_ => ChatMessageKind::ChatAll,
})
}
}