Separatory Funnel#4068
Open
SaintIWNL wants to merge 3 commits into
Open
Conversation
Allows players a low level method of separating chemicals, selects the lowest amount of chemicals first and filters it to selected beaker.
Contributor
Ilya246
requested changes
Jun 25, 2026
Comment on lines
+13
to
+18
| [RegisterComponent] | ||
| public sealed partial class SeparatoryFunnelComponent : Component | ||
| { | ||
| [DataField("delay")] | ||
| public float Delay = 2.5f; | ||
| } |
Contributor
There was a problem hiding this comment.
should be its own file, and use just [DataField] + add [NetworkedComponent]
| [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = null!; | ||
| [Dependency] private readonly SharedDoAfterSystem _doAfter = null!; | ||
| [Dependency] private readonly SharedPopupSystem _popup = null!; | ||
| [Dependency] private readonly TagSystem _tag = null!; |
Contributor
There was a problem hiding this comment.
remove readonly from all dependencies
Comment on lines
+44
to
+48
| private void OnMapInit(EntityUid uid, SeparatoryFunnelComponent component, MapInitEvent args) | ||
| { | ||
| // Prevents players from using a finished funnel to craft ANOTHER funnel | ||
| _tag.RemoveTag(uid, "GlassBeaker"); | ||
| } |
Contributor
There was a problem hiding this comment.
don't, just have it not have the beaker tag
currently tagcomp is non-inheriting so you can do - type: Tag\ntags: [] on it
Contributor
There was a problem hiding this comment.
move to _Mono and properly name it as SeparatoryFunnelSystem.cs
Comment on lines
+97
to
+107
| // Dump all of that specific reagent | ||
| var transferAmount = FixedPoint2.Min(lowestReagent.Quantity, targetSolution.AvailableVolume); | ||
|
|
||
| if (transferAmount <= FixedPoint2.Zero) | ||
| { | ||
| _popup.PopupClient("That container is full!", target, user); | ||
| return; | ||
| } | ||
|
|
||
| _solutionContainer.RemoveReagent(funnelSolutionEnt.Value, lowestReagent.Reagent.Prototype, transferAmount); | ||
| _solutionContainer.TryAddReagent(targetSolutionEnt.Value, lowestReagent.Reagent.Prototype, transferAmount, out _); |
Contributor
There was a problem hiding this comment.
use SolutionTransferSystem
Comment on lines
+57
to
+59
| // Stop chemicals from disappearing when used on player | ||
| if (HasComp<MobStateComponent>(target) || !_solutionContainer.TryGetInjectableSolution(target, out _, out _)) | ||
| return; |
Contributor
There was a problem hiding this comment.
do what SolutionTransferSystem does instead of checking for specifically mobstate, here and below
specifically, check for RefillableSolution on target
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Allows players a low level method of separating chemicals, selects the lowest amount of chemicals first and filters it to selected beaker.
About the PR
New item to help chemical creation
Why / Balance
Chemical mechanic PRMedia
https://streamable.com/9ce6nk
Requirements
How to test
Breaking changes
Changelog