Files
Bubberstation/code/game/objects/items/storage/boxes/medical_boxes.dm
MrMelbert 12afcb911e Comprehensive cleanup of storage datum, replaces the weakrefs with just refs (because they were managed already) (#81120)
## About The Pull Request

- Large amount of storage datum cleanup.
   - Documentation.
   - Maybe more consistent use of parent vs real_location. 
   - Removes the weakrefs, replaces it with just references.
      - These were already managed references anyways so why bother?
- Removes a bunch of arguments no one used and would ever used so only
the most useful args are left.
 
- Some bugfixes. 

## Why It's Good For The Game

Aiming to make storage easier to work with. The whole intent of this was
to bugfix the whole "weight class" thing that keeps popping up but I had
to do this first.

## Changelog

🆑 Melbert
fix: When placing an item into storage (such as backpacks), all nearby
mobs now get a message, rather than just the first mob.
fix: TGC decks of cards should act a bit less odd when looking inside.  
refactor: Refactored a bit of storage, cleaned up a fair bit of its
code. Let me know if you notice anything funky about storage (like
backpacks).
/🆑
2024-02-05 11:42:03 -08:00

171 lines
5.5 KiB
Plaintext

// This file contains all boxes used by the Medical department, or otherwise associated with the task of mob interactions.
/obj/item/storage/box/syringes
name = "box of syringes"
desc = "A box full of syringes."
illustration = "syringe"
/obj/item/storage/box/syringes/PopulateContents()
for(var/i in 1 to 7)
new /obj/item/reagent_containers/syringe(src)
/obj/item/storage/box/syringes/variety
name = "syringe variety box"
/obj/item/storage/box/syringes/variety/PopulateContents()
new /obj/item/reagent_containers/syringe(src)
new /obj/item/reagent_containers/syringe/lethal(src)
new /obj/item/reagent_containers/syringe/piercing(src)
new /obj/item/reagent_containers/syringe/bluespace(src)
/obj/item/storage/box/medipens
name = "box of medipens"
desc = "A box full of epinephrine MediPens."
illustration = "epipen"
/obj/item/storage/box/medipens/PopulateContents()
for(var/i in 1 to 7)
new /obj/item/reagent_containers/hypospray/medipen(src)
/obj/item/storage/box/medipens/utility
name = "stimpack value kit"
desc = "A box with several stimpack medipens for the economical miner."
illustration = "epipen"
/obj/item/storage/box/medipens/utility/PopulateContents()
..() // includes regular medipens.
for(var/i in 1 to 5)
new /obj/item/reagent_containers/hypospray/medipen/stimpack(src)
/obj/item/storage/box/beakers
name = "box of beakers"
illustration = "beaker"
/obj/item/storage/box/beakers/PopulateContents()
for(var/i in 1 to 7)
new /obj/item/reagent_containers/cup/beaker( src )
/obj/item/storage/box/beakers/bluespace
name = "box of bluespace beakers"
illustration = "beaker"
/obj/item/storage/box/beakers/bluespace/PopulateContents()
for(var/i in 1 to 7)
new /obj/item/reagent_containers/cup/beaker/bluespace(src)
/obj/item/storage/box/beakers/variety
name = "beaker variety box"
/obj/item/storage/box/beakers/variety/PopulateContents()
new /obj/item/reagent_containers/cup/beaker(src)
new /obj/item/reagent_containers/cup/beaker/bluespace(src)
new /obj/item/reagent_containers/cup/beaker/large(src)
new /obj/item/reagent_containers/cup/beaker/meta(src)
new /obj/item/reagent_containers/cup/beaker/noreact(src)
new /obj/item/reagent_containers/cup/beaker/plastic(src)
/obj/item/storage/box/medigels
name = "box of medical gels"
desc = "A box full of medical gel applicators, with unscrewable caps and precision spray heads."
illustration = "medgel"
/obj/item/storage/box/medigels/PopulateContents()
for(var/i in 1 to 7)
new /obj/item/reagent_containers/medigel( src )
/obj/item/storage/box/injectors
name = "box of DNA injectors"
desc = "This box contains injectors, it seems."
illustration = "dna"
/obj/item/storage/box/injectors/PopulateContents()
var/static/items_inside = list(
/obj/item/dnainjector/h2m = 3,
/obj/item/dnainjector/m2h = 3,
)
generate_items_inside(items_inside,src)
/obj/item/storage/box/bodybags
name = "body bags"
desc = "The label indicates that it contains body bags."
illustration = "bodybags"
/obj/item/storage/box/bodybags/PopulateContents()
..()
for(var/i in 1 to 7)
new /obj/item/bodybag(src)
/obj/item/storage/box/pillbottles
name = "box of pill bottles"
desc = "It has pictures of pill bottles on its front."
illustration = "pillbox"
/obj/item/storage/box/pillbottles/PopulateContents()
for(var/i in 1 to 7)
new /obj/item/storage/pill_bottle(src)
/obj/item/storage/box/plumbing/PopulateContents()
var/list/items_inside = list(
/obj/item/stock_parts/water_recycler = 2,
/obj/item/stack/ducts/fifty = 1,
/obj/item/stack/sheet/iron/ten = 1,
)
generate_items_inside(items_inside, src)
/obj/item/storage/box/evilmeds
name = "box of premium medicine"
desc = "Contains a large number of beakers filled with premium medical supplies. Straight from Interdyne Pharmaceutics!"
icon_state = "syndiebox"
illustration = "beaker"
/obj/item/storage/box/evilmeds/PopulateContents()
var/static/list/items_inside = list(
/obj/item/reagent_containers/cup/beaker/meta/omnizine = 1,
/obj/item/reagent_containers/cup/beaker/meta/sal_acid = 1,
/obj/item/reagent_containers/cup/beaker/meta/oxandrolone = 1,
/obj/item/reagent_containers/cup/beaker/meta/pen_acid = 1,
/obj/item/reagent_containers/cup/beaker/meta/atropine = 1,
/obj/item/reagent_containers/cup/beaker/meta/salbutamol = 1,
/obj/item/reagent_containers/cup/beaker/meta/rezadone = 1,
)
generate_items_inside(items_inside, src)
/obj/item/storage/box/bandages
name = "box of bandages"
desc = "A box of DeForest brand gel bandages designed to treat blunt-force trauma."
icon_state = "brutebox"
base_icon_state = "brutebox"
inhand_icon_state = "brutebox"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
drop_sound = 'sound/items/handling/matchbox_drop.ogg'
pickup_sound = 'sound/items/handling/matchbox_pickup.ogg'
illustration = null
w_class = WEIGHT_CLASS_SMALL
custom_price = PAYCHECK_CREW * 1.75
/obj/item/storage/box/bandages/Initialize(mapload)
. = ..()
atom_storage.max_slots = 6
atom_storage.set_holdable(list(
/obj/item/stack/medical/bandage,
/obj/item/reagent_containers/pill,
/obj/item/reagent_containers/pill/patch,
))
/obj/item/storage/box/bandages/PopulateContents()
for(var/i in 1 to 5)
new /obj/item/stack/medical/bandage(src)
/obj/item/storage/box/bandages/update_icon_state()
. = ..()
switch(length(contents))
if(5)
icon_state = "[base_icon_state]_f"
if(3 to 4)
icon_state = "[base_icon_state]_almostfull"
if(1 to 2)
icon_state = "[base_icon_state]_almostempty"
if(0)
icon_state = base_icon_state