#13499: Command amplification no longer applies to non-comms line

Make a copy of message_pieces when instancing message datum for radio speech to allow editing the radio line without affecting the actual line
This commit is contained in:
mochi
2020-05-31 17:11:04 +02:00
parent 70ca3b0101
commit d96d3f2b7a
@@ -411,11 +411,16 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
jobname = "Unknown"
voicemask = TRUE
// Copy the message pieces so we can safely edit comms line without affecting the actual line
var/list/message_pieces_copy = list()
for(var/datum/multilingual_say_piece/S in message_pieces)
message_pieces_copy += new /datum/multilingual_say_piece(S.speaking, S.message)
// Make us a message datum!
var/datum/tcomms_message/tcm = new
tcm.sender_name = displayname
tcm.sender_job = jobname
tcm.message_pieces = message_pieces
tcm.message_pieces = message_pieces_copy
tcm.source_level = position.z
tcm.freq = connection.frequency
tcm.vmask = voicemask