Skip to content

Commit

Permalink
change path
Browse files Browse the repository at this point in the history
  • Loading branch information
shuanz committed Aug 2, 2017
1 parent 06225d5 commit ce6cd4b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions character_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Character():

def generate_ancestry(self, ancestry):
if os.name == "posix":
attribute_list = import_file.json_file("ancestries" + "/" +
attribute_list = import_file.json_file("/ancestries" + "/" +
ancestry + "/" + ancestry + extension)
else:
attribute_list = import_file.json_file(".\\ancestries" + "\\" +
Expand All @@ -22,7 +22,7 @@ def generate_random(self, ancestry, list_type, rolling):
number = str(int(dice.roll(rolling)))
try:
if os.name == "posix":
background = import_file.json_file("ancestries" + "/" +
background = import_file.json_file("/ancestries" + "/" +
ancestry + "/" + ancestry + list_type + extension)[number]
else:
background = import_file.json_file(".\\ancestries" + "\\" +
Expand All @@ -38,8 +38,8 @@ def generate_profession(self):
professions_dict = {"1": "academic", "2": "common", "3": "criminal", "4": "martial", "5": "religious", "6": "wilderness"}
try:
if os.name == "posix":
profession_type = import_file.json_file("professions/profession_type.json")[type_number]
profession = import_file.json_file("professions/" + professions_dict[type_number] + ".json")[profession_number]
profession_type = import_file.json_file("/professions/profession_type.json")[type_number]
profession = import_file.json_file("/professions/" + professions_dict[type_number] + ".json")[profession_number]
else:
profession_type = import_file.json_file(".\\professions\\profession_type.json")[type_number]
profession = import_file.json_file(".\\professions\\" + professions_dict[type_number] + ".json")[profession_number]
Expand All @@ -52,7 +52,7 @@ def generate_wealth(self):
number = str(int(dice.roll("3d6")))
try:
if os.name == "posix":
wealth = import_file.json_file("wealth/wealth.json")[number]
wealth = import_file.json_file("/wealth/wealth.json")[number]
else:
wealth = import_file.json_file(".\\wealth\\wealth.json")[number]
except ():
Expand All @@ -66,7 +66,7 @@ def generate_interesting_things(self):
interesting_things_number = str(int(dice.roll("1d20")))
try:
if os.name == "posix":
interesting_thing = import_file.json_file("interesting_things/table_" + table_number + ".json")[interesting_things_number]
interesting_thing = import_file.json_file("/interesting_things/table_" + table_number + ".json")[interesting_things_number]
else:
interesting_thing = import_file.json_file(".\\interesting_things\\table_" + table_number + ".json")[interesting_things_number]
except ():
Expand All @@ -80,9 +80,9 @@ def generate_personality_traits(self):
while positive_number_a == positive_number_b: positive_number_b = str(int(dice.roll("1d20")))
negative_number = str(int(dice.roll("1d20")))
if os.name == "posix":
positive_trait_a = import_file.json_file("personality_traits/positive_personality_traits.json")[positive_number_a]
positive_trait_b = import_file.json_file("personality_traits/positive_personality_traits.json")[positive_number_b]
negative_trait = import_file.json_file("personality_traits/negative_personality_traits.json")[negative_number]
positive_trait_a = import_file.json_file("/personality_traits/positive_personality_traits.json")[positive_number_a]
positive_trait_b = import_file.json_file("/personality_traits/positive_personality_traits.json")[positive_number_b]
negative_trait = import_file.json_file("/personality_traits/negative_personality_traits.json")[negative_number]
else:
positive_trait_a = import_file.json_file(".\\personality_traits\\positive_personality_traits.json")[positive_number_a]
positive_trait_b = import_file.json_file(".\\personality_traits\\positive_personality_traits.json")[positive_number_b]
Expand Down

0 comments on commit ce6cd4b

Please sign in to comment.