Skip to content

Commit

Permalink
remove stop_pulling change
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Nov 7, 2023
1 parent 3a2e62f commit c8198f8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 27 deletions.
25 changes: 0 additions & 25 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -513,31 +513,6 @@

return do_pull(AM, lunge, no_msg)

/mob/proc/stop_pulling()
if(pulling)
var/mob/M = pulling
pulling.pulledby = null
pulling = null

grab_level = 0
if(client)
client.recalculate_move_delay()
// When you stop pulling a mob after you move a tile with it your next movement will still include
// the grab delay so we have to fix it here (we love code)
client.next_movement = world.time + client.move_delay
if(hud_used && hud_used.pull_icon)
hud_used.pull_icon.icon_state = "pull0"
if(istype(r_hand, /obj/item/grab))
temp_drop_inv_item(r_hand)
else if(istype(l_hand, /obj/item/grab))
temp_drop_inv_item(l_hand)
if(istype(M))
if(M.client)
//resist_grab uses long movement cooldown durations to prevent message spam
//so we must undo it here so the victim can move right away
M.client.next_movement = world.time
M.update_transform(TRUE)
M.update_canmove()

/mob/living/vv_get_header()
. = ..()
Expand Down
27 changes: 25 additions & 2 deletions code/modules/mob/mob_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,32 @@



/mob/verb/stop_pulling_verb()
/mob/verb/stop_pulling()

set name = "Stop Pulling"
set category = "IC"

stop_pulling()
if(pulling)
var/mob/M = pulling
pulling.pulledby = null
pulling = null

grab_level = 0
if(client)
client.recalculate_move_delay()
// When you stop pulling a mob after you move a tile with it your next movement will still include
// the grab delay so we have to fix it here (we love code)
client.next_movement = world.time + client.move_delay
if(hud_used && hud_used.pull_icon)
hud_used.pull_icon.icon_state = "pull0"
if(istype(r_hand, /obj/item/grab))
temp_drop_inv_item(r_hand)
else if(istype(l_hand, /obj/item/grab))
temp_drop_inv_item(l_hand)
if(istype(M))
if(M.client)
//resist_grab uses long movement cooldown durations to prevent message spam
//so we must undo it here so the victim can move right away
M.client.next_movement = world.time
M.update_transform(TRUE)
M.update_canmove()

0 comments on commit c8198f8

Please sign in to comment.