-
Notifications
You must be signed in to change notification settings - Fork 740
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
Common - Check extensions hash #10144
base: master
Are you sure you want to change the base?
Conversation
Add to existing |
we're dropping that in rust pr #9015, this should be compatible before/after that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hashes returned in game are capitalised, whereas the ones the tool returns are lowercase. I don't think it will pose issues though, given the case-insensitive comparison, so LGTM.
|
Co-authored-by: johnb432 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
|
||
// Check for correct hash | ||
if (GVAR(checkExtensions)) then { | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling allExtensions
is expensive, might as well cache the result.
{ | |
private _allExtensions = allExtensions; | |
{ |
if ((_x getOrDefault ["name", ""]) == _extName) exitWith { | ||
_extensionHash = _x getOrDefault ["hash", ""]; | ||
}; | ||
} forEach allExtensions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} forEach allExtensions; | |
} forEach _allExtensions; |
Verifies extensions hash