🐛
This commit is contained in:
@ -24,20 +24,20 @@ class SwChar():
|
||||
keys = list(cmd)
|
||||
values = list(cmd.values())
|
||||
result = ""
|
||||
if type(values[0]) is dict:
|
||||
if isinstance(values[0],dict):
|
||||
return ", ".join(values)
|
||||
else:
|
||||
for x in range(len(keys)):
|
||||
if type(keys[x]) is list:
|
||||
for x, key in enumerate(keys):
|
||||
if type(key) is list:
|
||||
if x%3 != 2:
|
||||
result += "**" + keys[x] + "**" + ": " + ", ".join(values[x]) + " "
|
||||
result += "**" + key + "**" + ": " + ", ".join(values[x]) + " "
|
||||
else:
|
||||
result += "**" + keys[x] + "**" + ": " + ", ".join(values[x]) + "\n"
|
||||
result += "**" + key + "**" + ": " + ", ".join(values[x]) + "\n"
|
||||
else:
|
||||
if x%3 != 2:
|
||||
result += "**" + keys[x] + "**" + ": " + str(values[x]) + " "
|
||||
result += "**" + key + "**" + ": " + str(values[x]) + " "
|
||||
else:
|
||||
result += "**" + keys[x] + "**" + ": " + str(values[x]) + "\n"
|
||||
result += "**" + key + "**" + ": " + str(values[x]) + "\n"
|
||||
logThis("Returning a dictionary, but well formatted")
|
||||
return result
|
||||
else:
|
||||
@ -458,8 +458,8 @@ class SwChar():
|
||||
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"]
|
||||
|
||||
for x in range(len(withoutSpaces)):
|
||||
cmd = cmd.replace(withSpaces[x],withoutSpaces[x])
|
||||
for x, value in enumerate(withoutSpaces):
|
||||
cmd = cmd.replace(withSpaces[x],value)
|
||||
|
||||
return cmd
|
||||
|
||||
@ -467,8 +467,8 @@ class SwChar():
|
||||
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"]
|
||||
|
||||
for x in range(len(withoutSpaces)):
|
||||
cmd = cmd.replace(withoutSpaces[x],withSpaces[x])
|
||||
for x, value in enumerate(withoutSpaces):
|
||||
cmd = cmd.replace(value,withSpaces[x])
|
||||
|
||||
return cmd
|
||||
|
||||
|
Reference in New Issue
Block a user