Fixed a thing!

This commit is contained in:
NikolajDanger
2020-04-03 16:04:36 +02:00
parent 0ec9470c18
commit c0795671ce
2 changed files with 2 additions and 2 deletions

View File

@ -465,7 +465,7 @@ def charData(user : str,cmd : str):
return "You don't have a character. You can make one with !swchar" return "You don't have a character. You can make one with !swchar"
def replaceSpaces(cmd : str): def replaceSpaces(cmd : str):
withSpaces = ["Specialization Trees","Wound Threshold","Strain Threshold","Defense - Ranged","Defense - Melee","Force Rating","Core Worlds","Outer Rim","Piloting - Planetary","Piloting - Space","Ranged - Heavy","Ranged - light","Lightsaber Characteristic","Critical Injuries","Force Powers"] withSpaces = ["Specialization Trees","Wound Threshold","Strain Threshold","Defense - Ranged","Defense - Melee","Force Rating","Core Worlds","Outer Rim","Piloting - Planetary","Piloting - Space","Ranged - Heavy","Ranged - Light","Lightsaber Characteristic","Critical Injuries","Force Powers"]
withoutSpaces = ["Specialization-trees","Wound-threshold","Strain-threshold","Defense-ranged","Defense-melee","Force-rating","Core-worlds","Outer-rim","Piloting-planetary","Piloting-space","Ranged-heavy","Ranged-light","Lightsaber-characteristic","Critical-injuries","Force-powers"] withoutSpaces = ["Specialization-trees","Wound-threshold","Strain-threshold","Defense-ranged","Defense-melee","Force-rating","Core-worlds","Outer-rim","Piloting-planetary","Piloting-space","Ranged-heavy","Ranged-light","Lightsaber-characteristic","Critical-injuries","Force-powers"]
for x in range(len(withoutSpaces)): for x in range(len(withoutSpaces)):

View File

@ -236,7 +236,7 @@ def parseRoll(user : str,cmd : str = ""):
cmd = re.sub(' +',' ',cmd.upper()) + " " cmd = re.sub(' +',' ',cmd.upper()) + " "
if cmd[0] == " ": if cmd[0] == " ":
cmd = cmd[1:] cmd = cmd[1:]
cmd = swchar.replaceSpaces(cmd.capitalize()) cmd = swchar.replaceSpaces(string.capwords(cmd))
commands = cmd.split(" ") commands = cmd.split(" ")
if commands[0] == "": if commands[0] == "":
rollParameters = [1,0,3,0,0,0,0] rollParameters = [1,0,3,0,0,0,0]