Пример #1
0
 def makeSign(topStr, signStr, textId):
     top = self.geom.find('**/' + topStr)
     sign = top.find('**/' + signStr)
     locator = top.find('**/sign_origin')
     signText = DirectGui.OnscreenText(text=TextEncoder.upper(TTLocalizer.GlobalStreetNames[textId][-1]), font=ToontownGlobals.getSuitFont(), scale=TTLocalizer.BCHQLsignText, fg=(0, 0, 0, 1), parent=sign)
     signText.setPosHpr(locator, 0, -0.1, -0.25, 0, 0, 0)
     signText.setDepthWrite(0)
Пример #2
0
    def allCaps(name):
        letters = justLetters(name)
        if len(letters) > 2:
            upperLetters = TextEncoder().decodeText(TextEncoder.upper(TextEncoder().encodeWtext(letters)))
            for i in xrange(len(upperLetters)):
                if not upperLetters[0].isupper():
                    return

            if upperLetters == letters:
                notify.info('name is all caps')
                return OTPLocalizer.NCAllCaps
Пример #3
0
    def allCaps(name):
        letters = justLetters(name)
        if len(letters) > 2:
            upperLetters = TextEncoder().decodeText(TextEncoder.upper(TextEncoder().encodeWtext(letters)))
            for i in xrange(len(upperLetters)):
                if not upperLetters[0].isupper():
                    return

            if upperLetters == letters:
                notify.info('name is all caps')
                return OTPLocalizer.NCAllCaps
Пример #4
0
 def match(npcName, name = name):
     name = TextEncoder().encodeWtext(name)
     name = string.strip(name)
     return TextEncoder.upper(npcName) == TextEncoder.upper(name)
Пример #5
0
 def match(npcName, name = name):
     name = TextEncoder().encodeWtext(name)
     name = name.strip()
     return TextEncoder.upper(npcName) == TextEncoder.upper(name)