April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -44,8 +44,8 @@
|
||||
..()
|
||||
assembly = new(src)
|
||||
assembly.state = 4
|
||||
cameranet.cameras += src
|
||||
cameranet.addCamera(src)
|
||||
GLOB.cameranet.cameras += src
|
||||
GLOB.cameranet.addCamera(src)
|
||||
add_to_proximity_list(src, 1) //1 was default of everything
|
||||
/* // Use this to look for cameras that have the same c_tag.
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
@@ -74,9 +74,9 @@
|
||||
if(bug.current == src)
|
||||
bug.current = null
|
||||
bug = null
|
||||
cameranet.removeCamera(src) //Will handle removal from the camera network and the chunks, so we don't need to worry about that
|
||||
cameranet.cameras -= src
|
||||
cameranet.removeCamera(src)
|
||||
GLOB.cameranet.removeCamera(src) //Will handle removal from the camera network and the chunks, so we don't need to worry about that
|
||||
GLOB.cameranet.cameras -= src
|
||||
GLOB.cameranet.removeCamera(src)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/camera/emp_act(severity)
|
||||
@@ -87,7 +87,7 @@
|
||||
update_icon()
|
||||
var/list/previous_network = network
|
||||
network = list()
|
||||
cameranet.removeCamera(src)
|
||||
GLOB.cameranet.removeCamera(src)
|
||||
stat |= EMPED
|
||||
set_light(0)
|
||||
emped = emped+1 //Increase the number of consecutive EMP's
|
||||
@@ -101,10 +101,10 @@
|
||||
stat &= ~EMPED
|
||||
update_icon()
|
||||
if(can_use())
|
||||
cameranet.addCamera(src)
|
||||
GLOB.cameranet.addCamera(src)
|
||||
emped = 0 //Resets the consecutive EMP count
|
||||
addtimer(CALLBACK(src, .proc/cancelCameraAlarm), 100)
|
||||
for(var/mob/O in mob_list)
|
||||
for(var/mob/O in GLOB.mob_list)
|
||||
if (O.client && O.client.eye == src)
|
||||
O.unset_machine()
|
||||
O.reset_perspective(null)
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
/obj/machinery/camera/proc/setViewRange(num = 7)
|
||||
src.view_range = num
|
||||
cameranet.updateVisibility(src, 0)
|
||||
GLOB.cameranet.updateVisibility(src, 0)
|
||||
|
||||
/obj/machinery/camera/proc/shock(mob/living/user)
|
||||
if(!istype(user))
|
||||
@@ -206,7 +206,7 @@
|
||||
info = P.notehtml
|
||||
to_chat(U, "<span class='notice'>You hold \the [itemname] up to the camera...</span>")
|
||||
U.changeNext_move(CLICK_CD_MELEE)
|
||||
for(var/mob/O in player_list)
|
||||
for(var/mob/O in GLOB.player_list)
|
||||
if(isAI(O))
|
||||
var/mob/living/silicon/ai/AI = O
|
||||
if(AI.control_disabled || (AI.stat == DEAD))
|
||||
@@ -278,11 +278,11 @@
|
||||
/obj/machinery/camera/proc/toggle_cam(mob/user, displaymessage = 1)
|
||||
status = !status
|
||||
if(can_use())
|
||||
cameranet.addCamera(src)
|
||||
GLOB.cameranet.addCamera(src)
|
||||
else
|
||||
set_light(0)
|
||||
cameranet.removeCamera(src)
|
||||
cameranet.updateChunk(x, y, z)
|
||||
GLOB.cameranet.removeCamera(src)
|
||||
GLOB.cameranet.updateChunk(x, y, z)
|
||||
var/change_msg = "deactivates"
|
||||
if(status)
|
||||
change_msg = "reactivates"
|
||||
@@ -301,7 +301,7 @@
|
||||
// now disconnect anyone using the camera
|
||||
//Apparently, this will disconnect anyone even if the camera was re-activated.
|
||||
//I guess that doesn't matter since they can't use it anyway?
|
||||
for(var/mob/O in player_list)
|
||||
for(var/mob/O in GLOB.player_list)
|
||||
if (O.client && O.client.eye == src)
|
||||
O.unset_machine()
|
||||
O.reset_perspective(null)
|
||||
@@ -309,12 +309,12 @@
|
||||
|
||||
/obj/machinery/camera/proc/triggerCameraAlarm()
|
||||
alarm_on = 1
|
||||
for(var/mob/living/silicon/S in mob_list)
|
||||
for(var/mob/living/silicon/S in GLOB.mob_list)
|
||||
S.triggerAlarm("Camera", get_area(src), list(src), src)
|
||||
|
||||
/obj/machinery/camera/proc/cancelCameraAlarm()
|
||||
alarm_on = 0
|
||||
for(var/mob/living/silicon/S in mob_list)
|
||||
for(var/mob/living/silicon/S in GLOB.mob_list)
|
||||
S.cancelAlarm("Camera", get_area(src), src)
|
||||
|
||||
/obj/machinery/camera/proc/can_use()
|
||||
@@ -386,7 +386,7 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/camera/proc/Togglelight(on=0)
|
||||
for(var/mob/living/silicon/ai/A in ai_list)
|
||||
for(var/mob/living/silicon/ai/A in GLOB.ai_list)
|
||||
for(var/obj/machinery/camera/cam in A.lit_cameras)
|
||||
if(cam == src)
|
||||
return
|
||||
@@ -405,8 +405,8 @@
|
||||
assembly.update_icon()
|
||||
|
||||
/obj/machinery/camera/portable/process() //Updates whenever the camera is moved.
|
||||
if(cameranet && get_turf(src) != prev_turf)
|
||||
cameranet.updatePortableCamera(src)
|
||||
if(GLOB.cameranet && get_turf(src) != prev_turf)
|
||||
GLOB.cameranet.updatePortableCamera(src)
|
||||
prev_turf = get_turf(src)
|
||||
|
||||
/obj/machinery/camera/get_remote_view_fullscreens(mob/user)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
/obj/machinery/camera/proc/cancelAlarm()
|
||||
if (detectTime == -1)
|
||||
for (var/mob/living/silicon/aiPlayer in player_list)
|
||||
for (var/mob/living/silicon/aiPlayer in GLOB.player_list)
|
||||
if (status)
|
||||
aiPlayer.cancelAlarm("Motion", get_area(src), src)
|
||||
detectTime = 0
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
/obj/machinery/camera/proc/triggerAlarm()
|
||||
if (!detectTime) return 0
|
||||
for (var/mob/living/silicon/aiPlayer in player_list)
|
||||
for (var/mob/living/silicon/aiPlayer in GLOB.player_list)
|
||||
if (status)
|
||||
aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src)
|
||||
detectTime = -1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/obj/machinery/camera/emp_proof
|
||||
start_active = 1
|
||||
|
||||
/obj/machinery/camera/emp_proof/New()
|
||||
/obj/machinery/camera/emp_proof/Initialize()
|
||||
..()
|
||||
upgradeEmpProof()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
start_active = 1
|
||||
icon_state = "xraycam" // Thanks to Krutchen for the icons.
|
||||
|
||||
/obj/machinery/camera/xray/New()
|
||||
/obj/machinery/camera/xray/Initialize()
|
||||
..()
|
||||
upgradeXRay()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
start_active = 1
|
||||
name = "motion-sensitive security camera"
|
||||
|
||||
/obj/machinery/camera/motion/New()
|
||||
/obj/machinery/camera/motion/Initialize()
|
||||
..()
|
||||
upgradeMotion()
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/obj/machinery/camera/all
|
||||
start_active = 1
|
||||
|
||||
/obj/machinery/camera/all/New()
|
||||
/obj/machinery/camera/all/Initialize()
|
||||
..()
|
||||
upgradeEmpProof()
|
||||
upgradeXRay()
|
||||
@@ -43,13 +43,17 @@
|
||||
var/number = 0 //camera number in area
|
||||
|
||||
//This camera type automatically sets it's name to whatever the area that it's in is called.
|
||||
/obj/machinery/camera/autoname/New()
|
||||
..()
|
||||
spawn(10)
|
||||
/obj/machinery/camera/autoname/Initialize(mapload)
|
||||
if(mapload)
|
||||
..()
|
||||
return TRUE
|
||||
else
|
||||
if(!initialized)
|
||||
..()
|
||||
number = 1
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
for(var/obj/machinery/camera/autoname/C in machines)
|
||||
for(var/obj/machinery/camera/autoname/C in GLOB.machines)
|
||||
if(C == src) continue
|
||||
var/area/CA = get_area(C)
|
||||
if(CA.type == A.type)
|
||||
@@ -57,7 +61,6 @@
|
||||
number = max(number, C.number+1)
|
||||
c_tag = "[A.name] #[number]"
|
||||
|
||||
|
||||
// CHECKS
|
||||
|
||||
/obj/machinery/camera/proc/isEmpProof()
|
||||
@@ -79,7 +82,7 @@
|
||||
assembly.upgrades.Add(new /obj/item/device/analyzer(assembly))
|
||||
upgrades |= CAMERA_UPGRADE_XRAY
|
||||
|
||||
// If you are upgrading Motion, and it isn't in the camera's New(), add it to the machines list.
|
||||
// If you are upgrading Motion, and it isn't in the camera's Initialize(), add it to the machines list.
|
||||
/obj/machinery/camera/proc/upgradeMotion()
|
||||
assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly))
|
||||
upgrades |= CAMERA_UPGRADE_MOTION
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return
|
||||
|
||||
var/list/L = list()
|
||||
for (var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for (var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
L.Add(C)
|
||||
|
||||
camera_sort(L)
|
||||
@@ -48,7 +48,7 @@
|
||||
if(usr.stat == 2)
|
||||
return list()
|
||||
|
||||
for(var/mob/living/M in mob_list)
|
||||
for(var/mob/living/M in GLOB.mob_list)
|
||||
if(!M.can_track(usr))
|
||||
continue
|
||||
|
||||
@@ -138,9 +138,9 @@
|
||||
return 0
|
||||
if(iscyborg(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(!(R.camera && R.camera.can_use()) && !cameranet.checkCameraVis(M))
|
||||
if(!(R.camera && R.camera.can_use()) && !GLOB.cameranet.checkCameraVis(M))
|
||||
return 0
|
||||
else if(!cameranet.checkCameraVis(M))
|
||||
else if(!GLOB.cameranet.checkCameraVis(M))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user