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

.pt Smugling RP option is broken #149

Open
alpturedi opened this issue Apr 7, 2020 · 1 comment
Open

.pt Smugling RP option is broken #149

alpturedi opened this issue Apr 7, 2020 · 1 comment

Comments

@alpturedi
Copy link

I dunno if they changed it but there is a problem in Portuguese version recognizing if RP is earnable.

AGORA key word can be added to .match part at line 3823 and 3828. That's how I am using it.

/*
* Don't fill in if we can't earn RP and AF would want to buy
* Omerta sometimes won't display "NOW" when rp can be earned for b/n actions.
* it just displays "The next time you can earn rank points from buying [booze|narcs] is"
* we'll handle that case too.
*/
if (!lbooze) {
if (!$('.smuggling-table-info:eq(0)').text().match(/NOW|AGORA|NU|booze is(\s+)$|kopen over(\s+)$/m) && $('input[name="typebooze"]:eq(1)').prop('checked') === true) {
b = -1;
}
}
if (!lnarcs) {
if (!$('.smuggling-table-info:eq(' + (lbooze ? 0 : 1) + ')').text().match(/NOW|AGORA|NU|narcotics is(\s+)$|kopen over(\s+)$/m) && $('input[name="typedrugs"]:eq(1)').prop('checked') === true) {
n = -1;
}
}

@alpturedi
Copy link
Author

alpturedi commented Apr 7, 2020

I have a better solution, checking data-time-end attribute in the table.

... $('.smuggling-table-info:eq(0)').children("span:eq(0)").attr("data-time-end") && ...

and

... $('.smuggling-table-info:eq(' + (lbooze ? 0 : 1) + ')').children("span:eq(0)").attr("data-time-end") && ...

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

No branches or pull requests

1 participant