@@ -164,7 +164,7 @@ func get_line(resource: DialogueResource, key: String, extra_game_states: Array)
164
164
if not resource .lines .has (key ):
165
165
assert (false , DMConstants .translate (& "errors.key_not_found" ).format ({ key = key }))
166
166
167
- var data : Dictionary = resource .lines .get (key )
167
+ var data : Dictionary = resource .lines .get (key ). duplicate ( true )
168
168
169
169
# If next_id is an expression we need to resolve it.
170
170
if data .has (& "next_id_expression" ):
@@ -207,14 +207,13 @@ func get_line(resource: DialogueResource, key: String, extra_game_states: Array)
207
207
cummulative_weight += sibling .weight
208
208
209
209
# Find any simultaneously said lines.
210
- var concurrent_lines : Array [DialogueLine ] = []
211
210
if data .has (& "concurrent_lines" ):
212
211
# If the list includes this line then it isn't the origin line so ignore it.
213
212
if not data .concurrent_lines .has (data .id ):
214
- for concurrent_id : String in data . concurrent_lines :
215
- var concurrent_line : DialogueLine = await get_line ( resource , concurrent_id , extra_game_states )
216
- if concurrent_line :
217
- concurrent_lines . append ( concurrent_line )
213
+ # Resolve IDs to their actual lines.
214
+ data . concurrent_lines = data . concurrent_lines . map ( func ( line_id ):
215
+ return await get_line ( resource , line_id , extra_game_states )
216
+ )
218
217
219
218
# If this line is blank and it's the last line then check for returning snippets.
220
219
if data .type in [DMConstants .TYPE_COMMENT , DMConstants .TYPE_UNKNOWN ]:
@@ -252,7 +251,6 @@ func get_line(resource: DialogueResource, key: String, extra_game_states: Array)
252
251
253
252
# Set up a line object.
254
253
var line : DialogueLine = await create_dialogue_line (data , extra_game_states )
255
- line .concurrent_lines = concurrent_lines
256
254
257
255
# If the jump point somehow has no content then just end.
258
256
if not line : return null
0 commit comments