mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 07:32:02 +00:00
This is it. The big one. Risk: Very large. This modifies or rewrites several important systems. Some things still need balancing, but that's probably better done if/when this hits dev. changes: New smooth lighting system. Machinery split into three processes: machinery, powernet, pipenet Removed due to breakage. Refactored into multi-step process. Mob process rewritten. NanoUI process rewritten. Objects process rewritten. Tweaked color output of station lights. Slime core lights now emit colored light. Fixed light update frequency issue with fire alarms, hydroponics trays, and airlocks. Increased light emission from bolted airlocks. Miscellaneous performance improvements. New datum pool implementation. New lighting usage profiler. Lighting system now tracks UV light, which is not visible to players. Space now has a parallax effect. Disabled Spin View verbs due to incompatibility with the new lighting system. Disabled hallucination view spin due to incompatibility with the new lighting system. Lighting system now initializes in the lobby before the round starts to reduce BoR deadtime. Added UV light tracking to lighting engine; dionae now gain energy exclusively from UV light. Added colored lighting to a few consoles that used default (white) light.
42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
// We manually initialize the alarm handlers instead of looping over all existing types
|
|
// to make it possible to write: camera.triggerAlarm() rather than alarm_manager.managers[datum/alarm_handler/camera].triggerAlarm() or a variant thereof.
|
|
/var/global/datum/alarm_handler/atmosphere/atmosphere_alarm = new()
|
|
/var/global/datum/alarm_handler/camera/camera_alarm = new()
|
|
/var/global/datum/alarm_handler/fire/fire_alarm = new()
|
|
/var/global/datum/alarm_handler/motion/motion_alarm = new()
|
|
/var/global/datum/alarm_handler/power/power_alarm = new()
|
|
|
|
// Alarm Manager, the manager for alarms.
|
|
var/datum/controller/process/alarm/alarm_manager
|
|
|
|
/datum/controller/process/alarm
|
|
var/list/datum/alarm/all_handlers
|
|
|
|
/datum/controller/process/alarm/setup()
|
|
name = "alarm"
|
|
schedule_interval = 20 // every 2 seconds
|
|
all_handlers = list(atmosphere_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm)
|
|
alarm_manager = src
|
|
|
|
/datum/controller/process/alarm/doWork()
|
|
for(last_object in all_handlers)
|
|
var/datum/alarm_handler/AH = last_object
|
|
AH.process()
|
|
F_SCHECK
|
|
|
|
/datum/controller/process/alarm/proc/active_alarms()
|
|
var/list/all_alarms = new
|
|
for(var/datum/alarm_handler/AH in all_handlers)
|
|
var/list/alarms = AH.alarms
|
|
all_alarms += alarms
|
|
|
|
return all_alarms
|
|
|
|
/datum/controller/process/alarm/proc/number_of_active_alarms()
|
|
var/list/alarms = active_alarms()
|
|
return alarms.len
|
|
|
|
/datum/controller/process/alarm/statProcess()
|
|
..()
|
|
stat(null, "[number_of_active_alarms()] alarm\s")
|