part 4: the one where i slowly go insane
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
#define BP_MAX_ROOM_SIZE 300
|
||||
|
||||
GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engine/engineering, \
|
||||
/area/engine/supermatter, \
|
||||
/area/engine/atmospherics_engine, \
|
||||
/area/ai_monitored/turret_protected/ai))
|
||||
|
||||
//Repopulates sortedAreas list
|
||||
/proc/repopulate_sorted_areas()
|
||||
GLOB.sortedAreas = list()
|
||||
|
||||
@@ -549,3 +549,36 @@
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure <= LAVALAND_EQUIPMENT_EFFECT_PRESSURE)
|
||||
. = TRUE
|
||||
|
||||
/proc/ispipewire(item)
|
||||
var/static/list/pipe_wire = list(
|
||||
/obj/machinery/atmospherics,
|
||||
/obj/structure/disposalpipe,
|
||||
/obj/structure/cable
|
||||
)
|
||||
return (is_type_in_list(item, pipe_wire))
|
||||
|
||||
// Find a obstruction free turf that's within the range of the center. Can also condition on if it is of a certain area type.
|
||||
/proc/find_obstruction_free_location(var/range, var/atom/center, var/area/specific_area)
|
||||
var/list/turfs = RANGE_TURFS(range, center)
|
||||
var/list/possible_loc = list()
|
||||
for(var/turf/found_turf in turfs)
|
||||
var/area/turf_area = get_area(found_turf)
|
||||
if (specific_area) // We check if both the turf is a floor, and that it's actually in the area. // We also want a location that's clear of any obstructions.
|
||||
if(!istype(turf_area, specific_area))
|
||||
continue
|
||||
if(!isspaceturf(found_turf))
|
||||
if(!is_blocked_turf(found_turf))
|
||||
possible_loc.Add(found_turf)
|
||||
if (possible_loc.len < 1) // Need at least one free location.
|
||||
return FALSE
|
||||
return pick(possible_loc)
|
||||
|
||||
/proc/power_fail(duration_min, duration_max)
|
||||
for(var/P in GLOB.apcs_list)
|
||||
var/obj/machinery/power/apc/C = P
|
||||
if(C.cell && SSmapping.level_trait(C.z, ZTRAIT_STATION))
|
||||
var/area/A = C.area
|
||||
if(GLOB.typecache_powerfailure_safe_areas[A.type])
|
||||
continue
|
||||
C.energy_fail(rand(duration_min,duration_max))
|
||||
@@ -354,6 +354,7 @@
|
||||
roundend_report.set_content(content)
|
||||
roundend_report.stylesheets = list()
|
||||
roundend_report.add_stylesheet("roundend", 'html/browser/roundend.css')
|
||||
roundend_report.add_stylesheet("font-awesome", 'html/font-awesome/css/all.min.css')
|
||||
roundend_report.open(0)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/personal_report(client/C, popcount)
|
||||
|
||||
Reference in New Issue
Block a user