mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 07:17:27 +00:00
Fix some game ids and clarify rules 6 and 7. (#143)
* Fix wrongly named game ids of l4d, l4d2 and q3a * Specify how edition/protocol names are appended to games, rule 7 * Clarify rule 6 regarding numbers * Add/Update badge * Fix rule 7 misswording * Fix 7 Days to Die * List id changes in the changelog * Forgot to fix test * Apply Douile suggestion regarding rule 6 Co-authored-by: Tom <25043847+Douile@users.noreply.github.com> * Fix typo on rule 6 and wrap text * Clarify further rule 7 --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Tom <25043847+Douile@users.noreply.github.com>
This commit is contained in:
parent
2cc9e56168
commit
e3dd7cd1c7
7 changed files with 36 additions and 25 deletions
8
.github/badges/node.svg
vendored
8
.github/badges/node.svg
vendored
|
|
@ -1,5 +1,5 @@
|
|||
<svg width="163.6" height="20" viewBox="0 0 1636 200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Node game coverage: 12%">
|
||||
<title>Node game coverage: 12%</title>
|
||||
<svg width="163.6" height="20" viewBox="0 0 1636 200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Node game coverage: 11%">
|
||||
<title>Node game coverage: 11%</title>
|
||||
<linearGradient id="a" x2="0" y2="100%">
|
||||
<stop offset="0" stop-opacity=".1" stop-color="#EEE"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
|
|
@ -13,8 +13,8 @@
|
|||
<g aria-hidden="true" fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="110">
|
||||
<text x="60" y="148" textLength="1176" fill="#000" opacity="0.25">Node game coverage</text>
|
||||
<text x="50" y="138" textLength="1176">Node game coverage</text>
|
||||
<text x="1331" y="148" textLength="260" fill="#000" opacity="0.25">12%</text>
|
||||
<text x="1321" y="138" textLength="260">12%</text>
|
||||
<text x="1331" y="148" textLength="260" fill="#000" opacity="0.25">11%</text>
|
||||
<text x="1321" y="138" textLength="260">11%</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
|
|
@ -6,6 +6,12 @@ Who knows what the future holds...
|
|||
- Added [Valheim](https://store.steampowered.com/app/892970/Valheim/) support.
|
||||
|
||||
### Breaking:
|
||||
Game:
|
||||
- Changed identifications of the following games as they weren't properly expecting the naming rules:
|
||||
- - Left 4 Dead: `left4dead` -> `l4d`.
|
||||
- - 7 Days to Die: `7d2d` in definitions and `sd2d` in game declaration -> `sdtd`.
|
||||
- - Quake 3 Arena: `quake3arena` -> `q3a`.
|
||||
|
||||
Protocols:
|
||||
- Valve: Removed `SteamApp` due to it not being really useful at all, replaced all instances with `Engine`.
|
||||
|
||||
|
|
|
|||
|
|
@ -52,18 +52,23 @@ and 2017 would be `swb22017`).
|
|||
(`Day of Defeat` -> `dod`), then the new name should ignore rule #2
|
||||
(`Day of Dragons` -> `dayofdragons`).
|
||||
5. Roman numbering will be converted to arabic numbering (`XIV` -> `14`).
|
||||
6. Unless numbers are at the end of a name, they will be considered words,
|
||||
but digits will always be used instead of the acronym (counter to #2) (`Left 4
|
||||
Dead` -> `l4d`) unless they at the start position (`7 Days to Die` -> `sdtd`),
|
||||
if they are at the end (such as sequel number or the year), always append them
|
||||
(`Team Fortress 2` -> `teamfortress2`, `Unreal Tournament 2003` ->
|
||||
`unrealtournament2003`).
|
||||
7. If a game supports multiple protocols, multiple entries will be done for
|
||||
said game where the edition/protocol name (first disposable in this order) will
|
||||
be appended to the game name (Minecraft is divided by 2 editions, Java and Bedrock
|
||||
which will be `minecraftjava` and `minecraftbedrock` respectively) and one more
|
||||
entry can be added by the base name of the game which queries in a group said
|
||||
supported protocols to make generic queries easier and disposable.
|
||||
6. Unless numbers (years included) are at the end of a name, they will be considered
|
||||
words. If a number is not in the first position, its entire numeric digits will be
|
||||
used instead of the acronym of that number's digits (`Left 4 Dead` -> `l4d`). If the
|
||||
number is in the first position the longhand (words: 5 -> five) representation of the
|
||||
number will be used to create an acronym (`7 Days to Die` -> `sdtd`). Other examples:
|
||||
`Team Fortress 2` -> `teamfortress2`, `Unreal Tournament 2003` ->
|
||||
`unrealtournament2003`.
|
||||
7. If a game supports multiple protocols, multiple entries will be done for said game
|
||||
where the edition/protocol name (first disposable in this order) will be appended to
|
||||
the base game id's: `<game_id><protocol_id>` (where the protocol id will follow all
|
||||
rules except #2) (Minecraft is mainly divided by 2 editions, Java and Bedrock
|
||||
which will be `minecraftjava` and `minecraftbedrock` respectively, but it also has
|
||||
legacy versions, which use another protocol, an example would be the one for `1.6`,
|
||||
so the name would be `Legacy 1.6` which its id will be `legacy16`, resulting in the
|
||||
entry of `minecraftlegacy16`). One more entry can be added by the base name of the
|
||||
game, which queries in a group said supported protocols to make generic queries
|
||||
easier and disposable.
|
||||
8. If its actually about a mod that adds the ability for queries to be performed,
|
||||
process only the mod name.
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ mod test {
|
|||
fn teamfortress2() { test_game("teamfortress2"); }
|
||||
|
||||
#[test]
|
||||
fn quake() { test_game("quake3"); }
|
||||
fn quake2() { test_game("quake2"); }
|
||||
|
||||
#[test]
|
||||
fn all_games() {
|
||||
|
|
|
|||
|
|
@ -77,18 +77,18 @@ pub static GAMES: Map<&'static str, Game> = phf_map! {
|
|||
"insurgency" => game!("Insurgency", 27015, Protocol::Valve(Engine::new(222_880))),
|
||||
"imic" => game!("Insurgency: Modern Infantry Combat", 27015, Protocol::Valve(Engine::new(17700))),
|
||||
"insurgencysandstorm" => game!("Insurgency: Sandstorm", 27131, Protocol::Valve(Engine::new(581_320))),
|
||||
"left4dead" => game!("Left 4 Dead", 27015, Protocol::Valve(Engine::new(500))),
|
||||
"left4dead2" => game!("Left 4 Dead 2", 27015, Protocol::Valve(Engine::new(550))),
|
||||
"l4d" => game!("Left 4 Dead", 27015, Protocol::Valve(Engine::new(500))),
|
||||
"l4d2" => game!("Left 4 Dead 2", 27015, Protocol::Valve(Engine::new(550))),
|
||||
"ohd" => game!("Operation: Harsh Doorstop", 27005, Protocol::Valve(Engine::new_with_dedicated(736_590, 950_900))),
|
||||
"onset" => game!("Onset", 7776, Protocol::Valve(Engine::new(1_105_810))),
|
||||
"projectzomboid" => game!("Project Zomboid", 16261, Protocol::Valve(Engine::new(108_600))),
|
||||
"quake1" => game!("Quake 1", 27500, Protocol::Quake(QuakeVersion::One)),
|
||||
"quake2" => game!("Quake 2", 27910, Protocol::Quake(QuakeVersion::Two)),
|
||||
"quake3" => game!("Quake 3: Arena", 27960, Protocol::Quake(QuakeVersion::Three)),
|
||||
"q3a" => game!("Quake 3 Arena", 27960, Protocol::Quake(QuakeVersion::Three)),
|
||||
"ror2" => game!("Risk of Rain 2", 27016, Protocol::Valve(Engine::new(632_360))),
|
||||
"rust" => game!("Rust", 27015, Protocol::Valve(Engine::new(252_490))),
|
||||
"sco" => game!("Sven Co-op", 27015, Protocol::Valve(Engine::new_gold_src(false))),
|
||||
"7d2d" => game!("7 Days To Die", 26900, Protocol::Valve(Engine::new(251_570))),
|
||||
"sdtd" => game!("7 Days to Die", 26900, Protocol::Valve(Engine::new(251_570))),
|
||||
"sof2" => game!("Soldier of Fortune 2", 20100, Protocol::Quake(QuakeVersion::Three)),
|
||||
"serioussam" => game!("Serious Sam", 25601, Protocol::Gamespy(GameSpyVersion::One)),
|
||||
"theforest" => game!("The Forest", 27016, Protocol::Valve(Engine::new(556_450))),
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ use crate::protocols::quake::game_query_mod;
|
|||
|
||||
game_query_mod!(quake1, "Quake 1", one, 27500);
|
||||
game_query_mod!(quake2, "Quake 2", two, 27910);
|
||||
game_query_mod!(quake3, "Quake 3: Arena", three, 27960);
|
||||
game_query_mod!(q3a, "Quake 3 Arena", three, 27960);
|
||||
game_query_mod!(sof2, "Soldier of Fortune 2", three, 20100);
|
||||
game_query_mod!(warsow, "Warsow", three, 44400);
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ game_query_mod!(
|
|||
Engine::new(581_320),
|
||||
27131
|
||||
);
|
||||
game_query_mod!(left4dead, "Left 4 Dead", Engine::new(500), 27015);
|
||||
game_query_mod!(left4dead2, "Left 4 Dead 2", Engine::new(550), 27015);
|
||||
game_query_mod!(l4d, "Left 4 Dead", Engine::new(500), 27015);
|
||||
game_query_mod!(l4d2, "Left 4 Dead 2", Engine::new(550), 27015);
|
||||
game_query_mod!(
|
||||
ohd,
|
||||
"Operation: Harsh Doorstop",
|
||||
|
|
@ -98,7 +98,7 @@ game_query_mod!(
|
|||
game_query_mod!(ror2, "Risk of Rain 2", Engine::new(632_360), 27016);
|
||||
game_query_mod!(rust, "Rust", Engine::new(252_490), 27015);
|
||||
game_query_mod!(sco, "Sven Co-op", Engine::new_gold_src(false), 27015);
|
||||
game_query_mod!(sd2d, "7 Days To Die", Engine::new(251_570), 26900);
|
||||
game_query_mod!(sdtd, "7 Days to Die", Engine::new(251_570), 26900);
|
||||
game_query_mod!(teamfortress2, "Team Fortress 2", Engine::new(440), 27015);
|
||||
game_query_mod!(
|
||||
tfc,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue