Skip to content

Commit

Permalink
cleanup grab things (#670)
Browse files Browse the repository at this point in the history
* cleanup grab things

* oops
  • Loading branch information
Kapu1178 authored Nov 22, 2023
1 parent 5d6e389 commit e0fa85f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 7 additions & 6 deletions code/modules/grab/grab_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@

// Resolve to the 'topmost' atom in the buckle chain, as grabbing someone buckled to something tends to prevent further interaction.
var/atom/movable/original_target = target
var/mob/grabbing_mob = (ismob(target) && target)
if(ismob(target))
var/mob/grabbed_mob = target

while(istype(grabbing_mob) && grabbing_mob.buckled)
grabbing_mob = grabbing_mob.buckled
while(ismob(grabbed_mob) && grabbed_mob.buckled)
grabbed_mob = grabbed_mob.buckled

if(grabbing_mob && grabbing_mob != original_target)
target = grabbing_mob
to_chat(src, span_warning("As \the [original_target] is buckled to \the [target], you try to grab that instead!"))
if(grabbed_mob && grabbed_mob != original_target)
target = grabbed_mob
to_chat(src, span_warning("As \the [original_target] is buckled to \the [target], you try to grab that instead!"))

if(!istype(target))
return
Expand Down
1 change: 0 additions & 1 deletion code/modules/grab/grab_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
if(!buckled_grab_check(grabber))
return FALSE
if(anchored)
to_chat(grabber, span_warning("\The [src] won't budge!"))
return FALSE
if(throwing)
return FALSE
Expand Down

0 comments on commit e0fa85f

Please sign in to comment.