From eb84caaa90caf02e719afd941230ca85786ad381 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 12 Aug 2015 22:27:29 +0200 Subject: [PATCH] Fix vending machine coin issue/runtime --- code/game/machinery/vending.dm | 8 ++++---- code/modules/mob/living/carbon/human/human.dm | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index fe251b080f8..5dad4ba1170 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -464,11 +464,9 @@ usr << "There is no coin in this machine." return - coin.loc = src.loc - if(!usr.get_active_hand()) - usr.put_in_hands(coin) - usr << "\blue You remove the [coin] from the [src]" + usr.put_in_hands(coin) coin = null + usr << "\blue You remove the [coin] from the [src]" categories &= ~CAT_COIN if (href_list["pay"]) @@ -560,9 +558,11 @@ user << "\blue You successfully pull the coin out before the [src] could swallow it." else user << "\blue You weren't able to pull the coin out fast enough, the machine ate it, string and all." + coin = null qdel(coin) categories &= ~CAT_COIN else + coin = null qdel(coin) categories &= ~CAT_COIN diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 556bacbdf96..d2ad4b9dd71 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -431,7 +431,9 @@ var/armor_block = run_armor_check(affecting, "melee") apply_damage(damage, BRUTE, affecting, armor_block) -/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M) +/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M) + if(!istype(M)) + return 0 for(var/L in M.contents) if(istype(L, /obj/item/weapon/implant/loyalty)) for(var/obj/item/organ/external/O in M.organs)