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:

![image](https://github.com/tgstation/tgstation/assets/93882977/8fc8dc44-517e-4491-8d97-98ef411d18e5)
And a lightswitch to Tram's warehouse:

![image](https://github.com/tgstation/tgstation/assets/93882977/c3f43629-ea8a-4f62-830c-498b0ed55121)
Also added some lights on Metastation so it looks like this:

![image](https://github.com/tgstation/tgstation/assets/93882977/754d1970-0888-4564-b99c-42d93c237357)

![image](https://github.com/tgstation/tgstation/assets/93882977/3f18d30f-2d7f-4f3b-9845-9da61d1f6e77)

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:
Helg2
2023-05-27 18:20:07 -04:00
committed by GitHub
parent 16ed08b82a
commit 770712f4cc
8 changed files with 34 additions and 1 deletions
+22
View File
@@ -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)