Documentation
¶
Overview ¶
Package rating defines the game ratings the desktop shows: age ratings from rating boards and critic ratings from publications.
The age rating systems are ESRB for USA, ELSPA for Europe and Sega's own rating for Japan. Each system belongs to one supported region and has a display text for each of its rating codes. Any other system or code is not shown.
The critic rating sources are shown as each prints its scores: GamePro's categories, the average of EGM's four reviewers, the total of Famitsu's four reviewers, and the single score of the others. Any other source is not shown.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Age ¶
Age returns a game's age ratings, comma separated, such as "ESRB: K-A, ELSPA: 15+", in the order of the game's metadata regions: each rating is listed at the first region its system belongs to, and once. Only systems of supported regions the game has are listed, and a rating with an unknown system or code is left out. Returns "" when none is left.
Types ¶
type CriticRow ¶
CriticRow is one shown critic rating: its source and its score text
func Critic ¶
func Critic(ratings []content.CriticRating, regions []string) []CriticRow
Critic returns a game's critic ratings, one per source, grouped by supported region in the order of the game's metadata regions and in a fixed source order within a region, such as Famitsu "31 / 40" then SSM JP Readers "8.6614 / 10". A rating with an unknown source, a region the game does not have, or scores not shaped as its source prints is left out.