Merge pull request #745 from ArchieBeepBoop/youstolemyheart

Fixes the bloodsucker heart acquisition objective. Heart wrenching.
This commit is contained in:
Dahlular
2020-12-06 13:34:27 -07:00
committed by GitHub
@@ -250,15 +250,15 @@
// WIN CONDITIONS?
/datum/objective/bloodsucker/heartthief/check_completion()
// -Must have a body.
if (!owner.current)
if(!owner.current)
return FALSE
// Taken from /steal in objective.dm
var/list/all_items = owner.current.GetAllContents() // Includes items inside other items.
var/itemcount = FALSE
for(var/obj/I in all_items) //Check for items
if(I == /obj/item/organ/heart)
itemcount ++
if (itemcount >= target_amount) // Got the right amount?
if(istype(I, /obj/item/organ/heart/))
itemcount++
if(itemcount >= target_amount) // Got the right amount?
return TRUE
return FALSE