From 2907da264f8a4de5245c26d2ada61fbfc3ebe6b9 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Sat, 27 Jan 2018 14:46:50 -0500 Subject: [PATCH] Fixes #4643 --- code/_helpers/mobs.dm | 16 ++++++++++++++++ code/modules/mob/living/carbon/give.dm | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index 4bd85ac182..e1215bb901 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -248,3 +248,19 @@ Proc for attack log creation, because really why not if (progbar) qdel(progbar) + +/atom/proc/living_mobs(var/range = world.view) + var/list/viewers = oviewers(src,range) + var/list/living = list() + for(var/mob/living/L in viewers) + living += L + + return living + +/atom/proc/human_mobs(var/range = world.view) + var/list/viewers = oviewers(src,range) + var/list/humans = list() + for(var/mob/living/carbon/human/H in viewers) + humans += H + + return humans diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 6b07140211..5d11e2a529 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/human/verb/give(var/mob/living/carbon/target in view(1)-usr) +/mob/living/carbon/human/verb/give(var/mob/living/carbon/target in living_mobs(1)) set category = "IC" set name = "Give"