mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
Merge pull request #15892 from SandPoot/let's-sing-the-reference-clearing-song
Solves some harddels
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
icon_state = "[state]"
|
||||
|
||||
/obj/machinery/bluespace_beacon/process()
|
||||
if(!Beacon)
|
||||
if(QDELETED(Beacon)) //Don't move it out of nullspace BACK INTO THE GAME for the love of god
|
||||
var/turf/T = loc
|
||||
Beacon = new(T)
|
||||
Beacon.invisibility = INVISIBILITY_MAXIMUM
|
||||
|
||||
@@ -81,15 +81,15 @@
|
||||
if(can_use())
|
||||
toggle_cam(null, 0) //kick anyone viewing out and remove from the camera chunks
|
||||
GLOB.cameranet.cameras -= src
|
||||
cancelCameraAlarm()
|
||||
if(isarea(myarea))
|
||||
LAZYREMOVE(myarea.cameras, src)
|
||||
myarea.clear_camera(src)
|
||||
QDEL_NULL(assembly)
|
||||
if(bug)
|
||||
bug.bugged_cameras -= src.c_tag
|
||||
bug.bugged_cameras -= c_tag
|
||||
if(bug.current == src)
|
||||
bug.current = null
|
||||
bug = null
|
||||
cancelCameraAlarm()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/camera/emp_act(severity)
|
||||
|
||||
@@ -33,31 +33,46 @@
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/station_alert/proc/triggerAlarm(class, area/A, O, obj/source)
|
||||
/obj/machinery/computer/station_alert/proc/triggerAlarm(class, area/home, cameras, obj/source)
|
||||
if(source.z != z)
|
||||
return
|
||||
if(stat & (BROKEN))
|
||||
return
|
||||
|
||||
var/list/L = alarms[class]
|
||||
for(var/I in L)
|
||||
if (I == A.name)
|
||||
var/list/alarm = L[I]
|
||||
var/list/our_sort = alarms[class]
|
||||
for(var/areaname in our_sort)
|
||||
if (areaname == home.name)
|
||||
var/list/alarm = our_sort[areaname]
|
||||
var/list/sources = alarm[3]
|
||||
if (!(source in sources))
|
||||
sources += source
|
||||
return 1
|
||||
var/obj/machinery/camera/C = null
|
||||
var/list/CL = null
|
||||
if(O && islist(O))
|
||||
CL = O
|
||||
if (CL.len == 1)
|
||||
C = CL[1]
|
||||
else if(O && istype(O, /obj/machinery/camera))
|
||||
C = O
|
||||
L[A.name] = list(A, (C ? C : O), list(source))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
var/obj/machinery/camera/cam = null
|
||||
var/list/our_cams = null
|
||||
if(cameras && islist(cameras))
|
||||
our_cams = cameras
|
||||
if (our_cams.len == 1)
|
||||
cam = our_cams[1]
|
||||
else if(cameras && istype(cameras, /obj/machinery/camera))
|
||||
cam = cameras
|
||||
our_sort[home.name] = list(home, (cam ? cam : cameras), list(source))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/station_alert/proc/freeCamera(area/home, obj/machinery/camera/cam)
|
||||
for(var/class in alarms)
|
||||
var/our_area = alarms[class][home.name]
|
||||
if(!our_area)
|
||||
continue
|
||||
var/cams = our_area[2] //Get the cameras
|
||||
if(!cams)
|
||||
continue
|
||||
if(islist(cams))
|
||||
cams -= cam
|
||||
if(length(cams) == 1)
|
||||
our_area[2] = cams[1]
|
||||
else
|
||||
our_area[2] = null
|
||||
|
||||
/obj/machinery/computer/station_alert/proc/cancelAlarm(class, area/A, obj/origin)
|
||||
if(stat & (BROKEN))
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
var/state
|
||||
var/obj/machinery/embedded_controller/master
|
||||
|
||||
/datum/computer/file/embedded_program/Destroy()
|
||||
master = null
|
||||
. = ..()
|
||||
|
||||
/datum/computer/file/embedded_program/proc/post_signal(datum/signal/signal, comm_line)
|
||||
if(master)
|
||||
master.post_signal(signal, comm_line)
|
||||
@@ -25,6 +29,11 @@
|
||||
|
||||
var/on = TRUE
|
||||
|
||||
/obj/machinery/embedded_controller/Destroy()
|
||||
if(program)
|
||||
QDEL_NULL(program)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/embedded_controller/ui_interact(mob/user)
|
||||
. = ..()
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -33,8 +33,10 @@
|
||||
|
||||
var/detecting = 1
|
||||
var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
|
||||
var/last_alarm = 0
|
||||
COOLDOWN_DECLARE(last_alarm)
|
||||
var/area/myarea = null
|
||||
//Has this firealarm been triggered by its enviroment?
|
||||
var/triggered = FALSE
|
||||
|
||||
/obj/machinery/firealarm/Initialize(mapload, dir, building)
|
||||
. = ..()
|
||||
@@ -50,6 +52,7 @@
|
||||
LAZYADD(myarea.firealarms, src)
|
||||
|
||||
/obj/machinery/firealarm/Destroy()
|
||||
myarea.firereset(src)
|
||||
LAZYREMOVE(myarea.firealarms, src)
|
||||
return ..()
|
||||
|
||||
@@ -102,7 +105,7 @@
|
||||
. += mutable_appearance(icon, "fire_on")
|
||||
. += emissive_appearance(icon, "fire_on")
|
||||
|
||||
if(!panel_open && detecting) //It just looks horrible with the panel open
|
||||
if(!panel_open && detecting && triggered) //It just looks horrible with the panel open
|
||||
. += "fire_detected"
|
||||
. += mutable_appearance(icon, "fire_detected")
|
||||
. += emissive_appearance(icon, "fire_detected") //Pain
|
||||
@@ -129,14 +132,14 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume)
|
||||
if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && (last_alarm+FIREALARM_COOLDOWN < world.time) && !(obj_flags & EMAGGED) && detecting && !stat)
|
||||
if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && COOLDOWN_FINISHED(src, last_alarm) && !(obj_flags & EMAGGED) && detecting && !stat)
|
||||
alarm()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/firealarm/proc/alarm(mob/user)
|
||||
if(!is_operational() || (last_alarm+FIREALARM_COOLDOWN > world.time))
|
||||
if(!is_operational() || !COOLDOWN_FINISHED(src, last_alarm))
|
||||
return
|
||||
last_alarm = world.time
|
||||
COOLDOWN_START(src, last_alarm, FIREALARM_COOLDOWN)
|
||||
var/area/A = get_base_area(src)
|
||||
A.firealert(src)
|
||||
playsound(loc, 'goon/sound/machinery/FireAlarm.ogg', 75)
|
||||
@@ -147,7 +150,7 @@
|
||||
if(!is_operational())
|
||||
return
|
||||
var/area/A = get_base_area(src)
|
||||
A.firereset(src)
|
||||
A.firereset()
|
||||
if(user)
|
||||
log_game("[user] reset a fire alarm at [COORD(src)]")
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
connected_console = null
|
||||
for(var/obj/machinery/computer/mechpad/console in consoles)
|
||||
console.mechpads -= src
|
||||
GLOB.mechpad_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mechpad/screwdriver_act(mob/user, obj/item/tool)
|
||||
|
||||
Reference in New Issue
Block a user