Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GameID support for mods and shortcuts #602

Merged
merged 2 commits into from
Oct 25, 2018
Merged

Conversation

psychonic
Copy link
Member

Add support for initializing GameIDs for mods and shortcuts.

@codecov-io
Copy link

codecov-io commented Oct 25, 2018

Codecov Report

Merging #602 into master will increase coverage by 0.66%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #602      +/-   ##
=========================================
+ Coverage   22.43%   23.1%   +0.66%     
=========================================
  Files          85      85              
  Lines        8655    8673      +18     
  Branches      717     719       +2     
=========================================
+ Hits         1942    2004      +62     
+ Misses       6588    6537      -51     
- Partials      125     132       +7
Impacted Files Coverage Δ
SteamKit2/SteamKit2/Types/GameID.cs 44.76% <88.88%> (+33.26%) ⬆️
SteamKit2/SteamKit2/Steam/WebAPI/WebAPI.cs 36.27% <0%> (-0.5%) ⬇️
SteamKit2/SteamKit2/Types/SteamID.cs 79.42% <0%> (-0.37%) ⬇️
SteamKit2/SteamKit2/Util/Crc32.cs 41.53% <0%> (+41.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a79a75...4c4a538. Read the comment docs.

{
AppID = nAppID;
AppType = GameType.GameMod;
ModID = BitConverter.ToUInt32(CryptoHelper.CRCHash(System.Text.Encoding.ASCII.GetBytes(modPath)), 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BitConverter.ToUInt32(CryptoHelper.CRCHash

So we calculate an int, convert it to bytes, and then convert it back to an int?

@psychonic
Copy link
Member Author

Thanks. I've switched to Crc32 now. I forgot that was even there.

I also changed to UTF8 encoding.

@yaakov-h yaakov-h merged commit 8ea1d6a into master Oct 25, 2018
@psychonic psychonic deleted the gameid-modshortcut branch January 18, 2020 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants