Skip to content
Snippets Groups Projects
Commit dd9909a5 authored by Giuseppe Bilotta's avatar Giuseppe Bilotta
Browse files

minetestmapper can be run from any directory

If it doesn't find colors.txt locally, it looks for the one in the
directory of the script itself.
parent 59c58f23
No related branches found
No related tags found
No related merge requests found
......@@ -152,7 +152,10 @@ if path[-1:] != "/" and path[-1:] != "\\":
# Load color information for the blocks.
colors = {}
f = file("colors.txt")
try:
f = file("colors.txt")
except IOError:
f = file(os.path.join(os.path.dirname(__file__), "colors.txt"))
for line in f:
values = string.split(line)
colors[int(values[0], 16)] = (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment