Skip to content

Commit

Permalink
pill packets lovin time
Browse files Browse the repository at this point in the history
  • Loading branch information
Nomoresolvalou committed Aug 20, 2024
1 parent 1503ecb commit 92752d4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions code/game/machinery/vending/vendor_types/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@
list("Beaker (60 Units)", floor(scale * 3), /obj/item/reagent_container/glass/beaker, VENDOR_ITEM_REGULAR),
list("Beaker, Large (120 Units)", floor(scale * 3), /obj/item/reagent_container/glass/beaker/large, VENDOR_ITEM_REGULAR),
list("Box of Pill Bottles", floor(scale * 2), /obj/item/storage/box/pillbottles, VENDOR_ITEM_REGULAR),
list("Box of Pill Packets", floor(scale * 2), /obj/item/storage/box/pillbottles/pillpackets, VENDOR_ITEM_REGULAR),
list("Dropper", floor(scale * 3), /obj/item/reagent_container/dropper, VENDOR_ITEM_REGULAR),
list("Syringe", floor(scale * 7), /obj/item/reagent_container/syringe, VENDOR_ITEM_REGULAR)
)
Expand Down
13 changes: 13 additions & 0 deletions code/game/objects/items/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,19 @@
new /obj/item/storage/pill_bottle( src )
new /obj/item/storage/pill_bottle( src )

/obj/item/storage/box/pillbottles/pillpackets
name = "box of pill packets"
desc = "it has pictures of pill packets on its front."
icon_state = "pillpacket_box"

/obj/item/storage/box/pillbottles/pillpackets/fill_preset_inventory()
new /obj/item/storage/pill_bottle/packet( src )
new /obj/item/storage/pill_bottle/packet( src )
new /obj/item/storage/pill_bottle/packet( src )
new /obj/item/storage/pill_bottle/packet( src )
new /obj/item/storage/pill_bottle/packet( src )
new /obj/item/storage/pill_bottle/packet( src )
new /obj/item/storage/pill_bottle/packet( src )

/obj/item/storage/box/snappops
name = "snap pop box"
Expand Down
16 changes: 15 additions & 1 deletion code/modules/reagents/chemistry_machinery/chem_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
var/vial_maker = FALSE
var/obj/item/reagent_container/beaker = null
var/obj/item/storage/pill_bottle/loaded_pill_bottle = null
var/is_packet = FALSE
var/mode = 0
var/condi = 0
var/useramount = 30 // Last used amount
Expand Down Expand Up @@ -86,7 +87,14 @@

loaded_pill_bottle = B
user.drop_inv_item_to_loc(B, src)
to_chat(user, SPAN_NOTICE("You add the pill bottle into the dispenser slot!"))
if(istype(B, /obj/item/storage/pill_bottle/packet))
is_packet = TRUE
pillamount = 4
to_chat(user, SPAN_NOTICE("You add the pill packet into the dispenser slot!"))

else
is_packet = FALSE
to_chat(user, SPAN_NOTICE("You add the pill bottle into the dispenser slot!"))
updateUsrDialog()
return

Expand Down Expand Up @@ -124,6 +132,7 @@
loaded_pill_bottle.forceMove(loc)

loaded_pill_bottle = null
pillamount = 16

// Adding a name to the currently stored pill bottle
if(href_list["addlabelp"])
Expand All @@ -149,6 +158,11 @@
if(!Adjacent(usr))
return

if(is_packet)
to_chat(user, SPAN_WARNING("You cannot change the color of pill packets."))
updateUsrDialog()
return

loaded_pill_bottle.choose_color()

else if(href_list["close"])
Expand Down
Binary file modified icons/obj/items/storage.dmi
Binary file not shown.

0 comments on commit 92752d4

Please sign in to comment.