Skip to content

Commit

Permalink
Fix putting someone into a machinery with active grab (ParadiseSS13#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
m-dzianishchyts authored Feb 20, 2024
1 parent f605c48 commit cc0014e
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 9 deletions.
1 change: 1 addition & 0 deletions code/game/dna/dna_modifier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
put_in(L)
if(user.pulling == L)
user.stop_pulling()
QDEL_LIST_CONTENTS(L.grabbed_by)
return TRUE

/obj/machinery/dna_scannernew/attackby(obj/item/I, mob/user, params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
return TRUE
visible_message("<span class='notice'>[user] puts [target] into [src].</span>")

QDEL_LIST_CONTENTS(target.grabbed_by)
target.forceMove(src)
occupant = target
flash = "Machine ready."
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/Sleeper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@
add_fingerprint(user)
if(user.pulling == L)
user.stop_pulling()
QDEL_LIST_CONTENTS(L.grabbed_by)
SStgui.update_uis(src)

/obj/machinery/sleeper/proc/permitted_check(atom/movable/O, mob/user)
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/adv_med.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
else
visible_message("[user] puts [H] into the body scanner.")

QDEL_LIST_CONTENTS(H.grabbed_by)
H.forceMove(src)
occupant = H
playsound(src, 'sound/machines/podclose.ogg', 5)
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@
return
if(!E)
return
QDEL_LIST_CONTENTS(E.grabbed_by)
E.forceMove(src)
time_till_despawn = initial(time_till_despawn) / willing_factor
icon_state = occupied_icon_state
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/rechargestation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
return

target.stop_pulling()
QDEL_LIST_CONTENTS(target.grabbed_by)
target.forceMove(src)
occupant = target

Expand Down
21 changes: 12 additions & 9 deletions code/game/machinery/suit_storage_unit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -449,15 +449,18 @@
return TRUE

/obj/machinery/suit_storage_unit/proc/put_in(mob/user, mob/living/target)
if(do_mob(user, target, 30))
if(occupant || helmet || suit || storage)
return
if(target == user)
user.visible_message("<span class='warning'>[user] slips into [src] and closes the door behind [user.p_them()]!</span>", "<span class='notice'>You slip into [src]'s cramped space and shut its door.</span>")
else
target.visible_message("<span class='warning'>[user] pushes [target] into [src] and shuts its door!<span>", "<span class='userdanger'>[user] shoves you into [src] and shuts the door!</span>")
close_machine(target)
add_fingerprint(user)
if(!do_mob(user, target, 30))
return
if(occupant || helmet || suit || storage)
return
if(target == user)
user.visible_message("<span class='warning'>[user] slips into [src] and closes the door behind [user.p_them()]!</span>", "<span class='notice'>You slip into [src]'s cramped space and shut its door.</span>")
else
target.visible_message("<span class='warning'>[user] pushes [target] into [src] and shuts its door!<span>", "<span class='userdanger'>[user] shoves you into [src] and shuts the door!</span>")
close_machine(target)
if(occupant == target)
QDEL_LIST_CONTENTS(target.grabbed_by)
add_fingerprint(user)

/obj/machinery/suit_storage_unit/proc/cook()
if(uv_cycles)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
add_attack_logs(user, L, "put into a cryo cell at [COORD(src)].", ATKLOG_ALL)
if(user.pulling == L)
user.stop_pulling()
QDEL_LIST_CONTENTS(L.grabbed_by)
SStgui.update_uis(src)
return TRUE

Expand Down
1 change: 1 addition & 0 deletions code/modules/food_and_drinks/kitchen_machinery/gibber.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
user.visible_message("<span class='danger'>[user] stuffs [victim] into [src]!</span>")
else
return
QDEL_LIST_CONTENTS(victim.grabbed_by)
victim.forceMove(src)
occupant = victim

Expand Down
1 change: 1 addition & 0 deletions code/modules/recycling/disposal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@
add_attack_logs(user, target, "Disposal'ed", !!target.ckey ? null : ATKLOG_ALL)
else
return
QDEL_LIST_CONTENTS(target.grabbed_by)
target.forceMove(src)

for(var/mob/C in viewers(src))
Expand Down

0 comments on commit cc0014e

Please sign in to comment.