From 81f768ea1c29a5ce692bad6385f7e5b454b73714 Mon Sep 17 00:00:00 2001 From: Purpose Date: Sat, 15 Sep 2018 12:58:11 +0100 Subject: [PATCH] Initilizes --- code/game/machinery/floodlight.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 27b0c455296..013be887cce 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -4,18 +4,19 @@ icon_state = "flood00" anchored = FALSE density = TRUE + light_power = 20 var/on = FALSE var/obj/item/stock_parts/cell/high/cell = null var/use = 5 var/unlocked = FALSE var/open = FALSE var/brightness_on = 14 - light_power = 20 -/obj/machinery/floodlight/New() + +/obj/machinery/floodlight/Initialize() + . = ..() src.cell = new(src) - turnOn() - ..() + mapVarInit() /obj/machinery/floodlight/Destroy() QDEL_NULL(cell) @@ -67,7 +68,7 @@ updateicon() -/obj/machinery/floodlight/proc/turnOn() +/obj/machinery/floodlight/proc/mapVarInit() if(on) if(!cell) return