[MIRROR] Fix capture devices allowing mob actions while inside [MDB IGNORE] (#23638)

* Fix capture devices allowing mob actions while inside (#78243)

## About The Pull Request
This immobilizes and restricts actions from any mob inside a capture
device. Players were abusing this exploit to have a capture device in
their pocket and being able to launch fireballs at will with chaos
magicarp and other fauna.

Any device like a soul shard or guardian does not allow the controlled
mobs to attack from inside their stored containers.

## Why It's Good For The Game
Exploits are bad... m'kay?

## Changelog
🆑
fix: Fix capture devices allowing mob actions while inside
/🆑

* Fix capture devices allowing mob actions while inside

---------

Co-authored-by: Tim <timothymtorres@gmail.com>
This commit is contained in:
SkyratBot
2023-09-11 15:02:43 -07:00
committed by GitHub
co-authored by Tim
parent 51ff3ada9e
commit 21bb97eaad
@@ -209,9 +209,13 @@ Slimecrossing Items
else
to_chat(user, span_warning("The device is empty..."))
/obj/item/capturedevice/proc/store(mob/living/M)
M.forceMove(src)
/obj/item/capturedevice/proc/store(mob/living/pokemon)
pokemon.forceMove(src)
pokemon.add_traits(list(TRAIT_IMMOBILIZED, TRAIT_HANDS_BLOCKED), ABSTRACT_ITEM_TRAIT)
pokemon.cancel_camera()
/obj/item/capturedevice/proc/release()
for(var/atom/movable/M in contents)
M.forceMove(get_turf(loc))
for(var/mob/living/pokemon in contents)
pokemon.forceMove(get_turf(loc))
pokemon.remove_traits(list(TRAIT_IMMOBILIZED, TRAIT_HANDS_BLOCKED), ABSTRACT_ITEM_TRAIT)
pokemon.cancel_camera()