Alternate game command lines and Steam refactor #4010
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
If you're a Steam user, you can add extra game instances to Steam using this menu item:
Motivations
KSP_x64.exe
orKSP2_x64.exe
doesn't launch it through Steam. To count play time in Steam, you have to launch the game with Steam, which can be done either by clicking in Steam or with asteam://rungameid/
URL.Changes
SteamLibrary
class that uses the newly referencedValveKeyValue
MIT-licensed library to retrieve Steam's full list of games from its data filesconfig/libraryfolders.vdf
instead ofconfig/config.vdf
because @Olympic1's additional folder was listed in the former but not the latterSteamApps/common/Kerbal Space Program
existing but being empty, which would have caused problems under the old logic but would correctly be ignored nowIGame.DefaultCommandLine
is replaced byIGame.DefaultCommandLines
, which uses theSteamLibrary
class to find the URL for each game when available in addition to the direct EXE file optionSide fixes:
ckan update
won't spam "Loading modules from downloaded default repository..." anymoreFixes #2706.
Fixes #4003 (in that it explicitly tells the user whether Steam will count play time and makes the
steam://
URL option discoverable).