mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-08 16:32:21 +00:00
Fix newly constructed lights always having cells
This commit is contained in:
@@ -272,13 +272,14 @@ var/global/list/light_type_cache = list()
|
||||
|
||||
/obj/machinery/light/flamp/New(atom/newloc, obj/machinery/light_construct/construct = null)
|
||||
..(newloc, construct)
|
||||
|
||||
if(start_with_cell && !no_emergency)
|
||||
cell = new/obj/item/weapon/cell/emergency_light(src)
|
||||
if(construct)
|
||||
start_with_cell = FALSE
|
||||
lamp_shade = 0
|
||||
update_icon()
|
||||
else
|
||||
if(start_with_cell && !no_emergency)
|
||||
cell = new/obj/item/weapon/cell/emergency_light(src)
|
||||
|
||||
|
||||
/obj/machinery/light/flamp/flicker
|
||||
auto_flicker = TRUE
|
||||
@@ -302,8 +303,6 @@ var/global/list/light_type_cache = list()
|
||||
/obj/machinery/light/New(atom/newloc, obj/machinery/light_construct/construct = null)
|
||||
..(newloc)
|
||||
|
||||
if(start_with_cell && !no_emergency)
|
||||
cell = new/obj/item/weapon/cell/emergency_light(src)
|
||||
if(construct)
|
||||
start_with_cell = FALSE
|
||||
status = LIGHT_EMPTY
|
||||
@@ -311,6 +310,8 @@ var/global/list/light_type_cache = list()
|
||||
construct.transfer_fingerprints_to(src)
|
||||
set_dir(construct.dir)
|
||||
else
|
||||
if(start_with_cell && !no_emergency)
|
||||
cell = new/obj/item/weapon/cell/emergency_light(src)
|
||||
var/obj/item/weapon/light/L = get_light_type_instance(light_type)
|
||||
update_from_bulb(L)
|
||||
if(prob(L.broken_chance))
|
||||
|
||||
Reference in New Issue
Block a user