struct Srcom::SimpleGame
- Srcom::SimpleGame
- Struct
- Value
- Object
Overview
Has shorthand methods to getting the resources that the Links in #links point to.
Also has shorthand methods to get all the full resources for things that didn't get embedded.
NOTE Not covering the romhacks link, since it is deprecated and synonymous with derived-games.
Included Modules
- JSON::Serializable
Defined in:
srcr/mappings/game/simple_game.crConstructors
Instance Method Summary
- #abbreviation : String
- #abbreviation=(abbreviation : String)
- #assets : Game::Assets
- #assets=(assets : Game::Assets)
- #base_game : Game?
-
#categories(miscellaneous : Bool? = nil) : Array(Category)
Gets all the
Categorys this game can be played in. -
#created : Time?
ID => "moderator" | "super-moderator"
-
#created=(created : Time?)
ID => "moderator" | "super-moderator"
- #derived_games(page_size : Int32 = 200) : Srcom::Api::PageIterator(Game)
- #developers : Array(String)
- #developers=(developers : Array(String))
- #engines : Array(String)
- #engines=(engines : Array(String))
-
#full_developers : Array(Developer)
Gets the full
Developers that developed this game. -
#full_engines : Array(Engine)
Gets the full
Engines this game runs on. -
#full_game : Game
Gets this
SimpleGameas a fullGamewith everything embedded. -
#full_gametypes : Array(Game::Gametype)
Gets the full
Gametypes applicable to this game. -
#full_genres : Array(Genre)
Gets the full
Genres this game belongs to. -
#full_moderators : Array(User)
Gets the full
Users that moderate this game. -
#full_platforms : Array(Platform)
Gets the full
Platforms this game runs on. -
#full_publishers : Array(Publisher)
Gets the full
Publishers that published this game. -
#full_regions : Array(Region)
Gets the full
Regions this game is available in. - #gametypes : Array(String)
- #gametypes=(gametypes : Array(String))
- #genres : Array(String)
- #genres=(genres : Array(String))
- #id : String
- #id=(id : String)
-
#leaderboard : Leaderboard
Returns the
Leaderboardfor theCategorythat is first shown when thisGameis visited on speedrun.com. -
#levels : Array(Level)
Gets all the
Levels belonging to this game. - #links : Array(Link)
- #links=(links : Array(Link))
- #moderators : Hash(String, String)
- #moderators=(moderators : Hash(String, String))
-
#name
Shorthand for
Name#international. - #names : Game::Name
- #names=(names : Game::Name)
- #platforms : Array(String)
- #platforms=(platforms : Array(String))
- #publishers : Array(String)
- #publishers=(publishers : Array(String))
-
#records(top : Int32 = 3, scope : String = "all", miscellaneous : Bool = true, skip_empty : Bool = false, page_size : Int32 = 200) : Srcom::Api::PageIterator(Leaderboard)
Gets every
Leaderboardwith the top N runs for thisGame, skipping over emptyLeaderboards if skip_empty istrue. - #regions : Array(String)
- #regions=(regions : Array(String))
- #release_date : String
- #release_date=(release_date : String)
- #released : Int32
- #released=(released : Int32)
- #romhack : Bool
- #romhack=(romhack : Bool)
- #ruleset : Game::Ruleset
- #ruleset=(ruleset : Game::Ruleset)
- #runs(page_size : Int32 = 200) : Srcom::Api::PageIterator(Run)
- #series : Array(Series)
-
#variables : Array(Variable)
Gets all the
Variables applicable to this game. - #weblink : String
- #weblink=(weblink : String)
Constructor Detail
Instance Method Detail
Gets all the Categorys this game can be played in.
Gets the full Developers that developed this game.
Gets the full Publishers that published this game.
Returns the Leaderboard for the Category that is first shown when this Game is visited
on speedrun.com.
Shorthand for Name#international.
NOTE This method is present on all things that have the international + japanese name structure.
Gets every Leaderboard with the top N runs for this Game, skipping over empty
Leaderboards if skip_empty is true.
If miscellaneous is set to false, only Leaderboards for non-miscellaneous categories will
be returned. If it is set to true Leaderboards for both miscellaneous and non-miscellaneous
categories will be returned.
NOTE This can result in more than N runs per Leaderboard, as ties can occur.
Gets all Runs completed in this Game.
Defaults to getting all of them since there shouldn't be an absurd amount of `Run´s in
a single Game.