Skip to content

Commit

Permalink
Merge branch 'master' into Parrot
Browse files Browse the repository at this point in the history
  • Loading branch information
Vonsant authored Dec 25, 2024
2 parents 393fef0 + aa61703 commit acaee1a
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ public sealed partial class GasFilterComponent : Component
[DataField]
public float MaxTransferRate = Atmospherics.MaxTransferRate;

[DataField]
[DataField, ViewVariables(VVAccess.ReadWrite)] // Corvax-Next-AutoPipes
public Gas? FilteredGas;

/// Corvax-Next-AutoPipes-Start
[DataField]
public bool StartOnMapInit { get; set; } = false;
/// Corvax-Next-AutoPipes-End
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public override void Initialize()
SubscribeLocalEvent<GasFilterComponent, GasFilterChangeRateMessage>(OnTransferRateChangeMessage);
SubscribeLocalEvent<GasFilterComponent, GasFilterSelectGasMessage>(OnSelectGasMessage);
SubscribeLocalEvent<GasFilterComponent, GasFilterToggleStatusMessage>(OnToggleStatusMessage);


SubscribeLocalEvent<GasFilterComponent, MapInitEvent>(OnMapInit); // Corvax-Next-AutoPipes
}

private void OnInit(EntityUid uid, GasFilterComponent filter, ComponentInit args)
Expand Down Expand Up @@ -210,5 +211,18 @@ private void OnFilterAnalyzed(EntityUid uid, GasFilterComponent component, GasAn

args.DeviceFlipped = inlet != null && filterNode != null && inlet.CurrentPipeDirection.ToDirection() == filterNode.CurrentPipeDirection.ToDirection().GetClockwise90Degrees();
}

/// Corvax-Next-AutoPipes-Start
private void OnMapInit(EntityUid uid, GasFilterComponent filter, MapInitEvent args)
{
if (filter.StartOnMapInit)
{
filter.Enabled = true;
DirtyUI(uid, filter);
UpdateAppearance(uid, filter);
_userInterfaceSystem.CloseUi(uid, GasFilterUiKey.Key);
}
}
/// Corvax-Next-AutoPipes-End
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,21 @@ ent-GasMixerOn = { ent-GasMixer }
ent-GasMixerOnFlipped = { ent-GasMixerFlipped }
.desc = { ent-GasMixerFlipped.desc }
.suffix = ВКЛ, Перевёрнутый
ent-GasFilterOn = { ent-GasFilter }
.desc = { ent-GasFilter.desc }
.suffix = ВКЛ
ent-GasFilterOnFlipped = { ent-GasFilter }
.desc = { ent-GasFilter.desc }
.suffix = ВКЛ, Перевёрнутый
ent-GasFilterOxygenOn = { ent-GasFilter }
.desc = { ent-GasFilter.desc }
.suffix = ВКЛ, Кислород
ent-GasFilterOxygenOnFlipped = { ent-GasFilter }
.desc = { ent-GasFilter.desc }
.suffix = ВКЛ, Кислород, Перевёрнутый
ent-GasFilterNitrogenOn = { ent-GasFilter }
.desc = { ent-GasFilter.desc }
.suffix = ВКЛ, Азот
ent-GasFilterNitrogenOnFlipped = { ent-GasFilter }
.desc = { ent-GasFilter.desc }
.suffix = ВКЛ, Азот, Перевёрнутый
7 changes: 7 additions & 0 deletions Resources/Prototypes/_CorvaxNext/Entities/Fun/snowball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
damage:
types:
Blunt: 3
- type: Extractable
grindableSolutionName: snowball
- type: DamageOnHighSpeedImpact
minimumSpeed: 0.1
damage:
types:
Blunt: 3
- type: StaminaDamageOnCollide
damage: 8.1
- type: Sprite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,56 @@
suffix: On, Flipped
placement:
mode: SnapgridCenter

# Filter None
- type: entity
parent: GasFilter
id: GasFilterOn
suffix: On
abstract: true
placement:
mode: SnapgridCenter
components:
- type: GasFilter
startOnMapInit: true
- type: entity
parent: [GasFilterFlipped, GasFilterOn]
id: GasFilterOnFlipped
suffix: On, Flipped
abstract: true
placement:
mode: SnapgridCenter
# Filter Oxygen
- type: entity
parent: GasFilter
id: GasFilterOxygenOn
suffix: On, Oxygen
placement:
mode: SnapgridCenter
components:
- type: GasFilter
startOnMapInit: true
filteredGas: Oxygen
- type: entity
parent: [GasFilterFlipped, GasFilterOxygenOn]
id: GasFilterOxygenOnFlipped
suffix: On, Oxygen, Flipped
placement:
mode: SnapgridCenter
# Filter Nitrogen
- type: entity
parent: GasFilter
id: GasFilterNitrogenOn
suffix: On, Nitrogen
placement:
mode: SnapgridCenter
components:
- type: GasFilter
startOnMapInit: true
filteredGas: Nitrogen
- type: entity
parent: [GasFilterFlipped, GasFilterNitrogenOn]
id: GasFilterNitrogenOnFlipped
suffix: On, Nitrogen, Flipped
placement:
mode: SnapgridCenter

0 comments on commit acaee1a

Please sign in to comment.