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