Quick thing
This commit is contained in:
@ -159,6 +159,7 @@ def characterSheet(character : dict):
|
|||||||
text5 = ""
|
text5 = ""
|
||||||
text6 = ""
|
text6 = ""
|
||||||
text7 = ""
|
text7 = ""
|
||||||
|
text8 = ""
|
||||||
|
|
||||||
if bool(character["Talents"]):
|
if bool(character["Talents"]):
|
||||||
text5 = "**Talents**: "+",".join(list(character["Talents"]))+"\n\n"
|
text5 = "**Talents**: "+",".join(list(character["Talents"]))+"\n\n"
|
||||||
@ -167,9 +168,12 @@ def characterSheet(character : dict):
|
|||||||
text6 = "**Force Powers**: "+",".join(list(character["Force-powers"]))+"\n\n"
|
text6 = "**Force Powers**: "+",".join(list(character["Force-powers"]))+"\n\n"
|
||||||
|
|
||||||
if bool(character["Weapons"]):
|
if bool(character["Weapons"]):
|
||||||
text7 = "**Weapons**: "+",".join(list(character["Weapons"]))+"\n\n"
|
text7 = "**Weapons**: "+",".join(list(character["Weapons"]))+"\n"+divider
|
||||||
|
|
||||||
|
if bool(character["Obligations"]):
|
||||||
|
text8 = "**Obligations**: "+",".join(list(character["Obligations"]))
|
||||||
|
|
||||||
return name, text1+text2+"\n\n"+text3+divider+text4+"\n"+divider+text5+text6+text7
|
return name, text1+text2+"\n\n"+text3+divider+text4+"\n"+divider+text5+text6+text7+text8
|
||||||
|
|
||||||
def charData(user : str,cmd : str):
|
def charData(user : str,cmd : str):
|
||||||
with open("resources/swcharacters.json", "r") as f:
|
with open("resources/swcharacters.json", "r") as f:
|
||||||
@ -204,7 +208,7 @@ def charData(user : str,cmd : str):
|
|||||||
except:
|
except:
|
||||||
return "Can't do that"
|
return "Can't do that"
|
||||||
|
|
||||||
if (key == "Talents" or key == "Force-powers") and "," in cmd:
|
if (key == "Talents" or key == "Force-powers" or key == "Obligation") and "," in cmd:
|
||||||
cmd = cmd.split(",")
|
cmd = cmd.split(",")
|
||||||
while cmd[1][0] == " ":
|
while cmd[1][0] == " ":
|
||||||
cmd[1] = cmd[1][1:]
|
cmd[1] = cmd[1][1:]
|
||||||
|
Reference in New Issue
Block a user