@@ -24,7 +24,7 @@ pub struct GameDef {
2424 pub uuid : String ,
2525 pub label : String ,
2626 pub meta : GameDefMeta ,
27- pub distributions : Vec < GameDefPlatform > ,
27+ pub distributions : Vec < GamePlatform > ,
2828 pub r2modman : Option < Vec < GameDefR2MM > > ,
2929 pub thunderstore : Option < GameDefThunderstore > ,
3030}
@@ -40,7 +40,7 @@ pub struct GameDefMeta {
4040#[ derive( Serialize , Deserialize , Debug , Clone , PartialEq , clap:: Subcommand ) ]
4141#[ serde( tag = "platform" ) ]
4242#[ serde( rename_all = "kebab-case" ) ]
43- pub enum GameDefPlatform {
43+ pub enum GamePlatform {
4444 EpicGamesStore {
4545 identifier : String ,
4646 } ,
@@ -60,29 +60,29 @@ pub enum GameDefPlatform {
6060 Other ,
6161}
6262
63- impl GameDefPlatform {
63+ impl GamePlatform {
6464 /// Hardcoding these for now until we integrate this sorta thing into
6565 /// the ecosystem schema, preferably as a compile time check.
6666 pub fn ident_from_name < ' a > ( & ' a self , name : & str ) -> Option < & ' a str > {
6767 match ( name, self ) {
68- ( "epic-games-store" , GameDefPlatform :: EpicGamesStore { identifier } ) => Some ( identifier) ,
69- ( "gamepass" , GameDefPlatform :: XboxGamePass { identifier } ) => Some ( identifier) ,
70- ( "origin" | "ea" , GameDefPlatform :: Origin { identifier } ) => Some ( identifier) ,
71- ( "steam" , GameDefPlatform :: Steam { identifier } ) => Some ( identifier) ,
72- ( "steam-direct" , GameDefPlatform :: SteamDirect { identifier } ) => Some ( identifier) ,
68+ ( "epic-games-store" , GamePlatform :: EpicGamesStore { identifier } ) => Some ( identifier) ,
69+ ( "gamepass" , GamePlatform :: XboxGamePass { identifier } ) => Some ( identifier) ,
70+ ( "origin" | "ea" , GamePlatform :: Origin { identifier } ) => Some ( identifier) ,
71+ ( "steam" , GamePlatform :: Steam { identifier } ) => Some ( identifier) ,
72+ ( "steam-direct" , GamePlatform :: SteamDirect { identifier } ) => Some ( identifier) ,
7373 _ => None ,
7474 }
7575 }
7676
7777 pub fn get_platform_name ( & self ) -> & ' static str {
7878 match self {
79- GameDefPlatform :: EpicGamesStore { identifier : _ } => "epic-games-store" ,
80- GameDefPlatform :: XboxGamePass { identifier : _ } => "gamepass" ,
81- GameDefPlatform :: Origin { identifier : _ } => "origin" ,
82- GameDefPlatform :: Steam { identifier : _ } => "steam" ,
83- GameDefPlatform :: SteamDirect { identifier : _ } => "steam-direct" ,
84- GameDefPlatform :: OculusStore => "oculus-store" ,
85- GameDefPlatform :: Other => "other" ,
79+ GamePlatform :: EpicGamesStore { identifier : _ } => "epic-games-store" ,
80+ GamePlatform :: XboxGamePass { identifier : _ } => "gamepass" ,
81+ GamePlatform :: Origin { identifier : _ } => "origin" ,
82+ GamePlatform :: Steam { identifier : _ } => "steam" ,
83+ GamePlatform :: SteamDirect { identifier : _ } => "steam-direct" ,
84+ GamePlatform :: OculusStore => "oculus-store" ,
85+ GamePlatform :: Other => "other" ,
8686 }
8787 }
8888
@@ -121,7 +121,7 @@ pub struct GameDefR2MM {
121121 pub meta : GameDefMeta ,
122122 pub internal_folder_name : String ,
123123 pub data_folder_name : String ,
124- pub distributions : Vec < GameDefPlatform > ,
124+ pub distributions : Vec < GamePlatform > ,
125125 pub settings_identifier : String ,
126126 pub package_index : String ,
127127 pub steam_folder_name : String ,
0 commit comments