1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
use specs::DenseVecStorage; impl_try_from_enum! { /// Game Type. /// /// Hopefully self explanatory, used to indicate to /// the client which game is being played. The client /// uses this to decide on player colouring and /// whether or not to show the flags in-game. /// It will also correspond with the type of detailed /// score ([`ScoreDetailedFFA`][0], [`ScoreDetailedCTF`][1], /// or [`ScoreDetailedBTR`][2]) that the client expects /// to receive. /// /// Used in: /// - TODO /// /// [0]: server/struct.ScoreDetailedFFA.html /// [1]: server/struct.ScoreDetailedCTF.html /// [2]: server/struct.ScoreDetailedBTR.html #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] #[cfg_attr(feature = "specs", derive(Component))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum GameType { FFA = 1, CTF = 2, BTR = 3, } }