Bugfix for parse_code

pull/5/head
Bobloy 7 years ago
parent ec81ce75aa
commit 20b62a6caf

@ -104,18 +104,22 @@ async def parse_code(code, game):
built = ""
category = ""
for c in code:
if len(built) < digits:
built += c
if built == "T" or built == "W" or built == "N":
# Random Towns
category = built
built = ""
digits = 1
continue
elif built == "-":
built = ""
digits += 1
if len(built) < digits:
built += c
continue
try:
idx = int(built)
except ValueError:
@ -138,6 +142,9 @@ async def parse_code(code, game):
decode.append(choice(options)(game))
built = ""
return decode

Loading…
Cancel
Save