Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ private void OnInit(EntityUid uid, GasFilterComponent filter, ComponentInit args

private void OnFilterUpdated(EntityUid uid, GasFilterComponent filter, ref AtmosDeviceUpdateEvent args)
{
// STARLIGHT - Disable outlet node pressure check for inline filter
if (!filter.Enabled
|| !_nodeContainer.TryGetNodes(uid, filter.InletName, filter.FilterName, filter.OutletName, out PipeNode? inletNode, out PipeNode? filterNode, out PipeNode? outletNode)
|| outletNode.Air.Pressure >= Atmospherics.MaxOutputPressure) // No need to transfer if target is full.
|| (outletNode != inletNode && outletNode.Air.Pressure >= Atmospherics.MaxOutputPressure)) // No need to transfer if target is full.
{
_ambientSoundSystem.SetAmbience(uid, false);
return;
Expand Down Expand Up @@ -209,6 +210,12 @@ private void OnFilterAnalyzed(EntityUid uid, GasFilterComponent component, GasAn
args.GasMixtures.Add((Loc.GetString("gas-analyzer-window-text-outlet"), outletAirLocal));
}

// STARLIGHT START
// if inlet and outlet are the same you cant get a direction from it
if (inlet == outlet)
return;
// STARLIGHT END

args.DeviceFlipped = inlet != null && filterNode != null && inlet.CurrentPipeDirection.ToDirection() == filterNode.CurrentPipeDirection.ToDirection().GetClockwise90Degrees();
}
}
Expand Down
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/_Starlight/atmos/inline-filter.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
inline-gas-filter = inline gas filter
inline-gas-filter-desc = Filters gases from a pipenet without splitting it in two.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
- type: entity
parent: GasFilter
id: GasFilterInline
name: inline gas filter
description: Filters gases from a pipenet without splitting it in two.
components:
- type: Sprite
sprite: _Starlight/Structures/Piping/Atmospherics/inlinegasfilter.rsi
- type: GasFilter
inlet: pipe
outlet: pipe
- type: NodeContainer
nodes:
pipe:
!type:PipeNode
nodeGroupID: Pipe
pipeDirection: Longitudinal
filter:
!type:PipeNode
nodeGroupID: Pipe
pipeDirection: West
- type: Flippable
mirrorEntity: GasFilterInline
- type: Construction
node: inline_filter
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- type: constructionGraph
id: GasTrinaryStarlight
start: start
graph:
- node: start
edges:
# Inline Filter
- to: inline_filter
steps:
- material: Steel
amount: 2
doAfter: 1

# Inline Filter
- node: inline_filter
entity: GasFilterInline
edges:
- to: start
conditions:
- !type:EntityAnchored
anchored: false
completed:
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 2
- !type:DeleteEntity
steps:
- tool: Welding
doAfter: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- type: construction
id: GasFilterInline
name: inline-gas-filter
description: inline-gas-filter-desc
graph: GasTrinaryStarlight
startNode: start
targetNode: inline_filter
category: construction-category-utilities
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:NoUnstackableInTile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from https://github.com/tgstation/tgstation at commit 57cd1d59ca019dd0e7811ac451f0.295f818e573da. Modified by deltanedas (github)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "gasFilter",
"directions": 4
},
{
"name": "gasFilterOn",
"directions": 4,
"delays": [ [ 0.2, 0.2, 0.2, 0.2 ], [ 0.2, 0.2, 0.2, 0.2 ], [ 0.2, 0.2, 0.2, 0.2 ], [ 0.2, 0.2, 0.2, 0.2 ] ]
}
]
}
Loading