Fixes construction of lights

This commit is contained in:
Heroman
2019-06-29 07:00:02 +10:00
parent b15f753856
commit 973779f4ba
+4 -2
View File
@@ -30,13 +30,15 @@ var/global/list/light_type_cache = list()
var/fixture_type = /obj/machinery/light
var/sheets_refunded = 2
/obj/machinery/light_construct/New(atom/newloc, obj/machinery/light/fixture = null)
/obj/machinery/light_construct/New(var/atom/newloc, var/newdir, var/building = 0, var/datum/frame/frame_types/frame_type, var/obj/machinery/light/fixture = null)
..(newloc)
if(fixture)
fixture_type = fixture.type
fixture.transfer_fingerprints_to(src)
set_dir(fixture.dir)
stage = 2
else if(newdir)
set_dir(newdir)
update_icon()
/obj/machinery/light_construct/update_icon()
@@ -441,7 +443,7 @@ var/global/list/light_type_cache = list()
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] opens [src]'s casing.", \
"You open [src]'s casing.", "You hear a noise.")
new construct_type(src.loc, src)
new construct_type(src.loc, fixture = src)
qdel(src)
return