… | |
… | |
331 | } |
331 | } |
332 | } |
332 | } |
333 | |
333 | |
334 | delete $self->{npc}{$self->{ob}->name}{dialog_state} unless %$state; |
334 | delete $self->{npc}{$self->{ob}->name}{dialog_state} unless %$state; |
335 | delete $self->{ob}{dialog_flag} unless %$flag; |
335 | delete $self->{ob}{dialog_flag} unless %$flag; |
336 | |
|
|
337 | # combine lines into paragraphs |
|
|
338 | $reply =~ s/(?<=\S)\n(?=\w)/ /g; |
|
|
339 | $reply =~ s/\n\n/\n/g; |
|
|
340 | |
336 | |
341 | # ignores flags and npc from replies |
337 | # ignores flags and npc from replies |
342 | $reply = join "\n", (map $_->[1], @replies), $reply; |
338 | $reply = join "\n", (map $_->[1], @replies), $reply; |
343 | |
339 | |
344 | # now mark up all matching keywords |
340 | # now mark up all matching keywords |