mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-18 11:44:05 +01:00
fixeeees
This commit is contained in:
@@ -15,90 +15,81 @@
|
||||
var/stop = 0.0
|
||||
var/screen = 0 // 0 - No Access Denied, 1 - Access allowed
|
||||
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
dat += "<B>Prisoner Implant Manager System</B><BR>"
|
||||
if(screen == 0)
|
||||
dat += "<HR><A href='?src=\ref[src];lock=1'>Unlock Console</A>"
|
||||
else if(screen == 1)
|
||||
dat += "<HR>Chemical Implants<BR>"
|
||||
var/turf/Tr = null
|
||||
for(var/obj/item/weapon/implant/chem/C in GLOB.all_chem_implants)
|
||||
Tr = get_turf(C)
|
||||
if(!Tr) continue//Out of range
|
||||
if(!C.implanted) continue
|
||||
dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: "
|
||||
dat += "<A href='?src=\ref[src];inject1=\ref[C]'>(<font color=red>(1)</font>)</A>"
|
||||
dat += "<A href='?src=\ref[src];inject5=\ref[C]'>(<font color=red>(5)</font>)</A>"
|
||||
dat += "<A href='?src=\ref[src];inject10=\ref[C]'>(<font color=red>(10)</font>)</A><BR>"
|
||||
dat += "********************************<BR>"
|
||||
dat += "<HR>Tracking Implants<BR>"
|
||||
for(var/obj/item/weapon/implant/tracking/T in GLOB.all_tracking_implants)
|
||||
Tr = get_turf(T)
|
||||
if(!Tr) continue//Out of range
|
||||
if(!T.implanted) continue
|
||||
var/loc_display = "Unknown"
|
||||
var/mob/living/carbon/M = T.imp_in
|
||||
if((M.z in using_map.station_levels) && !istype(M.loc, /turf/space))
|
||||
var/turf/mob_loc = get_turf(M)
|
||||
loc_display = mob_loc.loc
|
||||
if(T.malfunction)
|
||||
loc_display = pick(teleportlocs)
|
||||
dat += "ID: [T.id] | Location: [loc_display]<BR>"
|
||||
dat += "<A href='?src=\ref[src];warn=\ref[T]'>(<font color=red><i>Message Holder</i></font>)</A> |<BR>"
|
||||
dat += "********************************<BR>"
|
||||
dat += "<HR><A href='?src=\ref[src];lock=1'>Lock Console</A>"
|
||||
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
/obj/machinery/computer/prisoner/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/computer/prisoner/tgui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "PrisonerManagement", name)
|
||||
ui.open()
|
||||
|
||||
process()
|
||||
if(!..())
|
||||
src.updateDialog()
|
||||
return
|
||||
/obj/machinery/computer/prisoner/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["locked"] = !screen
|
||||
data["chemImplants"] = list()
|
||||
data["trackImplants"] = list()
|
||||
if(screen)
|
||||
for(var/obj/item/weapon/implant/chem/C in GLOB.all_chem_implants)
|
||||
var/turf/T = get_turf(C)
|
||||
if(!T)
|
||||
continue
|
||||
if(!C.implanted)
|
||||
continue
|
||||
data["chemImplants"].Add(list(list(
|
||||
"host" = C.imp_in,
|
||||
"units" = C.reagents.total_volume,
|
||||
"ref" = "\ref[C]"
|
||||
)))
|
||||
for(var/obj/item/weapon/implant/tracking/track in GLOB.all_tracking_implants)
|
||||
var/turf/T = get_turf(track)
|
||||
if(!T)
|
||||
continue
|
||||
if(!track.implanted)
|
||||
continue
|
||||
var/loc_display = "Unknown"
|
||||
var/mob/living/L = track.imp_in
|
||||
if((get_z(L) in using_map.station_levels) && !istype(L.loc, /turf/space))
|
||||
loc_display = T.loc
|
||||
if(track.malfunction)
|
||||
loc_display = pick(teleportlocs)
|
||||
data["trackImplants"].Add(list(list(
|
||||
"host" = L,
|
||||
"ref" = "\ref[track]",
|
||||
"id" = "[track.id]",
|
||||
"loc" = "[loc_display]",
|
||||
)))
|
||||
|
||||
return data
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
/obj/machinery/computer/prisoner/tgui_act(action, list/params)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
if(href_list["inject1"])
|
||||
var/obj/item/weapon/implant/I = locate(href_list["inject1"])
|
||||
if(I) I.activate(1)
|
||||
switch(action)
|
||||
if("inject")
|
||||
var/obj/item/weapon/implant/I = locate(params["imp"])
|
||||
if(I)
|
||||
I.activate(clamp(params["val"], 0, 10))
|
||||
. = TRUE
|
||||
|
||||
else if(href_list["inject5"])
|
||||
var/obj/item/weapon/implant/I = locate(href_list["inject5"])
|
||||
if(I) I.activate(5)
|
||||
if("lock")
|
||||
if(allowed(usr))
|
||||
screen = !screen
|
||||
else
|
||||
to_chat(usr, "Unauthorized Access.")
|
||||
. = TRUE
|
||||
|
||||
else if(href_list["inject10"])
|
||||
var/obj/item/weapon/implant/I = locate(href_list["inject10"])
|
||||
if(I) I.activate(10)
|
||||
if("warn")
|
||||
var/warning = sanitize(input(usr, "Message:", "Enter your message here!", ""))
|
||||
if(!warning)
|
||||
return
|
||||
var/obj/item/weapon/implant/I = locate(params["imp"])
|
||||
if(I && I.imp_in)
|
||||
to_chat(I.imp_in, "<span class='notice'>You hear a voice in your head saying: '[warning]'</span>")
|
||||
. = TRUE
|
||||
|
||||
else if(href_list["lock"])
|
||||
if(src.allowed(usr))
|
||||
screen = !screen
|
||||
else
|
||||
to_chat(usr, "Unauthorized Access.")
|
||||
|
||||
else if(href_list["warn"])
|
||||
var/warning = sanitize(input(usr,"Message:","Enter your message here!",""))
|
||||
if(!warning) return
|
||||
var/obj/item/weapon/implant/I = locate(href_list["warn"])
|
||||
if((I)&&(I.imp_in))
|
||||
var/mob/living/carbon/R = I.imp_in
|
||||
to_chat(R, "<span class='notice'>You hear a voice in your head saying: '[warning]'</span>")
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
@@ -13804,7 +13804,7 @@
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/medical/biostorage3)
|
||||
"iCb" = (
|
||||
/obj/item/weapon/caution/cone,
|
||||
/obj/item/clothing/head/cone,
|
||||
/turf/simulated/floor,
|
||||
/area/maintenance/lowfloor3)
|
||||
"iCJ" = (
|
||||
@@ -18022,7 +18022,7 @@
|
||||
/turf/simulated/floor/bluegrid,
|
||||
/area/ai_upload)
|
||||
"kLl" = (
|
||||
/obj/item/weapon/caution/cone,
|
||||
/obj/item/clothing/head/cone,
|
||||
/obj/structure/cable{
|
||||
icon_state = "1-4"
|
||||
},
|
||||
@@ -27024,7 +27024,7 @@
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/security/prison)
|
||||
"qcT" = (
|
||||
/obj/item/weapon/caution/cone,
|
||||
/obj/item/clothing/head/cone,
|
||||
/turf/simulated/floor,
|
||||
/area/maintenance/atmos_control)
|
||||
"qdm" = (
|
||||
|
||||
@@ -48125,7 +48125,7 @@
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/medbay_primary_storage)
|
||||
"sve" = (
|
||||
/obj/item/weapon/caution/cone,
|
||||
/obj/item/clothing/head/cone,
|
||||
/turf/simulated/floor,
|
||||
/area/maintenance/medbay)
|
||||
"svg" = (
|
||||
|
||||
@@ -793,7 +793,7 @@
|
||||
"pm" = (/obj/effect/decal/cleanable/vomit,/obj/item/weapon/stool/padded,/obj/machinery/light/small{dir = 4; pixel_y = 0},/turf/simulated/floor,/area/maintenance/lowfloor1)
|
||||
"pn" = (/obj/machinery/light/small{dir = 8; pixel_y = 0},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/maintenance/lowfloor1)
|
||||
"po" = (/obj/structure/cable{icon_state = "1-2"},/turf/simulated/floor/plating,/area/maintenance/lowfloor1)
|
||||
"pp" = (/obj/item/weapon/caution/cone,/turf/simulated/floor,/area/maintenance/lowfloor1)
|
||||
"pp" = (/obj/item/clothing/head/cone,/turf/simulated/floor,/area/maintenance/lowfloor1)
|
||||
"pq" = (/obj/item/weapon/broken_bottle,/turf/simulated/floor,/area/maintenance/lowfloor1)
|
||||
"pr" = (/obj/structure/table/woodentable,/obj/item/weapon/material/ashtray/plastic,/obj/item/trash/cigbutt/cigarbutt,/obj/random/maintenance/clean,/obj/random/maintenance/clean,/turf/simulated/floor,/area/maintenance/lowfloor1)
|
||||
"ps" = (/obj/machinery/space_heater,/turf/simulated/floor/plating,/area/maintenance/lowfloor1)
|
||||
|
||||
@@ -7616,7 +7616,7 @@
|
||||
/turf/simulated/floor,
|
||||
/area/maintenance/starboard)
|
||||
"arp" = (
|
||||
/obj/item/weapon/caution/cone,
|
||||
/obj/item/clothing/head/cone,
|
||||
/turf/simulated/floor,
|
||||
/area/maintenance/lowfloor3)
|
||||
"arq" = (
|
||||
@@ -24927,7 +24927,7 @@
|
||||
/turf/simulated/floor/plating,
|
||||
/area/maintenance/maintroom6)
|
||||
"bce" = (
|
||||
/obj/item/weapon/caution/cone,
|
||||
/obj/item/clothing/head/cone,
|
||||
/obj/structure/cable{
|
||||
icon_state = "1-4"
|
||||
},
|
||||
@@ -32026,7 +32026,7 @@
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/hydroponics)
|
||||
"bqD" = (
|
||||
/obj/item/weapon/caution/cone,
|
||||
/obj/item/clothing/head/cone,
|
||||
/turf/simulated/floor,
|
||||
/area/maintenance/atmos_control)
|
||||
"bqE" = (
|
||||
|
||||
@@ -1190,7 +1190,7 @@
|
||||
"axe" = (/obj/structure/cable/heavyduty{icon_state = "2-8"},/obj/machinery/atmospherics/pipe/simple/visible/scrubbers{dir = 10},/obj/machinery/atmospherics/pipe/simple/visible/supply{dir = 10},/obj/structure/railing{dir = 1},/obj/structure/railing{dir = 4},/turf/simulated/floor/plating/snow/plating/cryogaia,/area/borealis2/outdoors/grounds/power)
|
||||
"axf" = (/obj/structure/grille,/obj/structure/window/reinforced/full,/obj/structure/cable/heavyduty{icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/visible/scrubbers,/obj/machinery/atmospherics/pipe/simple/visible/supply,/turf/simulated/floor/plating,/area/security/outpost)
|
||||
"axg" = (/obj/effect/floor_decal/snow/floor/edges3,/obj/effect/floor_decal/snow/floor/edges,/obj/effect/floor_decal/snow/floor/edges{dir = 4},/turf/simulated/floor/outdoors/snow/gravsnow/cryogaia,/area/borealis2/outdoors/grounds)
|
||||
"axh" = (/obj/item/weapon/caution/cone,/turf/simulated/floor,/area/maintenance/medbay)
|
||||
"axh" = (/obj/item/clothing/head/cone,/turf/simulated/floor,/area/maintenance/medbay)
|
||||
"axi" = (/turf/simulated/wall,/area/medical/patient_b)
|
||||
"axj" = (/obj/machinery/atmospherics/unary/vent_scrubber/on{dir = 1},/obj/structure/extinguisher_cabinet{dir = 4; icon_state = "extinguisher_closed"; pixel_x = -30},/obj/effect/floor_decal/corner/paleblue{dir = 9},/obj/structure/bed/padded,/obj/item/weapon/bedsheet/medical,/turf/simulated/floor/tiled/white,/area/medical/scanning)
|
||||
"axk" = (/obj/effect/floor_decal/corner/pink{dir = 5},/obj/structure/bed/padded,/obj/item/weapon/bedsheet/medical,/obj/machinery/newscaster{pixel_y = 32},/turf/simulated/floor/tiled/white,/area/medical/patient_b)
|
||||
|
||||
Reference in New Issue
Block a user