mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 17:07:53 +01:00
Ports the TG globals controller and converts globals. (#18057)
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -11,21 +11,21 @@
|
||||
if(NETWORK_THUNDER)
|
||||
return FALSE
|
||||
if(NETWORK_REACTOR,NETWORK_ENGINEERING,NETWORK_ENGINEERING_OUTPOST,NETWORK_ALARM_ATMOS,NETWORK_ALARM_FIRE,NETWORK_ALARM_POWER)
|
||||
return access_engine
|
||||
return ACCESS_ENGINE
|
||||
if(NETWORK_MEDICAL)
|
||||
return access_medical
|
||||
return ACCESS_MEDICAL
|
||||
if(NETWORK_SECURITY)
|
||||
return access_security
|
||||
return ACCESS_SECURITY
|
||||
if(NETWORK_RESEARCH,NETWORK_RESEARCH_OUTPOST)
|
||||
return access_research
|
||||
return ACCESS_RESEARCH
|
||||
if(NETWORK_MINE,NETWORK_SUPPLY,NETWORK_CIVILIAN_WEST,NETWORK_EXPEDITION,NETWORK_CALYPSO,NETWORK_POD)
|
||||
return access_mailsorting // Cargo office - all cargo staff should have access here.
|
||||
return ACCESS_MAILSORTING // Cargo office - all cargo staff should have access here.
|
||||
if(NETWORK_COMMAND,NETWORK_TELECOM,NETWORK_CIVILIAN_EAST,NETWORK_CIVILIAN_MAIN,NETWORK_CIVILIAN_SURFACE, NETWORK_SERVICE, NETWORK_FIRST_DECK, NETWORK_SECOND_DECK, NETWORK_THIRD_DECK, NETWORK_INTREPID)
|
||||
return access_heads
|
||||
return ACCESS_HEADS
|
||||
if(NETWORK_CRESCENT,NETWORK_ERT)
|
||||
return access_cent_specops
|
||||
return ACCESS_CENT_SPECOPS
|
||||
|
||||
return access_security // Default for all other networks
|
||||
return ACCESS_SECURITY // Default for all other networks
|
||||
|
||||
/datum/computer_file/program/camera_monitor
|
||||
filename = "cammon"
|
||||
@@ -36,7 +36,7 @@
|
||||
size = 12
|
||||
available_on_ntnet = TRUE
|
||||
requires_ntnet = TRUE
|
||||
required_access_download = access_heads
|
||||
required_access_download = ACCESS_HEADS
|
||||
color = LIGHT_COLOR_ORANGE
|
||||
usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP
|
||||
tgui_id = "CameraMonitoring"
|
||||
@@ -92,7 +92,7 @@
|
||||
if(!network_access)
|
||||
return TRUE
|
||||
|
||||
return (check_network_access(user, access_security) && security_level >= SEC_LEVEL_BLUE) || check_network_access(user, network_access)
|
||||
return (check_network_access(user, ACCESS_SECURITY) && security_level >= SEC_LEVEL_BLUE) || check_network_access(user, network_access)
|
||||
|
||||
/datum/computer_file/program/camera_monitor/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
. = ..()
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
switch(action)
|
||||
if("switch_camera")
|
||||
var/obj/machinery/camera/C = locate(params["switch_camera"]) in cameranet.cameras
|
||||
var/obj/machinery/camera/C = locate(params["switch_camera"]) in GLOB.cameranet.cameras
|
||||
if(!C)
|
||||
return
|
||||
if(!(current_network in C.network))
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
size = 8
|
||||
requires_ntnet = TRUE
|
||||
available_on_ntnet = TRUE
|
||||
required_access_download = access_hos
|
||||
required_access_run = access_security
|
||||
required_access_download = ACCESS_HOS
|
||||
required_access_run = ACCESS_SECURITY
|
||||
usage_flags = PROGRAM_ALL_REGULAR | PROGRAM_STATIONBOUND
|
||||
tgui_id = "DigitalWarrant"
|
||||
var/datum/record/warrant/active_warrant
|
||||
@@ -67,12 +67,12 @@
|
||||
if(!istype(user))
|
||||
return
|
||||
var/obj/item/card/id/I = user.GetIdCard()
|
||||
if(!istype(I) || !I.registered_name || !(access_security in I.access) || issilicon(user))
|
||||
if(!istype(I) || !I.registered_name || !(ACCESS_SECURITY in I.access) || issilicon(user))
|
||||
to_chat(user, SPAN_WARNING("Authentication error: Unable to locate ID with appropriate access to allow this operation."))
|
||||
return
|
||||
|
||||
// Require higher access to edit warrants that have already been authorized
|
||||
if(active_warrant && active_warrant.authorization != "Unauthorized" && !(access_armory in I.access))
|
||||
if(active_warrant && active_warrant.authorization != "Unauthorized" && !(ACCESS_ARMORY in I.access))
|
||||
to_chat(user, SPAN_WARNING("Authentication error: Unable to locate ID with appropriate access to adjust an authorized warrant."))
|
||||
return
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
active_warrant.notes = new_charges
|
||||
|
||||
if("editwarrantauth")
|
||||
if(!(access_armory in I.access))
|
||||
if(!(ACCESS_ARMORY in I.access))
|
||||
to_chat(user, SPAN_WARNING("Authentication error: Unable to locate ID with appropriate access to allow this operation."))
|
||||
return
|
||||
. = TRUE
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
size = 8
|
||||
requires_ntnet = TRUE
|
||||
available_on_ntnet = TRUE
|
||||
required_access_download = access_hos
|
||||
required_access_run = access_armory
|
||||
required_access_download = ACCESS_HOS
|
||||
required_access_run = ACCESS_ARMORY
|
||||
usage_flags = PROGRAM_CONSOLE
|
||||
tgui_id = "GunTracker"
|
||||
var/list/wireless_firing_pins_data
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
program_icon_state = "security"
|
||||
program_key_icon_state = "yellow_key"
|
||||
extended_desc = "This program allows authorized security personnel to track and remotely interface with active implants."
|
||||
required_access_run = access_armory
|
||||
required_access_run = ACCESS_ARMORY
|
||||
requires_ntnet = TRUE
|
||||
available_on_ntnet = FALSE
|
||||
size = 6
|
||||
@@ -22,7 +22,7 @@
|
||||
. = data
|
||||
|
||||
var/list/chem_implants = list()
|
||||
for(var/obj/item/implant/chem/C in implants)
|
||||
for(var/obj/item/implant/chem/C in GLOB.implants)
|
||||
if(!C.implanted)
|
||||
continue
|
||||
var/turf/Tr = get_turf(C)
|
||||
@@ -36,7 +36,7 @@
|
||||
chem_implants += list(chem_info)
|
||||
data["chem_implants"] = chem_implants
|
||||
var/list/tracking_implants = list()
|
||||
for(var/obj/item/implant/tracking/T in implants)
|
||||
for(var/obj/item/implant/tracking/T in GLOB.implants)
|
||||
if(!T.implanted)
|
||||
continue
|
||||
var/turf/Tr = get_turf(T)
|
||||
@@ -48,7 +48,7 @@
|
||||
var/area/A = get_area(M)
|
||||
loc_display = A.name
|
||||
if(T.malfunction)
|
||||
var/area/location = pick(the_station_areas)
|
||||
var/area/location = pick(GLOB.the_station_areas)
|
||||
loc_display = location.name
|
||||
var/list/tracker_info = list(
|
||||
"id" = T.id,
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
switch(action)
|
||||
if("inject1")
|
||||
var/obj/item/implant/I = locate(params["inject1"]) in implants
|
||||
var/obj/item/implant/I = locate(params["inject1"]) in GLOB.implants
|
||||
if(I)
|
||||
if(I.reagents.total_volume < 1)
|
||||
to_chat(usr, SPAN_WARNING("\The [I] does not have enough of a payload to do this!"))
|
||||
@@ -75,7 +75,7 @@
|
||||
I.activate(1)
|
||||
|
||||
if("inject5")
|
||||
var/obj/item/implant/I = locate(params["inject5"]) in implants
|
||||
var/obj/item/implant/I = locate(params["inject5"]) in GLOB.implants
|
||||
if(I)
|
||||
if(I.reagents.total_volume < 5)
|
||||
to_chat(usr, SPAN_WARNING("\The [I] does not have enough of a payload to do this!"))
|
||||
@@ -83,7 +83,7 @@
|
||||
I.activate(5)
|
||||
|
||||
if("inject10")
|
||||
var/obj/item/implant/I = locate(params["inject10"]) in implants
|
||||
var/obj/item/implant/I = locate(params["inject10"]) in GLOB.implants
|
||||
if(I)
|
||||
if(I.reagents.total_volume < 10)
|
||||
to_chat(usr, SPAN_WARNING("\The [I] does not have enough of a payload to do this!"))
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
warning = formalize_text(warning)
|
||||
|
||||
var/obj/item/implant/I = locate(params["warn"]) in implants
|
||||
var/obj/item/implant/I = locate(params["warn"]) in GLOB.implants
|
||||
if(istype(I) && I.imp_in)
|
||||
var/mob/living/carbon/R = I.imp_in
|
||||
to_chat(R, SPAN_NOTICE("You hear a voice in your head saying: '[warning]'."))
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
program_icon_state = "security"
|
||||
program_key_icon_state = "yellow_key"
|
||||
extended_desc = "This program allows monitoring and control of active penal robotics."
|
||||
required_access_run = access_armory
|
||||
required_access_download = access_armory
|
||||
required_access_run = ACCESS_ARMORY
|
||||
required_access_download = ACCESS_ARMORY
|
||||
requires_ntnet = TRUE
|
||||
available_on_ntnet = TRUE
|
||||
network_destination = "penal robotics monitoring system"
|
||||
@@ -79,7 +79,7 @@
|
||||
reset_current()
|
||||
usr.reset_view()
|
||||
else
|
||||
var/mob/living/heavy_vehicle/M = locate(params["track_mech"]) in mob_list
|
||||
var/mob/living/heavy_vehicle/M = locate(params["track_mech"]) in GLOB.mob_list
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
var/obj/machinery/camera/C = M.camera
|
||||
@@ -88,20 +88,20 @@
|
||||
return TRUE
|
||||
|
||||
if("lockdown_mech")
|
||||
var/mob/living/heavy_vehicle/M = locate(params["lockdown_mech"]) in mob_list
|
||||
var/mob/living/heavy_vehicle/M = locate(params["lockdown_mech"]) in GLOB.mob_list
|
||||
if(ismob(M))
|
||||
M.ToggleLockdown()
|
||||
return TRUE
|
||||
|
||||
if("terminate")
|
||||
var/mob/living/M = locate(params["terminate"]) in mob_list
|
||||
var/mob/living/M = locate(params["terminate"]) in GLOB.mob_list
|
||||
if(M?.old_mob && M.vr_mob)
|
||||
to_chat(M, SPAN_WARNING("Your connection to remote-controlled [M] is forcibly severed!"))
|
||||
M.body_return()
|
||||
return TRUE
|
||||
|
||||
if("message_pilot")
|
||||
var/mob/living/M = locate(params["message_pilot"]) in mob_list
|
||||
var/mob/living/M = locate(params["message_pilot"]) in GLOB.mob_list
|
||||
if(ismob(M))
|
||||
var/message = sanitize(input("Message to [M.old_mob]", "Set Message") as text|null)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user