commit partially implemented option to ignore line types

This commit is contained in:
Bill Zorn 2016-06-15 20:55:37 -07:00
parent 0132345ebe
commit 9227f870b9

View file

@ -561,14 +561,12 @@ def randomize_choice(line):
1)
return new_line
def randomize_lines(text):
if text == '' or 'level up' in text:
return text
prelines, keylines, mainlines, costlines, postlines = separate_lines(text)
random.shuffle(prelines)
random.shuffle(keylines)
new_mainlines = []
for line in mainlines:
if line.endswith(utils.choice_close_delimiter):
@ -577,6 +575,14 @@ def randomize_lines(text):
# print(line)
else:
new_mainlines.append(line)
if False: # TODO: make this an option
lines = prelines + keylines + new_mainlines + costlines + postlines
random.shuffle(lines)
return utils.newline.join(lines)
else:
random.shuffle(prelines)
random.shuffle(keylines)
random.shuffle(new_mainlines)
random.shuffle(costlines)
#random.shuffle(postlines) # only one kind ever (countertype)