Skip to content

Medicinal refiller AKA bottlemed but actually good#80

Draft
2DSiggy wants to merge 34 commits into
funky-station:masterfrom
2DSiggy:Medicinal-Refiller
Draft

Medicinal refiller AKA bottlemed but actually good#80
2DSiggy wants to merge 34 commits into
funky-station:masterfrom
2DSiggy:Medicinal-Refiller

Conversation

@2DSiggy
Copy link
Copy Markdown
Contributor

@2DSiggy 2DSiggy commented Apr 29, 2026

About the PR

Port of space-wizards/space-station-14#40909 to funky. As it was unmerged on upstream, I have placed it in the funky directory.

Why / Balance

From original PR

I disliked how the locker was always just a weird choice to keep your jugs in. Nothing is ordered, but it was easy to access.
Bags and the likes were even worse. And the Fridge doesn't work as well as the chemlocker, being immobile.

So, I decided to add the Medicinal Refiller and Smart Vials!
Begin with the Smart vials. They will remember the last mixture that was added to them. Be it a pure Bicaridine mixture, or a PyraDerm mixture, it'll accurately remember it, EVEN if there is no PyraDerm Jug and you mixed it yourself
Now, right-clicking on the Medical Refiller with either a storage item or a smart vial will reveal a verb to refill your storage/vial (Also accessible via Alt-click).
Doing so will cause the Medicinal Refiller to try to refill your smart vials with their last mixture (with some minor rounding errors.) even if they're in your belt, as long as you used your belt to click on it.

This function doesn't work when it's unanchored, due to it requiring power - However, you can simply lock it with Alt-Click, causing it to anchor down. If you need to move it, either to the chemist or to evac, you can simply unlock it again.

Any interaction with the Medicinal Refiller only works if you have medical access. You cannot take out jugs, unlock or interact with the UI without it. You can still unanchor it with a wrench, funnily enough.

It's intended that doctors now carry a few smart vials with them, and for that, the vials are smaller than normal ones. I don't want to cause a chemist a heartattack because every doctor took 30u chems of each. They're still 15u* each, perfect for a single syringe dosage.
But chemists can rejoice - Due to the UI, they can now at a glance see what needs to be restocked - Or just put another jug into it. The medicinal refiller will automatically switch to the other jug when the first one is empty.

*I changed the 15u vial to 30u. I find it unnecessary to be 15 but it can be adjusted as maints see fit.

My own reasoning for this PR is due to the recent PR on funky that nerfed jugs and other chemical containers to 3x3 and the addition of the in my opinion, lackluster medical chemical dispenser, is as follows. Repost from funky discord.

so, my issue right now with the jug nerf to 3x3 is that it is not actually addressing the issue of why people did not do bottlemed.

Jugmeta exists because it's easy to teach, easy to learn, and is easily organized assuming you're me and you do color coded satchels and keep like things together. Bottlemed is not done at the moment for a few things. Tedium, repetitive tasks that keep you from actually playing the game, and inventory management. I personally used bottlemed but some asshole named scrambleking ruined the method i used for it where i would use cigarette packets to hold bottles. what kind of jerk does that. Anyways, I was able to carry 20 bottles in my belt alongside my syringe, I would store 60u prolib, 60u lentiuri, 60u salbudex, 60u saline, 30u poison chem of the day, 30u epinephrine in packet 1, then salicylicprobital, brui, punc, lace, oxanlenturi, lepo, insuz, pyra, arith, omnizine in packet 2.

This made me able to treat patients immediately instead of what most people do which is the scan, put you on a bed, scan again even though nothing happened, go to locker to pick the chem, walk back, scan, inject routine. I was a fast, useful, and I would say one of the best medics on the server. This isn't about the cigarette packet change though. This is about bottlemed though this is tangential. It is impossible to store a proper amount of chems in bottles in your belt while also carrying topicals. If this is intended I don't exactly find it enjoyable. Expecting bottlemed where people will carry around 20 bottles is not reasonable without some finagling of the system. The current medical belt comes with only 5 slots unoccupied if I remember right.

On the point of Tedium, allow me to paint a small hypothetical. Imagine if, when fixing the tesla or refilling the rad collectors, engineers had to kill the tesla, power down the emitters, weld, turn them back on, and turn on the tesla or the same thing for the singularity. That would frankly be a miserable experience. This is what bottlemed currently is with the current implementation of the medical chem dispenser. You have however many bottles and you need to refill them all manually. Did you use your bottle and you need to refill it but other doctors are using the dispenser? sucks to be you. go rub topicals on people. Did you only use 5u of your bottle and you don't want to use a new bottle that's already full cause then you just have two bottles and one's not full? The chemist isn't making jugs so you can't really do that. There is a solution to this which is the smart vials PR I MIGHT make for forky. IDK. debating on it cause i don't wanna be bullied for "haha qolslop."

I've proposed the smart vial system many times because all it does is provide an automated way to refill your vials at a machine. It's basically just adding a new function to the dispenser that would allow people to keep their things organized in a way that does not detract from intended inconveniences though when I have proposed it, mainly to the person who made the 3x3 jugs, she said she didn't like it and I can't remember if she explained why or not. She might have and I'm just an idiot with a bad memory which is very likely. I was a dick to goobie and I am sorry for it and I should be better.

In general, the Jug change was not going to force bottlemed. You can't nerf jugs into irrelevance. You need to make bottlemed easier to access, teach, and understand. Let's also not forget the domino effect of various antagonists being nerfed by the jug change. Nukie medic, Syndies, other shit.

Technical details

From original PR

Added StorageRequiresAccessSystem and its components.
Added SmartSolutionContainerComponent, RefillSmartContainerComponent and RefillSmartContainerSystem.
Added the Sprites for the vials and medicinal refiller.
Added Machineboards and Lathe Recipes.

The biggest burden is the algorithm of the RefillSystem.
To avoid calling "TryGetSolution" too often, I stored solutions in a list. Solutions get added to that list whenever a jug gets added to the medicinal refiller, and removed in the same way.
The key to the list are the reagent Strings, the values are the solutions of the jugs.
JugSolutions of the same reagent will be grouped.
If a jug has multiple reagents, they have multiple keys - And to avoid grouping issues, they're always sorted alphabetically.

When it tries to refill a reagent mixture, it'll look up the previous mixture on the smart vial. Then it'll check if it can mix it itself with pure jugs, then checks if there is a jug with the mixture already premade. If yes, it'll take the solution from that jug, if not, it'll mix the mixture itself from the pure jugs.

The verbs also take into account your access and will be greyed out if you do not have access.
The Medicinal Refiller is technically a Deployable Barrier. Funny.

Media

From original PR

Oh fuck me. This will take time.

RefillWithStorage.Showcase.mp4
Verbs.Showcase.mp4
RefillwithVial.Showcase.mp4
Access.and.Lock.Showcase.mp4

Requirements

  • I have read and am following the Pull Request and Changelog Guidelines.
  • I have added media to this PR or it does not require an in-game showcase.
  • If I am porting something, I have done my best to respect the appropriate licenses associated with the presented changes.

License

MIT

Breaking changes

Changelog

🆑

  • add: Added a Medicinal Refiller for your chemical storage needs!
  • add: Added smart vials to work in tandem, providing easy refills on your medicine!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

RSI Diff Bot; head commit c1c2a90 merging into a6111f9
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Objects/Specific/Chemistry/vial.rsi

State Old New Status
icon_empty Modified
icon_open Modified
inhand-left Modified
inhand-right Modified
vial Modified

Resources/Textures/Objects/Specific/Chemistry/vial_mini.rsi

State Old New Status
icon_empty Modified
icon_open Modified
inhand-left Modified
inhand-right Modified

Resources/Textures/_Funkystation/Structures/Machines/Medical/medicinal_refiller.rsi

State Old New Status
base Added

Edit: diff updated after c1c2a90

@2DSiggy
Copy link
Copy Markdown
Contributor Author

2DSiggy commented Apr 29, 2026

yamlinter is mad saying theres a dupe prototype of some shit but i don't know what the fuck its on so i'll fix it later.

@2DSiggy
Copy link
Copy Markdown
Contributor Author

2DSiggy commented Apr 30, 2026

now theres issues with sprites i'm gonna fucking scream

@Scrambledking
Copy link
Copy Markdown

A much better system than current bottle med, based off of conversations about borg integration it will also work far better for them too.

@2DSiggy 2DSiggy marked this pull request as draft May 10, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants