Skip to content

Commit

Permalink
Med Vendor Rebalance (#6103)
Browse files Browse the repository at this point in the history
# About the pull request

This PR is a follow up to #5677 and does many things:
- ~~Disables splitting of medical items.~~
- ~~In the case of splints, to avoid splitting them via applying and
removing them, recovered splints are considered contaminated. However,
you can get them to not be deemed contaminated if you form a full stack
with them.~~
- Increases the starting stock of several medical vendors, also shifting
more of the bottles to chem vendors.
- Adds periodic automatic restocking to med linked medical vendors if
they are operable.
- Initializes groundside medical vendors with randomly reduced stock
amounts and reagents (if not on WO mode).
- Disables refilling medical items (as in use 3 splints on a vendor and
get upgraded to 5). Some conveyed to me they would rather lose the
refilling mechanic over the ability to split stacks.
- Autoinjectors and bottles can still be refilled using now internal
reagents tanks in the vendor. If the vendor has a medlink this will
periodically recharge. The UI also displays the reagent amount much like
the chem dispenser does.
- Adds the ability to bulk restock vendors with storage items. Click
drag the pack onto the vendor and all items that can restock the vendor
will be placed in the vendor.
- Adds the ability to bulk restock medical vendors with restock carts
ordered from requisitions. There are two variants: one that restocks the
items and another that restocks the internal reagent tanks. They can be
disassembled with a wrench.
- Adds the ability to restock partial stacks.
- Doubles the starting energy amount for chemical dispensers by
increasing the max energy amount in chem_storage and increasing the
boost gained when a chemical dispenser is connected to the chem_storage.
- Discounts all requisitions medical supplies.
- Enables initial population scaling for blood bags (of note it wasn't
intended these could restock automatically with a medlink; the supply
restock cart does work on them though and I intend to keep this)

This PR also fixes some miscellaneous things:
- Using a item on a medvendor will now try to fill the vendor with that
item (rather than only performing this action with a mouse drop).
- Fixes some of the grammar issues regarding restocking.
- Fixes some unused squad prep vendors that were not properly adding
headsets to their list of items.
- Fixes removing nano splints creating splints with 0 amount.
- Fixes xenos being able to restock vendors.
- Tweaks the alignment of the images of items in vendors to be more
centered vertically.
- Tweaks the widths of tables in vendors.
- Fixes USCM theme vendors not showing alternating backgrounds for odd
rows

**Of note: The restock cart sprites are temporary.**

# Explain why it's good for the game
The ultimate goal of this PR is to remove the infinite quantity of
medical items groundside so there is more pressure on requisitions to
keep groundside supplied. See
https://github.com/orgs/cmss13-devs/projects/6/views/1?pane=issue&itemId=23005516
for a broader picture of the changes that this PR is helping push
towards. I will finalize a design document once the remaining aspects
for requisitions are decided.

It also is a little goofy that a colony that got decimated by a
xenomorph infestation would have fully stocked medical supplies.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Original implementation: https://youtu.be/6ES88Zre6Gg

Revised implementation: https://youtu.be/7Iyy3eKx3Ng

Bulk restocking using inventories: 


https://github.com/cmss13-devs/cmss13/assets/76988376/b9c33693-fe95-410e-8841-d962b052a5fb

Restock carts (temporary sprites for now):


![image](https://github.com/cmss13-devs/cmss13/assets/76988376/1e3e537c-f3a8-4e02-8e55-c97db707748b)

UI polishing:

![image](https://github.com/cmss13-devs/cmss13/assets/76988376/087f2bf2-9b2a-41e2-9786-4e4c6464a397)

![image](https://github.com/cmss13-devs/cmss13/assets/76988376/9bc03db2-f244-47aa-90f9-0ccdf398acf7)

</details>

# Changelog
:cl: Drathek
balance: Increased the starting stock of most medical vendors but shifts
some reagent bottles from weymeds to weychems
balance: Med linked medical vendors will now automatically restock items
(requires 20 minutes from round start) and reagents (no time
requirement) periodically if operable
balance: Groundside medical vendors will now have random stock and
reagents missing if its not WO
balance: Partial medical item stacks can no longer be refilled at
vendors (autoinjectors and bottles can still be refilled pulling from
internal reagent tanks)
balance: Doubles the starting energy for chemical dispensers
balance: Discounts all requisitions medical supplies
ui: Added reagent amount display to vendors that have internal reagent
tanks and tweaked the icon positioning of items slightly
ui: Tweaked table widths in vendors
ui: Fixes USCM theme vendors not showing different backgrounds for odd
rows
qol: Restocking a medvendor manually can now be done with just a click
rather than only via mouse drop
qol: Restocking a vendor can now be performed in bulk from a storage
inventory - click drag the inventory to the vendor and you will restock
all the items you can
add: Vendors can accept partial stacks when restocking - when an item
has a partial quantity for a stack it is denoted with an asterisk
add: Added two restock carts for bulk restocking medical vendors, one
for items and the other for reagents (purchasable from requisitions -
disassemble with a wrench - temporary sprites for now)
fix: Fixed some currently unused squad prep vendors
fix: Removing nano splints on a person no longer creates a 0 amount
normal splint
spellcheck: Tweaked some restock messages and vendor descriptions
/:cl:
  • Loading branch information
Drulikar committed May 15, 2024
1 parent 53344cb commit 71f0806
Show file tree
Hide file tree
Showing 12 changed files with 827 additions and 340 deletions.
32 changes: 26 additions & 6 deletions code/datums/supply_packs/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,31 @@
/obj/item/storage/pill_bottle/peridaxon,
/obj/item/storage/box/pillbottles,
)
cost = 20
cost = 15
containertype = /obj/structure/closet/crate/medical
containername = "medical crate"
group = "Medical"

/datum/supply_packs/medical_restock_cart
name = "medical restock cart"
contains = list(
/obj/structure/restock_cart/medical,
)
cost = 20
containertype = null
containername = "medical restock cart"
group = "Medical"

/datum/supply_packs/medical_reagent_cart
name = "medical reagent restock cart"
contains = list(
/obj/structure/restock_cart/medical/reagent,
)
cost = 20
containertype = null
containername = "medical reagent restock cart"
group = "Medical"

/datum/supply_packs/pillbottle
name = "pill bottle crate (x2 each)"
contains = list(
Expand All @@ -42,7 +62,7 @@
/obj/item/storage/box/pillbottles,
/obj/item/storage/box/pillbottles,
)
cost = 20
cost = 15
containertype = /obj/structure/closet/crate/medical
containername = "medical crate"
group = "Medical"
Expand All @@ -61,7 +81,7 @@
/obj/item/storage/firstaid/adv,
/obj/item/storage/firstaid/adv,
)
cost = 16
cost = 11
containertype = /obj/structure/closet/crate/medical
containername = "medical crate"
group = "Medical"
Expand All @@ -74,7 +94,7 @@
/obj/item/storage/box/bodybags,
/obj/item/storage/box/bodybags,
)
cost = 12
cost = 7
containertype = /obj/structure/closet/crate/medical
containername = "body bag crate"
group = "Medical"
Expand All @@ -86,7 +106,7 @@
/obj/item/bodybag/cryobag,
/obj/item/bodybag/cryobag,
)
cost = 20
cost = 15
containertype = /obj/structure/closet/crate/medical
containername = "stasis bag crate"
group = "Medical"
Expand All @@ -101,7 +121,7 @@
/obj/item/storage/box/masks,
/obj/item/storage/box/gloves,
)
cost = 30
cost = 25
containertype = /obj/structure/closet/crate/secure/surgery
containername = "surgery crate"
access = ACCESS_MARINE_MEDBAY
Expand Down
Loading

0 comments on commit 71f0806

Please sign in to comment.