From 5231af999ae2543f679f15476ea15fcd44673db6 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Wed, 6 Mar 2024 21:40:26 +0300 Subject: [PATCH] [MIRROR] Prevents polymorph using specific mobs for deleting items/people (#2280) * Prevents polymorph using specific mobs for deleting items/people (#81528) * Prevents polymorph using specific mobs for deleting items/people --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com> --- code/modules/clothing/belts/polymorph_belt.dm | 7 +++---- .../modules/spells/spell_types/shapeshift/_shape_status.dm | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/code/modules/clothing/belts/polymorph_belt.dm b/code/modules/clothing/belts/polymorph_belt.dm index 73959d6d415..fb09b2e68c8 100644 --- a/code/modules/clothing/belts/polymorph_belt.dm +++ b/code/modules/clothing/belts/polymorph_belt.dm @@ -63,10 +63,9 @@ if (target_mob.mob_biotypes & (MOB_HUMANOID|MOB_ROBOTIC|MOB_SPECIAL|MOB_SPIRIT|MOB_UNDEAD)) balloon_alert(user, "incompatible!") return TRUE - if (isanimal_or_basicmob(target_mob)) - if (!target_mob.compare_sentience_type(SENTIENCE_ORGANIC)) - balloon_alert(user, "target too intelligent!") - return TRUE + if (!target_mob.compare_sentience_type(SENTIENCE_ORGANIC)) + balloon_alert(user, "target too intelligent!") + return TRUE if (stored_mob_type == target_mob.type) balloon_alert(user, "already scanned!") return TRUE diff --git a/code/modules/spells/spell_types/shapeshift/_shape_status.dm b/code/modules/spells/spell_types/shapeshift/_shape_status.dm index faa84835255..cffd9804ea5 100644 --- a/code/modules/spells/spell_types/shapeshift/_shape_status.dm +++ b/code/modules/spells/spell_types/shapeshift/_shape_status.dm @@ -189,6 +189,12 @@ // is no longer in control of the shapeshifted mob, such as mindswapping out of a shapeshift if(!QDELETED(source_spell) && source_spell.owner == owner) source_spell.Grant(caster_mob) + if(owner?.contents) + // Prevent round removal and consuming stuff when losing shapeshift + for(var/atom/movable/thing as anything in owner.contents) + if(thing == caster_mob) + continue + thing.forceMove(get_turf(owner)) for(var/datum/action/bodybound_action as anything in owner.actions) if(bodybound_action.target != caster_mob)