We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When answers have three or fewer digits (e.g. years)...
Instead of:
**** 1*** 19** 1956
Reveal hints like:
**** *9** *95* 1956
def getHintString(self, hintNum=None): if hintNum == None: hintNum = self.hintsCounter hintRatio = self.registryValue('hints.hintRatio') # % to show each hint hint = '' ratio = float(hintRatio * .01) charMask = self.registryValue('hints.charMask', self.channel) # create a string with hints for all of the answers if self.questionType == 'kaos': for ans in self.answers: if ircutils.toLower(ans) not in self.guessedAnswers: ans = str(ans) hintStr = '' if hintNum == 0: for char in ans: if char in self.unmaskedChars: hintStr += char else: hintStr += charMask elif hintNum == 1: divider = int(len(ans) * ratio) divider = min(divider, 3) divider = min(divider, len(ans)-1) hintStr += ans[:divider] masked = ans[divider:] for char in masked: if char in self.unmaskedChars: hintStr += char else: hintStr += charMask elif hintNum == 2: divider = int(len(ans) * ratio) divider = min(divider, 3) divider = min(divider, len(ans)-1) lettersInARow = divider-1 maskedInARow = 0 hintStr += ans[:divider] ansend = ans[divider:] hintsend = '' unmasked = 0 if self.registryValue('hints.vowelsHint', self.channel): hintStr += self.getMaskedVowels(ansend, divider-1) else: hintStr += self.getMaskedRandom(ansend, divider-1) hint += ' [{0}]'.format(hintStr) else: ans = str(self.answers[0]) if hintNum == 0: for char in ans: if char in self.unmaskedChars: hint += char else: hint += charMask elif hintNum == 1: divider = int(len(ans) * ratio) divider = min(divider, 3) divider = min(divider, len(ans)-1) hint += ans[:divider] masked = ans[divider:] for char in masked: if char in self.unmaskedChars: hint += char else: hint += charMask elif hintNum == 2: divider = int(len(ans) * ratio) divider = min(divider, 3) divider = min(divider, len(ans)-1) lettersInARow = divider-1 maskedInARow = 0 hint += ans[:divider] ansend = ans[divider:] hintsend = '' unmasked = 0 if self.registryValue('hints.vowelsHint', self.channel): hint += self.getMaskedVowels(ansend, divider-1) else: hint += self.getMaskedRandom(ansend, divider-1) return hint.strip()
Blarg
getHintString
The text was updated successfully, but these errors were encountered:
Relevant code at https://github.com/loljoho/TriviaTime/blob/master/plugin.py#L302
Sorry, something went wrong.
Updated with relevant code
No branches or pull requests
When answers have three or fewer digits (e.g. years)...
Instead of:
Reveal hints like:
RELEVANT CODE
Blarg
getHintString
at line 256The text was updated successfully, but these errors were encountered: