mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Engineering machinery and consoles area detection refactor (#26716)
* Gravity generator, Atmos Control Computers, and Station Alert Computers now work by area rather than Z_level
* Cameras get added to network depending on ancestor area
* Station Alert console work by area
* Adds a check so we don't get_area on a null variable
* Gravgen also checks for z level. Area check now includes some types of ruins that weren't checked
* Keeps everything on the Z level. Atmos alert computer now iterates over alarm, but still presesents area names
* Engineering monitor gets networks from the area it is placed in
* Adds missing area prototype to the prototype list
* moves the area check to a function
* reject legs, return to snek.
* Revert "reject legs, return to snek."
This reverts commit 1dfc2c4454.
* I don't know what happened with paradise.dme, but it seems ok now
* Requested style changes and remove redundant nulls
* oops
* Another empty line removed
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
/datum/ui_module/atmos_control
|
||||
name = "Atmospherics Control"
|
||||
var/parent_area_type
|
||||
var/z_level
|
||||
|
||||
/datum/ui_module/atmos_control/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
if(..())
|
||||
@@ -28,7 +30,15 @@
|
||||
)
|
||||
|
||||
/datum/ui_module/atmos_control/ui_data(mob/user)
|
||||
var/list/alarms_on_net = GLOB.air_alarms
|
||||
// default value means main station atmos control
|
||||
if(parent_area_type)
|
||||
alarms_on_net = list()
|
||||
for(var/obj/machinery/alarm/air_alarm in GLOB.air_alarms)
|
||||
if(air_alarm.alarm_area.type in typesof(parent_area_type))
|
||||
alarms_on_net |= air_alarm
|
||||
|
||||
var/list/data = list()
|
||||
data["alarms"] = GLOB.air_alarm_repository.air_alarm_data(GLOB.air_alarms, target_z=level_name_to_num(MAIN_STATION))
|
||||
data["alarms"] = GLOB.air_alarm_repository.air_alarm_data(alarms_on_net, target_z = z_level)
|
||||
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user