diff --git a/_maps/RandomZLevels/TheBeach.dmm b/_maps/RandomZLevels/TheBeach.dmm index 5926ae64c20..550818a5b32 100644 --- a/_maps/RandomZLevels/TheBeach.dmm +++ b/_maps/RandomZLevels/TheBeach.dmm @@ -656,7 +656,7 @@ /turf/open/floor/wood, /area/awaymission/beach) "cr" = ( -/obj/structure/closet/secure_closet/freezer/kitchen, +/obj/structure/closet/secure_closet/freezer/kitchen/all_access, /obj/item/storage/fancy/egg_box, /obj/item/reagent_containers/condiment/milk, /obj/item/reagent_containers/condiment/milk, diff --git a/_maps/map_files/Birdshot/birdshot.dmm b/_maps/map_files/Birdshot/birdshot.dmm index 1339e3d499a..8403c1f4776 100644 --- a/_maps/map_files/Birdshot/birdshot.dmm +++ b/_maps/map_files/Birdshot/birdshot.dmm @@ -26524,6 +26524,8 @@ /area/station/maintenance/hallway/abandoned_command) "jPm" = ( /obj/machinery/light/small/directional/east, +/obj/machinery/light_switch/directional/east, +/obj/effect/mapping_helpers/turn_off_lights_with_lightswitch, /turf/open/floor/iron/smooth, /area/station/cargo/warehouse) "jPq" = ( diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index bf25b478f44..f6d2c52d2ee 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -44902,6 +44902,7 @@ /obj/effect/turf_decal/tile/brown/half/contrasted{ dir = 1 }, +/obj/effect/mapping_helpers/turn_off_lights_with_lightswitch, /turf/open/floor/iron, /area/station/cargo/warehouse) "lgf" = ( diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index fd0392674ed..c8b668f2eb3 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -47194,6 +47194,7 @@ /turf/open/floor/plating, /area/station/maintenance/starboard/fore) "oXo" = ( +/obj/effect/mapping_helpers/turn_off_lights_with_lightswitch, /turf/open/floor/iron/smooth_large, /area/station/cargo/warehouse) "oXq" = ( diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 779ed5c01a7..0bfd3cd66c1 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -7538,6 +7538,7 @@ /obj/machinery/computer/mech_bay_power_console{ dir = 4 }, +/obj/machinery/light/small/directional/west, /turf/open/floor/iron, /area/station/cargo/warehouse) "cSv" = ( @@ -35910,6 +35911,7 @@ "mXE" = ( /obj/effect/decal/cleanable/dirt, /obj/machinery/firealarm/directional/east, +/obj/effect/mapping_helpers/turn_off_lights_with_lightswitch, /turf/open/floor/iron, /area/station/cargo/warehouse) "mXK" = ( @@ -51045,6 +51047,7 @@ "stw" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/reagent_dispensers/watertank, +/obj/machinery/light/small/directional/north, /turf/open/floor/iron, /area/station/cargo/warehouse) "stC" = ( diff --git a/_maps/map_files/tramstation/tramstation.dmm b/_maps/map_files/tramstation/tramstation.dmm index 54025da1596..f76cb5d9c65 100644 --- a/_maps/map_files/tramstation/tramstation.dmm +++ b/_maps/map_files/tramstation/tramstation.dmm @@ -21299,6 +21299,9 @@ /obj/effect/turf_decal/trimline/neutral/filled/line{ dir = 1 }, +/obj/machinery/light_switch/directional/north{ + pixel_x = 10 + }, /turf/open/floor/iron, /area/station/cargo/warehouse) "glP" = ( @@ -58528,6 +58531,7 @@ /obj/effect/turf_decal/stripes/corner{ dir = 8 }, +/obj/effect/mapping_helpers/turn_off_lights_with_lightswitch, /turf/open/floor/iron, /area/station/cargo/warehouse) "tNW" = ( diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm index da530584915..2833bfb23c0 100644 --- a/code/modules/mapping/mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers.dm @@ -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) diff --git a/icons/effects/mapping_helpers.dmi b/icons/effects/mapping_helpers.dmi index 335ba9a57a8..24cbe62e3bb 100644 Binary files a/icons/effects/mapping_helpers.dmi and b/icons/effects/mapping_helpers.dmi differ