diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index 018be587055..5df911cba83 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -261,7 +261,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list() // Proc: ui_interact() // Parameters: 4 (standard NanoUI arguments) // Description: Uses a bunch of for loops to turn lists into lists of lists, so they can be displayed in nanoUI, then displays various buttons to the user. -/obj/item/device/communicator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/item/device/communicator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/key_state = null) // this is the data which will be sent to the ui var/data[0] //General nanoUI information var/communicators[0] //List of communicators @@ -356,7 +356,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list() if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "communicator.tmpl", "Communicator", 475, 700) + ui = new(user, src, ui_key, "communicator.tmpl", "Communicator", 475, 700, state = key_state) // when the ui is first opened this is the data it will use ui.set_initial_data(data) // open the new ui window diff --git a/nano/templates/communicator.tmpl b/nano/templates/communicator.tmpl index 58b86a30d7e..6157f45d614 100644 --- a/nano/templates/communicator.tmpl +++ b/nano/templates/communicator.tmpl @@ -152,7 +152,10 @@ Used In File(s): code\game\objects\items\devices\communicator\communicator.dm {{:value.name}}