From d96d3f2b7af2006865ce8e3e7f82a81c6c518feb Mon Sep 17 00:00:00 2001 From: mochi Date: Sun, 31 May 2020 17:11:04 +0200 Subject: [PATCH] #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 --- code/game/objects/items/devices/radio/radio.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 4c2aaa82c1e..764aee032f4 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -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