mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
Makes warehouses have lights turned off from roundstart. Also adds mapping helper for turning off lightswitch. (#75666)
## About The Pull Request Warehouse is roundstart closed with shutters and doesn't meant to spawn in, as far as i know. Logic is simple: why do you have turned on lights in a room that is barely used. Basically every warehouse with a lightswitch now has lights turned off. Northstar has all the lights broken in it, so i don't know if i should add one to it. I added a lightswitch on Birdshot so it looks like this:  And a lightswitch to Tram's warehouse:  Also added some lights on Metastation so it looks like this:   I made lights to turn off with mapping helper. Suggestions accepted. I also forgot to make a fridge free accessed on the Beach, so i'm changing it with this pr. ## Why It's Good For The Game Less electricity spending for no4raisin. ## Changelog 🆑 add: [Birdshot], [Tram] Added a lightswitch to warehouse. add: [Birdshot], [Deltastation], [Metastation], [Tram] and [Icebox] warehouses now have lights off roundstart. fix: [Metastation] Warehouse now has lights. Finally. /🆑
This commit is contained in:
@@ -546,6 +546,28 @@
|
||||
log_mapping("[src] at [AREACOORD(src)] [(apc_area.type)] tried to set [target]'s charge to 100 but it's already at 100!")
|
||||
target.full_charge = TRUE
|
||||
|
||||
//Used to turn off lights with lightswitch in areas.
|
||||
/obj/effect/mapping_helpers/turn_off_lights_with_lightswitch
|
||||
name = "area turned off lights helper"
|
||||
icon_state = "lights_off"
|
||||
|
||||
/obj/effect/mapping_helpers/turn_off_lights_with_lightswitch/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!mapload)
|
||||
log_mapping("[src] spawned outside of mapload!")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
check_validity()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/mapping_helpers/turn_off_lights_with_lightswitch/proc/check_validity()
|
||||
var/area/needed_area = get_area(src)
|
||||
if(!needed_area.lightswitch)
|
||||
stack_trace("[src] at [AREACOORD(src)] [(needed_area.type)] tried to turn lights off but they are already off!")
|
||||
var/obj/machinery/light_switch/light_switch = locate(/obj/machinery/light_switch) in needed_area
|
||||
if(!light_switch)
|
||||
stack_trace("Trying to turn off lights with lightswitch in area without lightswitches. In [(needed_area.type)] to be precise.")
|
||||
needed_area.lightswitch = FALSE
|
||||
|
||||
//needs to do its thing before spawn_rivers() is called
|
||||
INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user