diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index fe569e23647..596375b3a2c 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -255,6 +255,9 @@ var/global/list/frozen_items = list()
for(var/datum/data/record/G in data_core.general)
if ((G.fields["name"] == occupant.real_name))
del(G)
+ for(var/datum/data/record/E in data_core.exploit)
+ if ((E.fields["name"] == occupant.real_name))
+ del(E)
if(orient_right)
icon_state = "body_scanner_0-r"
diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm
index 04c3c0a7e2c..e85a37a8241 100644
--- a/code/game/objects/items/devices/uplinks.dm
+++ b/code/game/objects/items/devices/uplinks.dm
@@ -28,6 +28,8 @@ datum/nano_item_lists
var/list/ItemsCategory // List of categories with lists of items
var/list/ItemsReference // List of references with an associated item
var/list/nanoui_items // List of items for NanoUI use
+ var/nanoui_menu = 0 // The current menu we are in
+ var/list/nanoui_data = new // Additional data for NanoUI use
/obj/item/device/uplink/New()
welcome = ticker.mode.uplink_welcome
@@ -161,9 +163,11 @@ datum/nano_item_lists
var/title = "Syndicate Uplink"
var/data[0]
- data["crystals"] = uses
- data["nano_items"] = nanoui_items
data["welcome"] = welcome
+ data["crystals"] = uses
+ data["menu"] = nanoui_menu
+ data["nano_items"] = nanoui_items
+ data += nanoui_data
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
@@ -195,8 +199,13 @@ datum/nano_item_lists
toggle()
ui.close()
return 1
-
- if(..(href, href_list) == 1)
+ if(href_list["return"])
+ nanoui_menu = round(nanoui_menu/10)
+ update_nano_data()
+ if(href_list["menu"])
+ nanoui_menu = text2num(href_list["menu"])
+ update_nano_data(href_list["id"])
+ else if(..(href, href_list) == 1)
var/datum/uplink_item/UI = ItemsReference[href_list["buy_item"]]
if(!UI)
return
@@ -209,6 +218,29 @@ datum/nano_item_lists
interact(usr)
return 1
+/obj/item/device/uplink/hidden/proc/update_nano_data(var/id)
+ if(nanoui_menu == 1)
+ var/exploitData[0]
+ for(var/datum/data/record/R in sortRecord(data_core.exploit))
+ exploitData[++exploitData.len] = list(Name = R.fields["name"],"id" = R.fields["id"])
+ nanoui_data["exploit_records"] = exploitData
+
+ if(nanoui_menu == 11)
+ nanoui_data["general_exists"] = 0
+ nanoui_data["exploit_exists"] = 0
+
+ for(var/datum/data/record/R in data_core.general)
+ if(R.fields["id"] == id)
+ nanoui_data["general"] = R.fields
+ nanoui_data["general_exists"] = 1
+ break
+
+ for(var/datum/data/record/E in data_core.exploit)
+ if(E.fields["id"] == id)
+ nanoui_data["exploit"] = E.fields
+ nanoui_data["exploit"]["notes"] = replacetext(nanoui_data["exploit"]["notes"], "\n", "
")
+ nanoui_data["exploit_exists"] = 1
+
// I placed this here because of how relevant it is.
// You place this in your uplinkable item to check if an uplink is active or not.
// If it is, it will display the uplink menu and return 1, else it'll return false.
diff --git a/nano/templates/uplink.tmpl b/nano/templates/uplink.tmpl
index 807dfbe584f..46670e338cf 100644
--- a/nano/templates/uplink.tmpl
+++ b/nano/templates/uplink.tmpl
@@ -4,42 +4,97 @@ Title: Syndicate Uplink, uses some javascript to change nanoUI up a bit.
Used In File(s): \code\game\objects\items\devices\uplinks.dm
-->
{{:helper.syndicateMode()}}
-