[MIRROR] fixes headpikes (#2301)

* fixed it (#55615)

headspikes don't give you a random head when you deconstruct them (except when maploaded)
also they look like they were supposed to with the head impaled

* fixes headpikes

Co-authored-by: spessbro <51048066+spessbro@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-12-24 12:32:16 +01:00
committed by GitHub
co-authored by spessbro
parent b3d074dbd2
commit 74b69af79f
+7 -7
View File
@@ -19,16 +19,16 @@
CheckParts()
/obj/structure/headpike/CheckParts(list/parts_list)
..()
victim = locate(/obj/item/bodypart/head) in parts_list
victim = locate() in parts_list
if(!victim) //likely a mapspawned one
victim = new(src)
victim.real_name = random_unique_name(prob(50))
name = "[victim.real_name] on a spear"
update_icon()
spear = locate(bonespear ? /obj/item/spear/bonespear : /obj/item/spear) in parts_list
if(!spear)
spear = bonespear ? new/obj/item/spear/bonespear(src) : new/obj/item/spear(src)
update_icon()
return ..()
/obj/structure/headpike/Destroy()
QDEL_NULL(victim)
@@ -60,12 +60,12 @@
/obj/structure/headpike/update_overlays()
. = ..()
var/obj/item/bodypart/head/H = locate() in contents
if(H)
if(victim)
var/mutable_appearance/MA = new()
MA.copy_overlays(H)
MA.copy_overlays(victim)
MA.pixel_y = 12
. += H
MA.pixel_x = pixel_x
. += victim
/obj/structure/headpike/attack_hand(mob/user)
. = ..()