Skip to content

Commit

Permalink
Bugfix: Reagent Canister Nullspace (#4491)
Browse files Browse the repository at this point in the history
# About the pull request

Removing the container from a reagent canister with your hands full
would cause the container to be nullspaced. Now it is instead dropped on
the floor.

Fixes #4445

# Testing Photographs and Procedure

<details>
<summary>Screenshots & Videos</summary>


https://github.com/cmss13-devs/cmss13/assets/59719612/c2187a7d-95e9-4fc2-9a42-3ee7b0192b02

</details>

# Changelog

:cl: Casper
fix: fixed reagent canister being deleted if ejected with your hands
full
/:cl:
  • Loading branch information
Crowbar764 committed Sep 26, 2023
1 parent 577e5ff commit e8b8481
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/game/objects/items/storage/pouch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,10 @@
to_chat(usr, SPAN_WARNING("There is no container inside this pouch!"))
return

usr.put_in_any_hand_if_possible(inner, disable_warning = TRUE)
var/had_empty_hand = usr.put_in_any_hand_if_possible(inner, disable_warning = TRUE)
if(!had_empty_hand)
usr.drop_inv_item_on_ground(inner)

inner = null
update_icon()

Expand Down

0 comments on commit e8b8481

Please sign in to comment.