mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 07:17:27 +00:00
impl(game): starbound support (#234)
This commit is contained in:
commit
d1eb6d7ca5
3 changed files with 18 additions and 2 deletions
|
|
@ -124,6 +124,11 @@ pub static GAMES: Map<&'static str, Game> = phf_map! {
|
|||
"soulmask" => game!("Soulmask", 27015, Protocol::Valve(Engine::new(2_646_460))),
|
||||
"serioussam" => game!("Serious Sam", 25601, Protocol::Gamespy(GameSpyVersion::One)),
|
||||
"squad" => game!("Squad", 27165, Protocol::Valve(Engine::new(393_380))),
|
||||
"starbound" => game!("Starbound", 21025, Protocol::Valve(Engine::new(211_820)), GatheringSettings {
|
||||
players: GatherToggle::Enforce,
|
||||
rules: GatherToggle::Enforce,
|
||||
check_app_id: false,
|
||||
}.into_extra()),
|
||||
"theforest" => game!("The Forest", 27016, Protocol::Valve(Engine::new_with_dedicated(242_760, 556_450))),
|
||||
"thefront" => game!("The Front", 27015, Protocol::Valve(Engine::new(2_285_150))),
|
||||
"teamfortress2" => game!("Team Fortress 2", 27015, Protocol::Valve(Engine::new(440))),
|
||||
|
|
|
|||
|
|
@ -154,6 +154,17 @@ game_query_mod!(sco, "Sven Co-op", Engine::new_gold_src(false), 27015);
|
|||
game_query_mod!(sdtd, "7 Days to Die", Engine::new(251_570), 26900);
|
||||
game_query_mod!(soulmask, "Soulmask", Engine::new(2_646_460), 27015);
|
||||
game_query_mod!(squad, "Squad", Engine::new(393_380), 27165);
|
||||
game_query_mod!(
|
||||
starbound,
|
||||
"Starbound",
|
||||
Engine::new(211_820),
|
||||
21025,
|
||||
GatheringSettings {
|
||||
players: GatherToggle::Enforce,
|
||||
rules: GatherToggle::Enforce,
|
||||
check_app_id: false,
|
||||
}
|
||||
);
|
||||
game_query_mod!(teamfortress2, "Team Fortress 2", Engine::new(440), 27015);
|
||||
game_query_mod!(
|
||||
tfc,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ pub enum Server {
|
|||
|
||||
impl Server {
|
||||
pub(crate) fn from_gldsrc(value: u8) -> GDResult<Self> {
|
||||
Ok(match value {
|
||||
Ok(match value.to_ascii_lowercase() {
|
||||
100 => Self::Dedicated, //'d'
|
||||
108 => Self::NonDedicated, //'l'
|
||||
112 => Self::TV, //'p'
|
||||
|
|
@ -39,7 +39,7 @@ pub enum Environment {
|
|||
|
||||
impl Environment {
|
||||
pub(crate) fn from_gldsrc(value: u8) -> GDResult<Self> {
|
||||
Ok(match value {
|
||||
Ok(match value.to_ascii_lowercase() {
|
||||
108 => Self::Linux, //'l'
|
||||
119 => Self::Windows, //'w'
|
||||
109 | 111 => Self::Mac, //'m' or 'o'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue