Skip to content

Commit

Permalink
[S] Fixes a matter eater exploit (#25500)
Browse files Browse the repository at this point in the history
* adjacent

* add spaces

* double precautions

* wrong else
  • Loading branch information
BiancaWilkson authored May 16, 2024
1 parent baedfbf commit 52d8708
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions code/game/dna/mutations/mutation_powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@
return

var/atom/movable/the_item = targets[1]
if(!user.Adjacent(the_item))
to_chat(user, "<span class='danger'>You need to be next to [the_item] for this!</span>")
return FALSE
if(ishuman(the_item))
var/mob/living/carbon/human/H = the_item
var/obj/item/organ/external/limb = H.get_organ(user.zone_selected)
Expand All @@ -412,15 +415,14 @@
revert_cast()
return FALSE
user.visible_message("<span class='danger'>[user] begins stuffing [the_item]'s [limb.name] into [user.p_their()] gaping maw!</span>")
var/oldloc = H.loc
if(!do_mob(user,H,EAT_MOB_DELAY))
if(!do_mob(user, H, EAT_MOB_DELAY))
to_chat(user, "<span class='danger'>You were interrupted before you could eat [the_item]!</span>")
else
if(!limb || !H)
return
if(H.loc != oldloc)
to_chat(user, "<span class='danger'>\The [limb] moved away from your mouth!</span>")
return
if(!user.Adjacent(the_item))
to_chat(user, "<span class='danger'>You need to be next to [the_item] for this!</span>")
return FALSE
user.visible_message("<span class='danger'>[user] [pick("chomps","bites")] off [the_item]'s [limb]!</span>")
playsound(user.loc, 'sound/items/eatfood.ogg', 50, 0)

Expand Down

0 comments on commit 52d8708

Please sign in to comment.