示例#1
0
文件: modify.py 项目: Alphax/pyffi
 def toastentry(cls, toaster):
     arg = toaster.options["arg"]
     if not arg:
         # missing arg
         toaster.logger.warn(
             "must specify regular expression and substitution as argument "
             "(e.g. -a /Bip01/Bip02) to apply spell")
         return False
     dummy, toaster.regex, toaster.sub = arg.split(arg[0])
     toaster.sub = _as_bytes(toaster.sub)
     toaster.regex = re.compile(_as_bytes(toaster.regex))
     return True    
示例#2
0
 def toastentry(cls, toaster):
     arg = toaster.options["arg"]
     if not arg:
         # missing arg
         toaster.logger.warn(
             "must specify regular expression and substitution as argument "
             "(e.g. -a /Bip01/Bip02) to apply spell")
         return False
     dummy, toaster.regex, toaster.sub = arg.split(arg[0])
     toaster.sub = _as_bytes(toaster.sub)
     toaster.regex = re.compile(_as_bytes(toaster.regex))
     return True
示例#3
0
文件: modify.py 项目: Alphax/pyffi
 def substitute(self, old_path):
     if (_as_bytes('\\lowres\\') not in old_path.lower()):
         return SpellSubstituteTexturePath.substitute(self, old_path)
     else:
         return old_path
示例#4
0
文件: modify.py 项目: Alphax/pyffi
 def toastentry(cls, toaster):
     toaster.sub = _as_bytes("textures\\\\lowres\\\\")
     toaster.regex = re.compile(_as_bytes("^textures\\\\"), re.IGNORECASE)
     return True
示例#5
0
 def substitute(self, old_path):
     if (_as_bytes('\\lowres\\') not in old_path.lower()):
         return SpellSubstituteTexturePath.substitute(self, old_path)
     else:
         return old_path
示例#6
0
 def toastentry(cls, toaster):
     toaster.sub = _as_bytes("textures\\\\lowres\\\\")
     toaster.regex = re.compile(_as_bytes("^textures\\\\"), re.IGNORECASE)
     return True