diff --git a/aiserver.py b/aiserver.py index 7203b472..639d157b 100644 --- a/aiserver.py +++ b/aiserver.py @@ -1090,12 +1090,10 @@ def applyoutputformatting(txt): # Sends the current story content to the Game Screen #==================================================================# def refresh_story(): - txt = ''+vars.prompt+'' - i = 1 - for item in vars.actions: - txt = txt + ''+item+'' - i += 1 - emit('from_server', {'cmd': 'updatescreen', 'data': formatforhtml(txt)}) + text_parts = ['', vars.prompt, ''] + for idx, item in enumerate(vars.actions, start=1): + text_parts.extend(('', item, '')) + emit('from_server', {'cmd': 'updatescreen', 'data': formatforhtml(''.join(text_parts))}) #==================================================================# # Sends the current generator settings to the Game Menu