From d6f3caa2ac0cd8d80762d72ef48453b2dd5025c7 Mon Sep 17 00:00:00 2001 From: Cameron653 Date: Thu, 1 Dec 2016 22:14:07 -0500 Subject: [PATCH] Makes it so mobs aren't given reagent lists. Should fix #732 --- code/modules/vore/eating/belly_vr.dm | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/code/modules/vore/eating/belly_vr.dm b/code/modules/vore/eating/belly_vr.dm index ac2032bdb2..9ca4f6c991 100644 --- a/code/modules/vore/eating/belly_vr.dm +++ b/code/modules/vore/eating/belly_vr.dm @@ -131,8 +131,8 @@ M.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner. src.internal_contents -= M // Remove from the belly contents - if(istype(M,/mob/living)) - var/mob/living/ML = M + if(istype(M,/mob/living/carbon/human)) //To prevent giving mobs a reagent list, which caused runtimes + var/mob/living/carbon/human/ML = M if(ML.absorbed) ML.absorbed = 0 ML.reagents = new/datum/reagents(1000,M) //Human reagent datums hold 1000 @@ -144,6 +144,15 @@ OR.trans_to(ML,OR.total_volume / absorbed_count) + else if(istype(M,/mob/living)) //If they're not human but are a mob + var/mob/living/MO = M + if(MO.absorbed) + MO.absorbed = 0 + var/absorbed_count = 2 + for(var/mob/living/P in internal_contents) + if(P.absorbed) + absorbed_count++ + var/datum/belly/B = check_belly(owner) if(B) B.internal_contents += M @@ -315,12 +324,12 @@ owner << "Your [name] absorbs [M]'s body, making them part of you." //Reagent sharing for absorbed with pred - var/datum/reagents/OR = owner.reagents - var/datum/reagents/PR = M.reagents - - PR.trans_to(owner,PR.total_volume) - M.reagents = OR - del(PR) + if(istype(M,/mob/living/carbon/human)) + var/datum/reagents/OR = owner.reagents + var/datum/reagents/PR = M.reagents + PR.trans_to(owner,PR.total_volume) + M.reagents = OR + del(PR) //This is probably already the case, but for sub-prey, it won't be. M.forceMove(owner)