Skip to content

Commit

Permalink
Merge branch 'master' into gonk
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkmajia authored Dec 24, 2024
2 parents a693663 + 4ba9832 commit 0a8e491
Show file tree
Hide file tree
Showing 451 changed files with 471,168 additions and 130,362 deletions.
37 changes: 9 additions & 28 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,38 @@

# Sorting by path instead of by who added it one day :(
# this isn't how codeowners rules work pls read the first comment instead of trying to force a sorting order
/Resources/ConfigPresets/WizardsDen/ @Chief-Engineer

# Moony's Gargantuan List Of Things She Cares About, or MGLOTSCA for short.
# You need to add your name to these entries, not make a new one, if you care about them.
/Content.*/Toolshed/ @moonheart08
**/Toolshed/** @moonheart08
*Command.cs @moonheart08
/Content.*/Administration/ @moonheart08 @DrSmugleaf @Chief-Engineer
/Content.*/Station/ @moonheart08
/Content.*/Maps/ @moonheart08
/Content.*/GameTicking/ @moonheart08 @EmoGarbage404
/Resources/ServerInfo/ @moonheart08 @Chief-Engineer
/Resources/ServerInfo/Guidebook/ @moonheart08 @EmoGarbage404
/Resources/ServerInfo/Guidebook/ServerRules/ @Chief-Engineer
/Resources/engineCommandPerms.yml @moonheart08 @Chief-Engineer
/Resources/clientCommandPerms.yml @moonheart08 @Chief-Engineer
/Resources/ConfigPresets/WizardsDen/ @nikthechampiongr
/Content.*/Administration/ @DrSmugleaf @nikthechampiongr
/Resources/ServerInfo/ @nikthechampiongr
/Resources/ServerInfo/Guidebook/ServerRules/ @nikthechampiongr

/Resources/Prototypes/Maps/** @Emisse

/Resources/Prototypes/Body/ @DrSmugleaf # suffering
/Resources/Prototypes/Entities/Mobs/Player/ @DrSmugleaf
/Resources/Prototypes/Entities/Mobs/Species/ @DrSmugleaf
/Resources/Prototypes/Guidebook/rules.yml @Chief-Engineer
/Resources/Prototypes/Guidebook/rules.yml @nikthechampiongr
/Content.*/Body/ @DrSmugleaf
/Content.YAMLLinter @DrSmugleaf
/Content.Shared/Damage/ @DrSmugleaf

/Content.*/Anomaly/ @EmoGarbage404 @TheShuEd
/Content.*/Lathe/ @EmoGarbage404
/Content.*/Materials/ @EmoGarbage404
/Content.*/Mech/ @EmoGarbage404
/Content.*/Research/ @EmoGarbage404
/Content.*/Stack/ @EmoGarbage404
/Content.*/Xenoarchaeology/ @EmoGarbage404
/Content.*/Zombies/ @EmoGarbage404
/Resources/Prototypes/Entities/Structures/Specific/anomalies.yml @EmoGarbage404 @TheShuEd
/Resources/Prototypes/Research/ @EmoGarbage404
/Content.*/Anomaly/ @TheShuEd
/Resources/Prototypes/Entities/Structures/Specific/anomalies.yml @TheShuEd

/Content.*/Forensics/ @ficcialfaint

# SKREEEE
/Content.*.Database/ @PJB3005 @DrSmugleaf
/Content.Shared.Database/Log*.cs @PJB3005 @DrSmugleaf @Chief-Engineer
/Content.Shared.Database/Log*.cs @PJB3005 @DrSmugleaf @nikthechampiongr
/Pow3r/ @PJB3005
/Content.Server/Power/Pow3r/ @PJB3005

# notafet
/Content.*/Atmos/ @Partmedia
/Content.*/Botany/ @Partmedia

#Jezi
# Jezi
/Content.*/Medical @Jezithyr
/Content.*/Body @Jezithyr

Expand Down
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
- changed-files:
- any-glob-to-any-file: '**/*.swsl'

"Changes: Audio":
- changed-files:
- any-glob-to-any-file: '**/*.ogg'

"Changes: No C#":
- changed-files:
# Equiv to any-glob-to-all as long as this has one matcher. If ALL changed files are not C# files, then apply label.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-map-renderer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

on:
push:
branches: [ master, staging, trying ]
branches: [ master, staging, stable ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
branches: [ master ]
branches: [ master, staging, stable ]

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-test-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Build & Test Debug

on:
push:
branches: [ master, staging, trying ]
branches: [ master, staging, stable ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
branches: [ master ]
branches: [ master, staging, stable ]

jobs:
build:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/labeler-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
{
"0": "XS",
"10": "S",
"30": "M",
"100": "L",
"1000": "XL"
"100": "M",
"1000": "L",
"5000": "XL"
}
4 changes: 2 additions & 2 deletions .github/workflows/test-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

on:
push:
branches: [ master, staging, trying ]
branches: [ master, staging, stable ]
paths:
- '**.cs'
- '**.csproj'
Expand All @@ -16,7 +16,7 @@ on:
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
branches: [ master ]
branches: [ master, staging, stable ]
paths:
- '**.cs'
- '**.csproj'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-rgas.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: RGA schema validator
on:
push:
branches: [ master, staging, trying ]
branches: [ master, staging, stable ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-rsis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: RSI Validator

on:
push:
branches: [ staging, trying ]
branches: [ master, staging, stable ]
merge_group:
pull_request:
paths:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate_mapfiles.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Map file schema validator
on:
push:
branches: [ master, staging, trying ]
branches: [ master, staging, stable ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yaml-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: YAML Linter

on:
push:
branches: [ master, staging, trying ]
branches: [ master, staging, stable ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ public void UpdateEntry(AtmosAlertsComputerEntry entry, bool isFocus, AtmosAlert
foreach ((var gas, (var mol, var percent, var alert)) in keyValuePairs)
{
FixedPoint2 gasPercent = percent * 100f;

var gasAbbreviation = Atmospherics.GasAbbreviations.GetValueOrDefault(gas, Loc.GetString("gas-unknown-abbreviation"));

var gasLabel = new Label()
{
Text = Loc.GetString("atmos-alerts-window-other-gases-value", ("shorthand", gasAbbreviation), ("value", gasPercent)), FontOverride = normalFont,
Text = Loc.GetString("atmos-alerts-window-other-gases-value", ("shorthand", gasAbbreviation), ("value", gasPercent)),
FontOverride = normalFont,
FontColorOverride = GetAlarmStateColor(alert),
HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@

<!-- If the alarm is inactive, this is label is displayed instead -->
<Label Name="NoDataLabel" Text="{Loc 'atmos-alerts-window-no-data-available'}" HorizontalAlignment="Center" Margin="0 15" FontColorOverride="#a9a9a9" ReservesSpace="False" Visible="False"></Label>

</PanelContainer>
</BoxContainer>
</Button>
Expand Down
23 changes: 23 additions & 0 deletions Content.Client/Atmos/EntitySystems/GasPressurePumpSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Content.Client.Atmos.UI;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
using Content.Shared.Atmos.Piping.Binary.Components;

namespace Content.Client.Atmos.EntitySystems;

public sealed class GasPressurePumpSystem : SharedGasPressurePumpSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<GasPressurePumpComponent, AfterAutoHandleStateEvent>(OnPumpUpdate);
}

private void OnPumpUpdate(Entity<GasPressurePumpComponent> ent, ref AfterAutoHandleStateEvent args)
{
if (UserInterfaceSystem.TryGetOpenUi<GasPressurePumpBoundUserInterface>(ent.Owner, GasPressurePumpUiKey.Key, out var bui))
{
bui.Update();
}
}
}
90 changes: 44 additions & 46 deletions Content.Client/Atmos/UI/GasPressurePumpBoundUserInterface.cs
Original file line number Diff line number Diff line change
@@ -1,65 +1,63 @@
using Content.Shared.Atmos;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.Piping.Binary.Components;
using Content.Shared.IdentityManagement;
using Content.Shared.Localizations;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;

namespace Content.Client.Atmos.UI
namespace Content.Client.Atmos.UI;

/// <summary>
/// Initializes a <see cref="GasPressurePumpWindow"/> and updates it when new server messages are received.
/// </summary>
[UsedImplicitly]
public sealed class GasPressurePumpBoundUserInterface : BoundUserInterface
{
/// <summary>
/// Initializes a <see cref="GasPressurePumpWindow"/> and updates it when new server messages are received.
/// </summary>
[UsedImplicitly]
public sealed class GasPressurePumpBoundUserInterface : BoundUserInterface
{
[ViewVariables]
private const float MaxPressure = Atmospherics.MaxOutputPressure;
[ViewVariables]
private const float MaxPressure = Atmospherics.MaxOutputPressure;

[ViewVariables]
private GasPressurePumpWindow? _window;

[ViewVariables]
private GasPressurePumpWindow? _window;
public GasPressurePumpBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}

public GasPressurePumpBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();

protected override void Open()
{
base.Open();
_window = this.CreateWindow<GasPressurePumpWindow>();

_window = this.CreateWindow<GasPressurePumpWindow>();
_window.ToggleStatusButtonPressed += OnToggleStatusButtonPressed;
_window.PumpOutputPressureChanged += OnPumpOutputPressurePressed;
Update();
}

_window.ToggleStatusButtonPressed += OnToggleStatusButtonPressed;
_window.PumpOutputPressureChanged += OnPumpOutputPressurePressed;
}
public void Update()
{
if (_window == null)
return;

private void OnToggleStatusButtonPressed()
{
if (_window is null) return;
SendMessage(new GasPressurePumpToggleStatusMessage(_window.PumpStatus));
}
_window.Title = Identity.Name(Owner, EntMan);

private void OnPumpOutputPressurePressed(string value)
{
var pressure = UserInputParser.TryFloat(value, out var parsed) ? parsed : 0f;
if (pressure > MaxPressure) pressure = MaxPressure;
if (!EntMan.TryGetComponent(Owner, out GasPressurePumpComponent? pump))
return;

SendMessage(new GasPressurePumpChangeOutputPressureMessage(pressure));
}
_window.SetPumpStatus(pump.Enabled);
_window.MaxPressure = pump.MaxTargetPressure;
_window.SetOutputPressure(pump.TargetPressure);
}

/// <summary>
/// Update the UI state based on server-sent info
/// </summary>
/// <param name="state"></param>
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
if (_window == null || state is not GasPressurePumpBoundUserInterfaceState cast)
return;
private void OnToggleStatusButtonPressed()
{
if (_window is null) return;
SendPredictedMessage(new GasPressurePumpToggleStatusMessage(_window.PumpStatus));
}

_window.Title = (cast.PumpLabel);
_window.SetPumpStatus(cast.Enabled);
_window.SetOutputPressure(cast.OutputPressure);
}
private void OnPumpOutputPressurePressed(float value)
{
SendPredictedMessage(new GasPressurePumpChangeOutputPressureMessage(value));
}
}
22 changes: 9 additions & 13 deletions Content.Client/Atmos/UI/GasPressurePumpWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
<DefaultWindow xmlns="https://spacestation14.io"
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
MinSize="200 120" Title="Pressure Pump">
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
SetSize="340 110" MinSize="340 110" Title="Pressure Pump">
<BoxContainer Orientation="Vertical" Margin="5 5 5 5" SeparationOverride="10">
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<Label Text="{Loc comp-gas-pump-ui-pump-status}"/>
<Control MinSize="5 0" />
<Label Text="{Loc comp-gas-pump-ui-pump-status}" Margin="0 0 5 0"/>
<Button Name="ToggleStatusButton"/>
<Control HorizontalExpand="True"/>
<Button HorizontalAlignment="Right" Name="SetOutputPressureButton" Text="{Loc comp-gas-pump-ui-pump-set-rate}" Disabled="True" Margin="0 0 5 0"/>
<Button Name="SetMaxPressureButton" Text="{Loc comp-gas-pump-ui-pump-set-max}" />
</BoxContainer>

<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<Label Text="{Loc comp-gas-pump-ui-pump-output-pressure}"/>
<Control MinSize="5 0" />
<LineEdit Name="PumpPressureOutputInput" MinSize="70 0" />
<Control MinSize="5 0" />
<Button Name="SetMaxPressureButton" Text="{Loc comp-gas-pump-ui-pump-set-max}" />
<Control MinSize="5 0" />
<Control HorizontalExpand="True" />
<Button Name="SetOutputPressureButton" Text="{Loc comp-gas-pump-ui-pump-set-rate}" HorizontalAlignment="Right" Disabled="True"/>
<FloatSpinBox HorizontalExpand="True" Name="PumpPressureOutputInput" MinSize="70 0" />
</BoxContainer>
</BoxContainer>
</DefaultWindow>
</controls:FancyWindow>
Loading

0 comments on commit 0a8e491

Please sign in to comment.