feat: Ground fluid pickup + dirty fluid flag removal and fluid reaction framework - #9864
feat: Ground fluid pickup + dirty fluid flag removal and fluid reaction framework#9864YukariMindGap wants to merge 56 commits into
Conversation
Also made sponges and mop able to pick up fluids assisted-by: opencode:deepseek-v4-flash
assisted-by: opencode:deepseek-v4-pro
|
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
assisted-by:opencode:deepseek-v4-flash
|
Hi! I kind of like this conceptually, but have a question: What is the plan for (dirty) liquid results? I don't think its reasonable from gameplay perspective to pour dirty gasoline into car, for instance, but it is reasonable to use it for something like a handmade weapon. I also kind of think that may be the gasoline version of tool should be considerably slower (not just 1s slower than electric). |
I still have no idea of what to do with the dirty liquids. That's for a future PR to solve. Only one that's sure is dirty water having more potential to be sickening than normal water. |
assisted-by: opencode:deepseek-v4-flash
|
Does this also work for modded liquids? (Dragon Blood comes to mind - I dont' recall if it exists in MagicNights or only in Magiclysm..) |
Should work with modded liquids. |
There was a problem hiding this comment.
I'm not sure this is good in the current state
Gasoline zombies for instance will with this PR be a simple infinite source of fuel.
Let alone removing any punishment from fragile objects being destroyed, so that becomes less threatening.
Adding checks for is_dirty everywhere would also get scrungly fast.
Additional request: percentage return, some of these dont get 100% back for at least some resemblance of balance...
The item requirement is kind of a balancing point for the ability to get ground fluids, with the heavier the item, the more it can pick up, and also dirty fluids having (yet-unimplemented) bad effects compared to non-dirty fluids. I imagine dirty water would be more sickening than normal, untreated water. Dirty gasoline/diesel being less efficient than clean gasoline/diesel and increased chance of the engine failing to start. Also I assume gasoline zombies would drop their gasoline at death or is it a constant +1 unit of gasoline puddles? |
|
Each time gasoline zombies move they have a 1/5 chance to drop gasoline on the ground. There is no cap |
How much do they drop anyways? One unit per proc? I imagine gasoline zombies would be quite rare. I should nerf gasoline zombies at a later PR |
assisted-by: opencode:deepseek-v4-flash
assisted-by: opencode:deepseek-v4-flash
assisted-by: opencode:deepseek-v4-flash
…el into clean fuel assisted-by: opencode:deepseek-v4-flash
|
I have completely reworked the PR and now the dirty flag is officially no more. |
chaosvolt
left a comment
There was a problem hiding this comment.
Is the weird hack with dirty fuel types actually necessary? We'd have to specify dirty versions of every fuel in the game for this to make sense, which includes fuels not yet converted like ethanol since gasoline and turbine engines can use them.
In addition, got this error on trying to mop up some spilled mutagen into a container:
DEBUG : Failed to remove emptied liquid item from stack
FUNCTION : use
FILE : D:\a\Cataclysm-BN\Cataclysm-BN\src\iuse_actor.cpp
LINE : 8641
VERSION : BN 535b6a7 (2026-08-03)
|
Just wanted to let you know I'm working on fixing this up so it's a bit better in regards to the above requested changes and upcoming fluid fields, so you can hold back on changes for now (might require me to open a separate PR though) |
assisted-by: opencode:deepseek-v4-flash-latest
assisted-by: opencode:deepseek-v4-flash-latest
Well, the alternative would be the old "dirty" flag that someone suggested to be removed. The implementation is too jank and weird so i replaced it with a fluid reaction system that you can extend with more than just ground contamination. Here is the quote from Wishduck:
Also Shmakota:
i've fixed what Chaosvolt requested and i think it's actually ready for merging. Please check this newly-updated PR and see if it needs improvement. |
|
Shmakota said they were going to push some fixes and to hold off on tweaking it, bleh. :/ |
Purpose of change (The Why)
Currently, there's no way to pick up liquids on the floor; Once they're on the floor, they're impossible to get and is basically counted as lost. There's windows of frustration where you accidentally spill the gasoline your car needs, so it's an unacceptable flaw.
I also found out that the way the game handles ground fluids and dirty fluids needs to be reworked to fit the gameplay more, and the dirty flag from the old days has to go as a consequence. I also see the potential for a fluid transform framework for more interesting interactions with fluids.
Also Closes #9199
Describe the solution (The How)
Adds fluid_pickup iuse_actor types to recover some part of the spilled liquids. Adds three fluid pump-type items (hand, gasoline, and electric), each with distinct crafting recipe, itemgroup integration, and fuel requirements. Modifies sponge and mop to add these actions.
Removes the old "dirty" flag system from liquids and replace them with a "reacts_to" JSON field where a fluid can transform into other fluids when certain conditions are met. For this PR, only ground contamination will be implemented with clean/mineral water reacting into water and gasoline/diesel reacting into dirty gasoline/diesel (which can't be used to fuel vehicles) I also added an item that can clean those dirty fuel fluids through a crafting interaction and integrated them through itemgroups that make sense
As a consequence of the removal of the "dirty" flag, you can now drink liquids from the floor
Describe alternatives you've considered
keep the water puddle being an elusive item to get and keep the old dirtiness flag causing jank interactions.
Testing
Additional context
Look at this guy trying to pick up the puddle with their bare hands

Originally you can't do anything to the puddle after it's on the ground, but now a new friend the sponge!!

The sponge picks up the liquid and asks the guy where to put it

The guy, still wanting that liquid, pours it into the bottle.

Checklist
Mandatory
closes #1234in Summary of the PR so it can be closed automatically.Optional
Assisted-by:trailer to every AI-assisted commit in the Linux kernel format.docs/folder.lang/bn_extract_json_strings.shscript if it does not support them yet.Translations
Build Artifacts
PR build for commit 2482abf (Merge remote-tracking branch 'origin/main' into spongeroberts-cubictrousers) on 2026-08-26 20:51:33