Skip to content

Make chem, booze and soda dispensers work like SS13#74

Open
AitorLogedo wants to merge 2 commits into
Monkestation:masterfrom
AitorLogedo:ss13-dispensers
Open

Make chem, booze and soda dispensers work like SS13#74
AitorLogedo wants to merge 2 commits into
Monkestation:masterfrom
AitorLogedo:ss13-dispensers

Conversation

@AitorLogedo

@AitorLogedo AitorLogedo commented Jul 22, 2026

Copy link
Copy Markdown

About the PR

Reworks the chemical, booze and soda dispensers so they behave like they do in SS13. Instead of holding physical reagent jugs that empty out and have to be restocked, they now generate reagents from a fixed list and pay for it with an internal power cell that recharges from the grid whenever the machine has power. No power means no dispensing.

The cell sits in a normal cell slot, so a dispenser can be upgraded during the round by swapping its cell for a bigger one. A better cell gives both a larger buffer and a faster recharge, since there is no separate manipulator part in this codebase. They spawn with a small cell so there is room to upgrade.

Why / Balance

The jug system meant chemists ran dry mid round and had to drag crates of jugs around, which was mostly busywork. The SS13 style keeps the machine useful the whole round, gives engineering something to improve, and ties the dispensers to station power.

Default tuning lives on ReagentDispenserBase and is easy to change: energyPerUnit: 0.2, rechargeFractionPerSecond: 0.02, starting cell PowerCellSmall. That works out to roughly 1800 units of buffer and 36 units per second of recharge on a small cell, scaling up to the hyper cell (9000 buffer, 180/s).

Technical details

  • ReagentDispenserComponent drops the jug storage and holds a fixed reagentIds list plus the energy tuning fields.
  • ReagentDispenserSystem recharges the installed cell from mains in its update loop, and dispensing generates the reagent and spends cell charge via PowerCellSystem.TryUseCharge.
  • The cell slot has no tag whitelist on purpose: PowerCellSlot already blocks anything without a PowerCellComponent, and a PowerCell tag whitelist would wrongly reject the small cell, which does not carry that tag.
  • UI now shows a charge bar and dispenses by reagent id instead of by jug.
  • Chem, booze and soda share ReagentDispenserBase, so all three get the same treatment. Their reagent lists match what the jugs used to hold.

Test plan

  1. Spawn a ChemDispenser, drop in a beaker and dispense. The charge bar drops and then recharges on its own while powered.
  2. Empty the cell by spamming dispense to see the insufficient charge popup.
  3. Pull the small cell straight out (no screwdriver needed) and pop in a PowerCellHyper: bigger buffer, much faster recharge.
  4. Cut power to the machine and confirm it stops dispensing.
  5. Repeat on a booze and a soda dispenser.

Media

Pending, mechanical change.

Requirements

  • I have read and am following the Macrocosm Pull Request Conventions.
  • I have tested this pull request and written instructions on how to test it
  • 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.
    • All art assets are a commercially appropriate license (CC-BY-SA-3.0, CC-BY-SA-4.0, CC0-1.0, etc)

License

MIT

Breaking changes

ReagentDispenser no longer uses jug storage. ReagentDispenserEjectContainerMessage was removed, ReagentDispenserDispenseReagentMessage now carries a reagent id string instead of a storage location, and ReagentInventoryItem no longer carries a storage location or quantity. Downstreams with custom reagent dispensers should give them a reagentIds list and a cell slot.

Changelog

🆑

  • tweak: Chemical, booze and soda dispensers now brew reagents from an internal power cell that recharges from the grid, instead of holding jugs that run out.
  • add: Dispensers can be upgraded during the round by swapping their power cell for a bigger one.

@Clawy111

Copy link
Copy Markdown

This could off-set a balance to gameplay regarding thirst as it would be near infinite (Power cells are extremely easy to get but also to recharge). And would diminish Cargo's ability for restocking such machines (as they are supposed to, or just hand it over to the respective crew crew and let them restock it).

This could and probably would spiral further when more systems are replace to make it be like 13's systems.

I don't have the words to say it, but it's designed in a way to allow cargo to interact a bit more then just drop off generic crate number 233

@AitorLogedo

Copy link
Copy Markdown
Author

This could off-set a balance to gameplay regarding thirst as it would be near infinite (Power cells are extremely easy to get but also to recharge). And would diminish Cargo's ability for restocking such machines (as they are supposed to, or just hand it over to the respective crew crew and let them restock it).

This could and probably would spiral further when more systems are replace to make it be like 13's systems.

I don't have the words to say it, but it's designed in a way to allow cargo to interact a bit more then just drop off generic crate number 233

@Clawy111 fair points, appreciate the feedback.

This could off-set a balance to gameplay regarding thirst as it would be near infinite

It's still gated by cell charge and station power (no power, no dispensing), and all the numbers live on ReagentDispenserBase (energyPerUnit, rechargeFractionPerSecond, starting cell), so it's easy to dial in if it feels too free. Happy to bump the cost if playtesting shows it's too much.

And yeah, this is intentionally moving toward the SS13 feel, which is kind of the point of the server. Open to tuning but I'd like to keep the core mechanic.

@Skarletto Skarletto added Parity Anything that relates to porting something from Monkestation13 specifically. Balance Game balance. DO NOT MERGE (YET) Lets the PR run tests while not being ready for merge yet. labels Jul 22, 2026
@Skarletto

Copy link
Copy Markdown
Collaborator

This is what I said on discord, to avoid it getting lost to sea

So to offset Clawy's valid feedback on your PR, I think we'd need a cargo bounty board that's a lot better than it is now, so cargo's whole gameplay is NOT to deliver crates all the time. On funky, they have crafting bounties, and they're so much more engaging for cargo

eg. they had a bounty for two makeshift shotguns, 4 baseball bats and 4 makeshift bows (all in 1 bounty) that keeps you busy for a long time roundstart if you do not have the wood for it

similar bounties could be introduced, I know cargo on 13 has public bounties but I never looked at the PC, idk what kind of quests they offered

@meganerobot

Copy link
Copy Markdown

i think powerchem is cool but that's mostly because i'm jugmixing's number 1 hater. even without doing crazy jugmixing, right now the technical objective best way of doing chem is to empty out the chemvend/chem dispensers and dump all the reagents into the chemmaster 3000, which is way better at manipulating chems.

this both kills jugmixing (which i can't be unbiased about) and makes it REQUIRE the chem dispenser to do work rather than the aforementioned chemmaster method, which justifies the machines existence.

it should be noted that actual 14 chemist mains will really hate this change, as speedchem is so reliant on jugs/chemmaster optimisation.

(also in current roundflow, its sci that would provide the upgraded cell, not engie :p)

@AitorLogedo

AitorLogedo commented Jul 22, 2026

Copy link
Copy Markdown
Author

i think powerchem is cool but that's mostly because i'm jugmixing's number 1 hater. even without doing crazy jugmixing, right now the technical objective best way of doing chem is to empty out the chemvend/chem dispensers and dump all the reagents into the chemmaster 3000, which is way better at manipulating chems.

this both kills jugmixing (which i can't be unbiased about) and makes it REQUIRE the chem dispenser to do work rather than the aforementioned chemmaster method, which justifies the machines existence.

it should be noted that actual 14 chemist mains will really hate this change, as speedchem is so reliant on jugs/chemmaster optimisation.

(also in current roundflow, its sci that would provide the upgraded cell, not engie :p)

jugs are not removed, but jumping all the contents in one machine and mixing from there does not seems that different from having and ilimitted ammount from chemamster, maybe slower, but I think the tradeoff of being unlimitted + upgradeable, its worth it + eventually I want to give every deparment his own lathe and making engi being able to upgrade stuff

@meganerobot

Copy link
Copy Markdown

i'm of the opinion if you're going to do this, you should also kill the chemvend too. migrate it to a locker filled with empty jugs so the standard practice of jugging for chem storage still exists, without jugmixing and chem dumping being possible.

but im also the devil so you dont have to listen to what i say.

also one thing from the original post, buying chemvend restocks was standard practice rather than the chem crates themselves. i dont know why those are still in the game for anything beyond for some reason wanting to carry on after the chemvend gets completely destroyed.

@adamsong

Copy link
Copy Markdown
Collaborator

I'm not fundamentally opposed to this, it is how 13 works and it works well. My concern is with medical being 90% chems, this feels like a massive buff.

@meganerobot

Copy link
Copy Markdown

I'm not fundamentally opposed to this, it is how 13 works and it works well. My concern is with medical being 90% chems, this feels like a massive buff.

yes and no. it's a much tighter rate limit on chem production compared to it being jug-based, so what it does is moves the choke point from running out of carbon in the chemvend (provided that gets killed) to hitting a wall on running out of power after like 10-15 jugs' worth of chems.

it could honestly do with being bumped down from that amount actually. there's also no easy way of getting medium cells any more now that flashlights and the like don't have them, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Balance Game balance. Changes: UI DO NOT MERGE (YET) Lets the PR run tests while not being ready for merge yet. Parity Anything that relates to porting something from Monkestation13 specifically. size/M Status: Needs Review Status: Untriaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants