Specified MIT license and made the valve protocol check if the queried game is the right game

This commit is contained in:
CosminPerRam 2022-10-18 18:20:37 +03:00
parent 1cb00f826a
commit 192d50a11d
4 changed files with 34 additions and 18 deletions

View file

@ -7,7 +7,9 @@ pub enum GDError {
PacketUnderflow(String),
PacketBad(String),
PacketSend(String),
PacketReceive(String)
PacketReceive(String),
UnknownEnumCast,
BadGame(String)
}
impl fmt::Display for GDError {
@ -17,7 +19,9 @@ impl fmt::Display for GDError {
GDError::PacketUnderflow(details) => write!(f, "Packet underflow: {details}"),
GDError::PacketBad(details) => write!(f, "Packet bad: {details}"),
GDError::PacketSend(details) => write!(f, "Couldn't send a packet: {details}"),
GDError::PacketReceive(details) => write!(f, "Couldn't receive a packet: {details}")
GDError::PacketReceive(details) => write!(f, "Couldn't receive a packet: {details}"),
GDError::UnknownEnumCast => write!(f, "Unknown enum cast encountered."),
GDError::BadGame(details) => write!(f, "Queried another game that the supposed one: {details}"),
}
}
}