Fix runtime in vore_remains if they are mapped in

Also make it more robust to preds not having ckeys or names
This commit is contained in:
Aronai Sieyes
2020-04-05 11:37:57 -04:00
parent b17115a96c
commit b1f0970697
+6 -5
View File
@@ -70,12 +70,13 @@
var/pred_ckey
var/pred_name
/obj/item/weapon/digestion_remains/New(newloc, mob/living/pred)
..(newloc)
pred_ckey = pred.ckey
pred_name = pred.name
/obj/item/weapon/digestion_remains/Initialize(var/mapload, var/mob/living/pred)
. = ..()
if(!mapload)
pred_ckey = pred?.ckey
pred_name = pred?.name
/obj/item/weapon/digestion_remains/attack_self(mob/user)
/obj/item/weapon/digestion_remains/attack_self(var/mob/user)
if(user.a_intent == I_HURT)
to_chat(user,"<span class='warning'>As you squeeze the [name], it crumbles into dust and falls apart into nothing!</span>")
qdel(src)