Skip to content

Commit

Permalink
[MIRROR] Prevents polymorph using specific mobs for deleting items/pe…
Browse files Browse the repository at this point in the history
…ople (#2280)

* Prevents polymorph using specific mobs for deleting items/people (#81528)

* Prevents polymorph using specific mobs for deleting items/people

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Waterpig <[email protected]>
  • Loading branch information
3 people authored Mar 6, 2024
1 parent 2dbc28e commit 5231af9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 3 additions & 4 deletions code/modules/clothing/belts/polymorph_belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions code/modules/spells/spell_types/shapeshift/_shape_status.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5231af9

Please sign in to comment.