Browse Source

improving world path or input

allow name only if in worlds_path
master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
3cb2d3ffec
  1. 9
      chunkymap-regen.py

9
chunkymap-regen.py

@ -507,9 +507,14 @@ class MTChunks:
else: else:
print("(and no world could be found in worlds_path '"+self.config["worlds_path"]+"')") print("(and no world could be found in worlds_path '"+self.config["worlds_path"]+"')")
input_string = raw_input("World path--must type full path (blank for ["+self.config["world_path"]+"]): ") input_string = raw_input("World path (or world name if above; blank for ["+self.config["world_path"]+"]): ")
if (len(input_string)>0): if (len(input_string)>0):
self.config["world_path"] = input_string
try_path = os.path.join(self.config["worlds_path"], input_string)
this_world_path = input_string
if (not os.path.isdir(this_world_path)) and os.path.isdir(try_path):
this_world_path = try_path
self.config["world_path"] = this_world_path
auto_chosen_world = False auto_chosen_world = False
is_config_changed = True is_config_changed = True
print ("Using world_path '"+self.config["world_path"]+"'") print ("Using world_path '"+self.config["world_path"]+"'")

Loading…
Cancel
Save