From b7da2218566490c462f5b62ec84e52999b01e668 Mon Sep 17 00:00:00 2001 From: Leshana Date: Mon, 3 Feb 2020 13:27:45 -0500 Subject: [PATCH] Fixes Runtime in living_vr.dm,428: Cannot read null.name This was happening when null is passed for belly. Now it will print *null* Also fixed root cause (at least one of them). Animals can't have vore attributes enabled when vore_active = 0 because then they don't get a belly. --- .../mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm | 1 + code/modules/vore/eating/living_vr.dm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm index c1cef3831ae..adb180f9fed 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish_vr.dm @@ -69,6 +69,7 @@ icon_dead = "measelshark-dead" meat_amount = 6 //Big fish, tons of meat. Great for feasts. meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/sharkchunk + vore_active = 1 vore_bump_chance = 100 vore_default_mode = DM_HOLD //docile shark vore_capacity = 5 diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 6582a840c46..c70a18d2dd4 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -425,7 +425,7 @@ /mob/living/proc/perform_the_nom(var/mob/living/user, var/mob/living/prey, var/mob/living/pred, var/obj/belly/belly, var/delay) //Sanity if(!user || !prey || !pred || !istype(belly) || !(belly in pred.vore_organs)) - log_debug("[user] attempted to feed [prey] to [pred], via [lowertext(belly.name)] but it went wrong.") + log_debug("[user] attempted to feed [prey] to [pred], via [belly ? lowertext(belly.name) : "*null*"] but it went wrong.") return // The belly selected at the time of noms