mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #8703 from PsiOmegaDelta/Map
Area/Camera network refactor - Part 1
This commit is contained in:
@@ -1362,35 +1362,35 @@ area/space/atmosalert()
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/lobby
|
||||
name = "\improper Security lobby"
|
||||
name = "\improper Security Lobby"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/brig
|
||||
name = "\improper Brig"
|
||||
name = "\improper Security - Brig"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/prison
|
||||
name = "\improper Prison Wing"
|
||||
name = "\improper Security - Prison Wing"
|
||||
icon_state = "sec_prison"
|
||||
|
||||
/area/security/warden
|
||||
name = "\improper Warden"
|
||||
name = "\improper Security - Warden's Office"
|
||||
icon_state = "Warden"
|
||||
|
||||
/area/security/armoury
|
||||
name = "\improper Armory"
|
||||
name = "\improper Security - Armory"
|
||||
icon_state = "Warden"
|
||||
|
||||
/area/security/detectives_office
|
||||
name = "\improper Detective's Office"
|
||||
name = "\improper Security - Forensic Office"
|
||||
icon_state = "detective"
|
||||
|
||||
/area/security/range
|
||||
name = "\improper Firing Range"
|
||||
name = "\improper Security - Firing Range"
|
||||
icon_state = "firingrange"
|
||||
|
||||
/area/security/tactical
|
||||
name = "\improper Tactical Equipment"
|
||||
name = "\improper Security - Tactical Equipment"
|
||||
icon_state = "Tactical"
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
// PRESETS
|
||||
var/global/list/station_networks = list("SS13","Engineering Outpost","MINE","Research Outpost","Prison","Security")
|
||||
|
||||
/obj/machinery/camera/network/prison
|
||||
network = list("Prison")
|
||||
|
||||
/obj/machinery/camera/network/security
|
||||
network = list("Security")
|
||||
|
||||
// EMP
|
||||
|
||||
@@ -32,13 +39,16 @@
|
||||
// AUTONAME
|
||||
|
||||
/obj/machinery/camera/autoname/engineering_outpost
|
||||
network = list("SS13", "Engineering Outpost")
|
||||
network = list("Engineering Outpost")
|
||||
|
||||
/obj/machinery/camera/autoname/mining_outpost
|
||||
network = list("SS13", "MINE")
|
||||
network = list("MINE")
|
||||
|
||||
/obj/machinery/camera/autoname/research_outpost
|
||||
network = list("SS13", "Research Outpost")
|
||||
network = list("Research Outpost")
|
||||
|
||||
/obj/machinery/camera/autoname/security
|
||||
network = list("Security")
|
||||
|
||||
/obj/machinery/camera/autoname
|
||||
var/number = 0 //camera number in area
|
||||
|
||||
@@ -12,11 +12,16 @@
|
||||
icon_state = "cameras"
|
||||
var/obj/machinery/camera/current = null
|
||||
var/last_pic = 1.0
|
||||
var/list/network = list("SS13")
|
||||
var/list/network
|
||||
var/mapping = 0//For the overview file, interesting bit of code.
|
||||
circuit = /obj/item/weapon/circuitboard/security
|
||||
var/camera_cache = null
|
||||
|
||||
New()
|
||||
if(!network)
|
||||
network = station_networks
|
||||
..()
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -235,7 +240,7 @@
|
||||
name = "engineering camera monitor"
|
||||
desc = "Used to monitor fires and breaches."
|
||||
icon_state = "engineeringcameras"
|
||||
network = list("Engineering","Power Alarms","Atmosphere Alarms","Fire Alarms")
|
||||
network = list("Engineering","Engineering Outpost","Power Alarms","Atmosphere Alarms","Fire Alarms")
|
||||
circuit = /obj/item/weapon/circuitboard/security/engineering
|
||||
|
||||
/obj/machinery/computer/security/nuclear
|
||||
|
||||
@@ -478,41 +478,39 @@ var/list/ai_verbs_default = list(
|
||||
//Replaces /mob/living/silicon/ai/verb/change_network() in ai.dm & camera.dm
|
||||
//Adds in /mob/living/silicon/ai/proc/ai_network_change() instead
|
||||
//Addition by Mord_Sith to define AI's network change ability
|
||||
/mob/living/silicon/ai/proc/ai_network_change()
|
||||
set category = "AI Commands"
|
||||
set name = "Jump To Network"
|
||||
unset_machine()
|
||||
var/cameralist[0]
|
||||
|
||||
/mob/living/silicon/ai/proc/get_camera_network_list()
|
||||
if(check_unable())
|
||||
return
|
||||
|
||||
var/mob/living/silicon/ai/U = usr
|
||||
|
||||
var/list/cameralist = new()
|
||||
for (var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if(!C.can_use())
|
||||
continue
|
||||
|
||||
var/list/tempnetwork = difflist(C.network,restricted_camera_networks,1)
|
||||
if(tempnetwork.len)
|
||||
for(var/i in tempnetwork)
|
||||
cameralist[i] = i
|
||||
var/old_network = network
|
||||
network = input(U, "Which network would you like to view?") as null|anything in cameralist
|
||||
for(var/i in tempnetwork)
|
||||
cameralist[i] = i
|
||||
|
||||
if(!U.eyeobj)
|
||||
U.view_core()
|
||||
cameralist = sortAssoc(cameralist)
|
||||
return cameralist
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_network_change(var/network in get_camera_network_list())
|
||||
set category = "AI Commands"
|
||||
set name = "Jump To Network"
|
||||
unset_machine()
|
||||
|
||||
if(!network)
|
||||
return
|
||||
|
||||
if(isnull(network))
|
||||
network = old_network // If nothing is selected
|
||||
else
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if(!C.can_use())
|
||||
continue
|
||||
if(network in C.network)
|
||||
U.eyeobj.setLoc(get_turf(C))
|
||||
break
|
||||
if(!eyeobj)
|
||||
view_core()
|
||||
return
|
||||
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if(!C.can_use())
|
||||
continue
|
||||
if(network in C.network)
|
||||
eyeobj.setLoc(get_turf(C))
|
||||
break
|
||||
src << "\blue Switched to [network] camera network."
|
||||
//End of code by Mord_Sith
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user