diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 3e066989043..e6a4a7a4cb5 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -177,8 +177,8 @@ We can't just insert in HTML into the nanoUI so we need the raw data to play wit var/bot[0] var/misc[0] for(var/datum/data/record/t in data_core.general) - var/name = t.fields["name"] - var/rank = t.fields["rank"] + var/name = sanitize(t.fields["name"]) + var/rank = sanitize(t.fields["rank"]) var/real_rank = t.fields["real_rank"] var/isactive = t.fields["p_stat"] var/department = 0 diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 36d52246b36..0b110f70c47 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -412,17 +412,24 @@ var/global/list/obj/item/device/pda/PDAs = list() else pdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "0"))) count++ + data["convopdas"] = convopdas data["pdas"] = pdas data["pda_count"] = count - data["messagescount"] = tnote.len - data["messages"] = tnote + + if(mode==21) + data["messagescount"] = tnote.len + data["messages"] = tnote + else + data["messagescount"] = null + data["messages"] = null + var/found = 0 if(active_conversation) for(var/c in tnote) if(c["target"] == active_conversation) - data["convo_name"] = c["owner"] - data["convo_job"] = c["job"] + data["convo_name"] = sanitize(c["owner"]) + data["convo_job"] = sanitize(c["job"]) found = 1 break if(!found) @@ -435,7 +442,7 @@ var/global/list/obj/item/device/pda/PDAs = list() if(!ui || mode==3) var/turf/T = get_turf_or_move(user.loc) - if(!isnull(T)) + if(!isnull(T) || mode!=3) var/datum/gas_mixture/environment = T.return_air() var/pressure = environment.return_pressure() @@ -662,8 +669,9 @@ var/global/list/obj/item/device/pda/PDAs = list() var/obj/item/device/pda/P = locate(href_list["target"]) src.create_message(U, P) if(mode == 2) - active_conversation = href_list["target"] - mode = 21 + if(href_list["target"] in conversations) // Need to make sure the message went through, if not welp. + active_conversation = href_list["target"] + mode = 21 if("Select Conversation") var/P = href_list["convo"] diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index 02dbf86b921..d27b744ca89 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -256,14 +256,14 @@ /* Station Display (Mode: 42) */ - if(mode==42 || !ui) + if(mode==42 || (!ui && access_status_display)) values["message1"] = message1 ? message1 : "(none)" values["message2"] = message2 ? message2 : "(none)" /* Power Monitor (Mode: 43 / 433) */ - if(mode==43 || mode==433 || !ui) + if(mode==43 || mode==433 || (!ui && access_engine)) var/pMonData[0] for(var/obj/machinery/power/monitor/pMon in world) if(!(pMon.stat & (NOPOWER|BROKEN)) ) @@ -294,7 +294,7 @@ /* General Records (Mode: 44 / 441 / 45 / 451) */ - if(mode == 44 || mode == 441 || mode == 45 || mode ==451 || !ui) + if(mode == 44 || mode == 441 || mode == 45 || mode ==451 || (!ui && (access_medical || access_security))) if(istype(active1, /datum/data/record) && (active1 in data_core.general)) values["general"] = active1.fields values["general_exists"] = 1 @@ -317,7 +317,7 @@ /* Medical Records (Mode: 44 / 441) */ - if(mode == 44 || mode == 441 || !ui) + if(mode == 44 || mode == 441 || (!ui && access_medical)) var/medData[0] for(var/datum/data/record/R in sortRecord(data_core.general)) medData[++medData.len] = list(Name = R.fields["name"],"ref" = "\ref[R]") @@ -343,7 +343,7 @@ /* Security Records (Mode:45 / 451) */ - if(mode == 45 || mode == 451 || !ui) + if(mode == 45 || mode == 451 || (!ui && access_security)) var/secData[0] for (var/datum/data/record/R in sortRecord(data_core.general)) secData[++secData.len] = list(Name = R.fields["name"], "ref" = "\ref[R]") @@ -441,7 +441,7 @@ /* Supply Shuttle Requests Menu (Mode: 47) */ - if(mode==47 || !ui) + if(mode==47 || (!ui && access_quartermaster)) var/supplyData[0] supplyData["shuttle_moving"] = supply_shuttle.moving supplyData["shuttle_eta"] = supply_shuttle.eta @@ -476,7 +476,7 @@ /* Janitor Supplies Locator (Mode: 49) */ - if(mode==49 || !ui) + if(mode==49 || (!ui && access_janitor)) var/JaniData[0] var/turf/cl = get_turf(src)