Explosions severing cable networks cause nearby(ish) connected rooms's lights to flicker. Also reduces cable integrity. (#91263)

## About The Pull Request

- If a cable is destroyed by an explosion, all rooms within 64-100 (it's
a probability) tiles AND which are connected to the same powernet as the
split cable will have their lights flicker 1-3 times.

- Also adds a verb for visualizing powernets.

- Reduces cable integrity from 300 to 50.

- Cables have innate 75% bomb armor when under a floor tile.

## Why It's Good For The Game

- A big devastating explosion a few doors down is, usually, not felt at
all outside of the screen shake. This adds a bit more ambience to the
effect - you hear a big explosion, your screen goes wild, and the lights
cut for just a second.

- Verb just makes it easier to trace powernets.

- I found it a little ridiculous that cables have 300 integrity, the
same as most furniture. This ultimately makes them a lot more vulnerable
to stuff like acid and fire.

- To compensate for their drastically reduced integrity, I gave cables a
considerable boost to explosive resistance while concealed under the
floor. This prevents bombs from outright shredding all cables in a 50
mile radius. (Devastating explosions will still one-tap them, but heavy
explosions will on average take two blasts.)

## Changelog

🆑 Melbert
add: If a cable is destroyed by an explosion, all rooms within 64-100
(it's a probability) tiles AND which are connected to the same powernet
as the split cable will have their lights flicker 1-3 times.
balance: Cable integrity has been reduced from 300 to 50
balance: Cables have an innate 75% bomb resistance while under floor
tiles
/🆑
This commit is contained in:
MrMelbert
2025-06-20 01:57:48 +00:00
committed by GitHub
parent 30f541b0af
commit ed1657ebbb
5 changed files with 105 additions and 13 deletions
+18 -13
View File
@@ -535,13 +535,11 @@
update()
if("emergency_lighting")
emergency_lights = !emergency_lights
for (var/list/zlevel_turfs as anything in area.get_zlevel_turf_lists())
for(var/turf/area_turf as anything in zlevel_turfs)
for(var/obj/machinery/light/area_light in area_turf)
if(!initial(area_light.no_low_power)) //If there was an override set on creation, keep that override
area_light.no_low_power = emergency_lights
INVOKE_ASYNC(area_light, TYPE_PROC_REF(/obj/machinery/light/, update), FALSE)
CHECK_TICK
for(var/obj/machinery/light/area_light as anything in get_lights())
if(!initial(area_light.no_low_power)) //If there was an override set on creation, keep that override
area_light.no_low_power = emergency_lights
INVOKE_ASYNC(area_light, TYPE_PROC_REF(/obj/machinery/light/, update), FALSE)
CHECK_TICK
return TRUE
/obj/machinery/power/apc/ui_close(mob/user)
@@ -549,6 +547,15 @@
if(user == remote_control_user)
disconnect_remote_access()
/// Returns a list of lights powered/controlled by src
/obj/machinery/power/apc/proc/get_lights()
var/list/lights = list()
for(var/list/zlevel_turfs as anything in area.get_zlevel_turf_lists())
for(var/turf/area_turf as anything in zlevel_turfs)
for(var/obj/machinery/light/found_light in area_turf)
lights += found_light
return lights
/**
* APC early processing. This gets processed after any other machine on the powernet does.
* This adds up the total static power usage for the apc's area, then draw that power usage from the grid or APC cell.
@@ -726,12 +733,10 @@
INVOKE_ASYNC(src, PROC_REF(break_lights))
/obj/machinery/power/apc/proc/break_lights()
for (var/list/zlevel_turfs as anything in area.get_zlevel_turf_lists())
for(var/turf/area_turf as anything in zlevel_turfs)
for(var/obj/machinery/light/breaked_light in area_turf)
breaked_light.on = TRUE
breaked_light.break_light_tube()
stoplag()
for(var/obj/machinery/light/breaked_light as anything in get_lights())
breaked_light.on = TRUE
breaked_light.break_light_tube()
CHECK_TICK
/obj/machinery/power/apc/should_atmos_process(datum/gas_mixture/air, exposed_temperature)
return (exposed_temperature > 2000)