Skip to content

Commit

Permalink
Merge branch 'master' into secfire
Browse files Browse the repository at this point in the history
  • Loading branch information
benbot16 authored Sep 1, 2024
2 parents fe4fd4e + 41cd77c commit e7c2786
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions code/game/objects/items/storage/firstaid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,24 @@
storage_flags = STORAGE_FLAGS_BOX
display_maptext = FALSE

/obj/item/storage/pill_bottle/packet/Initialize()
. = ..()
RegisterSignal(src, COMSIG_ITEM_DROPPED, PROC_REF(try_forced_folding))

/obj/item/storage/pill_bottle/packet/proc/try_forced_folding(datum/source, mob/user)
SIGNAL_HANDLER

if(!isturf(loc))
return

if(locate(/obj/item/reagent_container/pill) in src)
return

UnregisterSignal(src, COMSIG_ITEM_DROPPED)
storage_close(user)
to_chat(user, SPAN_NOTICE("You throw away [src]."))
qdel(src)

/obj/item/storage/pill_bottle/packet/tricordrazine
name = "Tricordazine pill packet"
icon_state = "tricordrazine_packet"
Expand Down
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-7060.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "hislittlecuzingames"
delete-after: True
changes:
- qol: "Deletes empty pill packets when dropped."

0 comments on commit e7c2786

Please sign in to comment.