From 3d24bc0f08eeeb5d5fe788ea49a8f957ba2bbc4d Mon Sep 17 00:00:00 2001 From: MrDoomBringer Date: Fri, 26 Oct 2018 16:03:09 -0400 Subject: [PATCH] Prevents blob overminds, sentient diseases, etc. from dumping out boxes (#40823) * nerf boxes * uuh i think i see what you mean. hows this * shuffles it over to mob.dm * asdf * hows this * ooga * i should probably rebase * t * cheaper and stronger unlike me * aaaaa * does the thing with the words --- code/datums/components/storage/storage.dm | 2 +- code/modules/mob/camera/camera.dm | 3 +++ code/modules/mob/dead/dead.dm | 3 +++ code/modules/mob/living/living.dm | 5 +++++ code/modules/mob/mob.dm | 3 +++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 1531092d004..1a6f183254a 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -233,7 +233,7 @@ /datum/component/storage/proc/quick_empty(mob/M) var/atom/A = parent - if((!ishuman(M) && (A.loc != M)) || (M.stat != CONSCIOUS) || M.incapacitated()) + if(!M.canUseStorage() || !A.Adjacent(M) || M.incapacitated()) return if(locked) to_chat(M, "[parent] seems to be locked!") diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm index 5e3b8529266..dffaf9e4e7b 100644 --- a/code/modules/mob/camera/camera.dm +++ b/code/modules/mob/camera/camera.dm @@ -31,5 +31,8 @@ loc = destination Moved(oldloc, NONE, TRUE) +/mob/camera/canUseStorage() + return FALSE + /mob/camera/emote(act, m_type=1, message = null, intentional = FALSE) return diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index e0ccf68b7dc..bbf390f2be4 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -21,6 +21,9 @@ INITIALIZE_IMMEDIATE(/mob/dead) set_focus(src) return INITIALIZE_HINT_NORMAL +/mob/dead/canUseStorage() + return FALSE + /mob/dead/dust(just_ash, drop_items, force) //ghosts can't be vaporised. return diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 33c34d95a49..f10f3297496 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -311,6 +311,11 @@ if(stat || IsUnconscious() || IsStun() || IsParalyzed() || (check_immobilized && IsImmobilized()) || (!ignore_restraints && restrained(ignore_grab))) return TRUE +/mob/living/canUseStorage() + if (get_num_arms() <= 0) + return FALSE + return TRUE + /mob/living/proc/InCritical() return (health <= crit_threshold && (stat == SOFT_CRIT || stat == UNCONSCIOUS)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4308c96bdeb..dc7efd1baa2 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -770,6 +770,9 @@ /mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) return +/mob/proc/canUseStorage() + return FALSE + /mob/proc/faction_check_mob(mob/target, exact_match) if(exact_match) //if we need an exact match, we need to do some bullfuckery. var/list/faction_src = faction.Copy()