mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Adds a New Station Trait: Lights Out! (#31712)
* initial commit * linter fix
This commit is contained in:
@@ -125,3 +125,31 @@
|
||||
new_scryer.update_appearance(UPDATE_NAME)
|
||||
|
||||
spawned.equip_to_slot_or_del(new_scryer, ITEM_SLOT_NECK, initial = FALSE)
|
||||
|
||||
/datum/station_trait/darkness
|
||||
name = "Electricity Saving"
|
||||
weight = 5
|
||||
show_in_report = TRUE
|
||||
report_message = "The previous shift's engineers were real stingy with power and left most of the lights off. Hopefully we installed light switches in every room..."
|
||||
blacklist = list(/datum/station_trait/rave)
|
||||
|
||||
/datum/station_trait/darkness/on_round_start()
|
||||
. = ..()
|
||||
for(var/obj/machinery/light_switch/light_switch in SSmachines.get_by_type(/obj/machinery/light_switch))
|
||||
var/turf/our_turf = get_turf(light_switch)
|
||||
if(!is_station_level(our_turf.z))
|
||||
continue
|
||||
|
||||
var/area/switch_area = get_area(light_switch)
|
||||
switch_area.lightswitch = FALSE
|
||||
light_switch.update_icon(UPDATE_ICON)
|
||||
|
||||
for(var/obj/machinery/light/light in switch_area)
|
||||
light.power_change()
|
||||
|
||||
for(var/obj/item/flashlight/lamp/lamp in switch_area)
|
||||
lamp.on = FALSE
|
||||
lamp.update_brightness()
|
||||
|
||||
for(var/turf/simulated/floor/light/floor_light in switch_area)
|
||||
floor_light.toggle_light(FALSE)
|
||||
|
||||
Reference in New Issue
Block a user