Skip to content

Commit

Permalink
Merge branch 'master' into ports
Browse files Browse the repository at this point in the history
  • Loading branch information
Roudenn authored Dec 25, 2024
2 parents ee2638c + f9aa07e commit e8bb962
Show file tree
Hide file tree
Showing 645 changed files with 363,109 additions and 31,148 deletions.
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
2 changes: 1 addition & 1 deletion .github/workflows/checker.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
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
25 changes: 25 additions & 0 deletions .github/workflows/validate-rgas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: RGA schema validator
on:
push:
branches: [ master, staging, stable ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]

jobs:
yaml-schema-validation:
name: YAML RGA schema validator
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Submodule
run: git submodule update --init
- name: Pull engine updates
uses: space-wizards/[email protected]
- uses: PaulRitter/yaml-schema-validator@v1
with:
schema: RobustToolbox/Schemas/rga.yml
path_pattern: .*attributions.ya?ml$
validators_path: RobustToolbox/Schemas/rga_validators.py
validators_requirements: RobustToolbox/Schemas/rga_requirements.txt
26 changes: 26 additions & 0 deletions .github/workflows/validate-rsis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: RSI Validator

on:
push:
branches: [ master, staging, stable ]
merge_group:
pull_request:
paths:
- '**.rsi/**'

jobs:
validate_rsis:
name: Validate RSIs
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Submodule
run: git submodule update --init
- name: Pull engine updates
uses: space-wizards/[email protected]
- name: Install Python dependencies
run: |
pip3 install --ignore-installed --user pillow jsonschema
- name: Validate RSIs
run: |
python3 RobustToolbox/Schemas/validate_rsis.py Resources/
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
18 changes: 2 additions & 16 deletions Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer
[AtmosAlarmType.Danger] = "atmos-alerts-window-danger-state",
};

private Dictionary<Gas, string> _gasShorthands = new Dictionary<Gas, string>()
{
[Gas.Ammonia] = "NH₃",
[Gas.CarbonDioxide] = "CO₂",
[Gas.Frezon] = "F",
[Gas.Nitrogen] = "N₂",
[Gas.NitrousOxide] = "N₂O",
[Gas.Oxygen] = "O₂",
[Gas.Plasma] = "P",
[Gas.Tritium] = "T",
[Gas.WaterVapor] = "H₂O",
};

public AtmosAlarmEntryContainer(NetEntity uid, EntityCoordinates? coordinates)
{
RobustXamlLoader.Load(this);
Expand Down Expand Up @@ -162,12 +149,11 @@ public void UpdateEntry(AtmosAlertsComputerEntry entry, bool isFocus, AtmosAlert
foreach ((var gas, (var mol, var percent, var alert)) in keyValuePairs)
{
FixedPoint2 gasPercent = percent * 100f;

var gasShorthand = _gasShorthands.GetValueOrDefault(gas, "X");
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", gasShorthand), ("value", gasPercent)),
Text = Loc.GetString("atmos-alerts-window-other-gases-value", ("shorthand", gasAbbreviation), ("value", gasPercent)),
FontOverride = normalFont,
FontColorOverride = GetAlarmStateColor(alert),
HorizontalAlignment = HAlignment.Center,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using Content.Shared.Atmos.Components;

namespace Content.Client.Atmos.Consoles;

public sealed class AtmosMonitoringConsoleBoundUserInterface : BoundUserInterface
{
[ViewVariables]
private AtmosMonitoringConsoleWindow? _menu;

public AtmosMonitoringConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { }

protected override void Open()
{
base.Open();

_menu = new AtmosMonitoringConsoleWindow(this, Owner);
_menu.OpenCentered();
_menu.OnClose += Close;
}

protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);

if (state is not AtmosMonitoringConsoleBoundInterfaceState castState)
return;

EntMan.TryGetComponent<TransformComponent>(Owner, out var xform);
_menu?.UpdateUI(xform?.Coordinates, castState.AtmosNetworks);
}

protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing)
return;

_menu?.Dispose();
}
}
Loading

0 comments on commit e8bb962

Please sign in to comment.