mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[cli/core] Optionally show link to wiki article on game install
This is supposed to make setup easier for games with know issues. Perhaps in the future this can also be shown on launch.
This commit is contained in:
parent
ed1cbfc87e
commit
8d28945e8b
|
@ -1002,6 +1002,9 @@ class LegendaryCLI:
|
|||
logger.info('This game supports cloud saves, syncing is handled by the "sync-saves" command.')
|
||||
logger.info(f'To download saves for this game run "legendary sync-saves {args.app_name}"')
|
||||
|
||||
if tip_url := self.core.get_game_tip(igame.app_name):
|
||||
logger.info(f'This game may require additional setup, see: {tip_url}')
|
||||
|
||||
old_igame = self.core.get_installed_game(game.app_name)
|
||||
if old_igame and args.repair_mode and os.path.exists(repair_file):
|
||||
if old_igame.needs_verification:
|
||||
|
|
|
@ -297,6 +297,9 @@ class LegendaryCore:
|
|||
def get_update_info(self):
|
||||
return self.lgd.get_cached_version()['data'].get('release_info')
|
||||
|
||||
def get_game_tip(self, app_name):
|
||||
return self.lgd.get_cached_version()['data'].get('game_wiki', {}).get(app_name, {}).get(sys_platform)
|
||||
|
||||
def get_sdl_data(self, app_name, platform='Windows'):
|
||||
if platform not in ('Win32', 'Windows'):
|
||||
app_name = f'{app_name}_{platform}'
|
||||
|
|
Loading…
Reference in a new issue