diff --git a/.github/labeler.yml b/.github/labeler.yml index 5b7d49efb52..e27763fe1f8 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,50 +1,80 @@ #"Map": -# - "Resources/Maps/**/*.yml" # All .yml files in the Resources/Maps directory, recursive. +# - changed-files: +# - any-glob-to-any-file: "Resources/Maps/**/*.yml" # All .yml files in the Resources/Maps directory, recursive. "Map-Admin": - - "Resources/Maps/_NF/Admin/**/*.yml" # Grid Files +- changed-files: + - any-glob-to-any-file: "Resources/Maps/_NF/Admin/**/*.yml" # Grid Files "Map-Bluespace": - - "Resources/Maps/_NF/Bluespace/**/*.yml" # Grid Files +- changed-files: + - any-glob-to-any-file: "Resources/Maps/_NF/Bluespace/**/*.yml" # Grid Files "Map-Dungeon": - - "Resources/Maps/_NF/Dungeon/**/*.yml" # Grid Files +- changed-files: + - any-glob-to-any-file: "Resources/Maps/_NF/Dungeon/**/*.yml" # Grid Files "Map-Outpost": - - "Resources/Maps/_NF/Outpost/*.yml" # Map Files - - "Resources/Prototypes/_MF/Maps/Outpost/*.yml" # Prototypes Files +- changed-files: + - any-glob-to-any-file: + - "Resources/Maps/_NF/Outpost/*.yml" # Map Files + - "Resources/Prototypes/_MF/Maps/Outpost/*.yml" # Prototypes Files "Map-Shuttle": - - "Resources/Maps/_NF/Shuttles/**/*.yml" # Grid Files - - "Resources/Prototypes/_NF/Shipyard/**/*.yml" # Prototypes Files +- changed-files: + - any-glob-to-any-file: + - "Resources/Maps/_NF/Shuttles/**/*.yml" # Grid Files + - "Resources/Prototypes/_NF/Shipyard/**/*.yml" # Prototypes Files "Map-POI": - - "Resources/Maps/_NF/POI/**/*.yml" # Grid Files - - "Resources/Prototypes/_MF/Maps/POI/**/*.yml" # Prototypes Files +- changed-files: + - any-glob-to-any-file: + - "Resources/Maps/_NF/POI/**/*.yml" # Grid Files + - "Resources/Prototypes/_MF/Maps/POI/**/*.yml" # Prototypes Files "Sprites": - - "**/*.rsi/*.png" - - "**/*.rsi/*.json" +- changed-files: + - any-glob-to-any-file: + - "**/*.rsi/*.png" + - "**/*.rsi/*.json" "UI": - - "**/*.xaml*" +- changed-files: + - any-glob-to-any-file: "**/*.xaml*" "C#": - - "**/*.cs" +- changed-files: + - any-glob-to-any-file: "**/*.cs" + +"Shaders": +- changed-files: + - any-glob-to-any-file: '**/*.swsl' "Shaders": - '**/*.swsl' "No C#": - - all: ["!**/*.cs"] +- changed-files: + - all-globs-to-all-files: "!**/*.cs" "Docs": - - "**/*.xml" - - "**/*.md" +- changed-files: + - any-glob-to-any-file: + - "**/*.xml" + - "**/*.md" "FTL": - - "Resources/Locale/**/*.ftl" +- changed-files: + - any-glob-to-any-file: "Resources/Locale/**/*.ftl" "YML": - - any: ["**/*.yml"] - all: ["!Resources/Maps/_NF/**/*.yml", "!Resources/Prototypes/Maps/_NF/**/*.yml"] +- all: + - changed-files: + - any-glob-to-any-file: "**/*.yml" + - all-globs-to-all-files: + - "!Resources/Maps/_NF/**/*.yml" + - "!Resources/Prototypes/Maps/_NF/**/*.yml" + +"DB Migration": +- changed-files: + - any-glob-to-any-file: "Content.Server.Database/Migrations/**/*.cs" diff --git a/.github/workflows/build-map-renderer.yml b/.github/workflows/build-map-renderer.yml index 35aed1a7f7f..826bc59ab2b 100644 --- a/.github/workflows/build-map-renderer.yml +++ b/.github/workflows/build-map-renderer.yml @@ -10,7 +10,7 @@ on: jobs: build: - if: github.actor != 'PJBot' && github.event.pull_request.draft == false + if: github.actor != 'PJBot' && github.event.pull_request.draft == false && github.actor != 'FrontierATC' # Frontier strategy: matrix: os: [ubuntu-latest] diff --git a/.github/workflows/build-test-debug.yml b/.github/workflows/build-test-debug.yml index ed7133ba41c..57400747fe7 100644 --- a/.github/workflows/build-test-debug.yml +++ b/.github/workflows/build-test-debug.yml @@ -7,10 +7,13 @@ on: pull_request: types: [ opened, reopened, synchronize, ready_for_review ] branches: [ master ] + pull_request_target: # Frontier: only run tests on C# changes + paths: # Frontier + - "**/*.cs" # Frontier jobs: build: - if: github.actor != 'PJBot' && github.event.pull_request.draft == false + if: github.actor != 'PJBot' && github.event.pull_request.draft == false && github.actor != 'FrontierATC' # Frontier strategy: matrix: os: [ubuntu-latest] @@ -46,6 +49,12 @@ jobs: - name: Run Content.Tests run: dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 + + # - name: Run Content.IntegrationTests + # shell: pwsh + # run: | + # $env:DOTNET_gcServer=1 + # dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj --filter FullyQualifiedName!~ShipyardTest -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed ci-success: name: Build & Test Debug needs: diff --git a/.github/workflows/conflict-labeler.yml b/.github/workflows/conflict-labeler.yml index 1e2125c30a2..adcc983123e 100644 --- a/.github/workflows/conflict-labeler.yml +++ b/.github/workflows/conflict-labeler.yml @@ -10,7 +10,7 @@ on: jobs: Label: - if: ( github.event.pull_request.draft == false ) && ( github.actor != 'PJBot' ) + if: ( github.event.pull_request.draft == false ) && ( github.actor != 'PJBot' ) && ( github.actor != 'FrontierATC' ) # Frontier runs-on: ubuntu-latest steps: - name: Check for Merge Conflicts diff --git a/.github/workflows/labeler-pr.yml b/.github/workflows/labeler-pr.yml new file mode 100644 index 00000000000..d95704ef9ec --- /dev/null +++ b/.github/workflows/labeler-pr.yml @@ -0,0 +1,14 @@ +name: "Labels: PR" + +on: +- pull_request_target + +jobs: + labeler: + if: github.actor != 'PJBot' && github.actor != 'FrontierATC' # Frontier + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 \ No newline at end of file diff --git a/.github/workflows/frontier-mapchecker.yml b/.github/workflows/nf-mapchecker.yml similarity index 100% rename from .github/workflows/frontier-mapchecker.yml rename to .github/workflows/nf-mapchecker.yml diff --git a/.github/workflows/nf-shipyard-tests.yml b/.github/workflows/nf-shipyard-tests.yml new file mode 100644 index 00000000000..54f1d45ceea --- /dev/null +++ b/.github/workflows/nf-shipyard-tests.yml @@ -0,0 +1,59 @@ +name: Build & Run Shipyard Tests + +on: + pull_request: + branches: [ "master" ] + paths: + - "Resources/Maps/_NF/Shuttles/**/*.yml" # Ship grids + - "Resources/Prototypes/_NF/Shipyard/**/*.yml" # Shipyard prototypes + - "Content.IntegrationTests/Tests/_NF/ShipyardTests.cs" # Shipyard tests + +jobs: + build: + if: github.event.pull_request.draft == false && github.actor != 'FrontierATC' + strategy: + matrix: + os: [ubuntu-latest] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout Master + uses: actions/checkout@v3.6.0 + + - name: Setup Submodule + run: | + git submodule update --init --recursive + + - name: Pull engine updates + uses: space-wizards/submodule-dependency@v0.1.5 + + - name: Update Engine Submodules + run: | + cd RobustToolbox/ + git submodule update --init --recursive + + - name: Setup .NET Core + uses: actions/setup-dotnet@v3.2.0 + with: + dotnet-version: 8.0.x + + - name: Install Dependencies + run: dotnet restore + + - name: Build Project + run: dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m + + - name: Run Shipyard Tests + shell: pwsh + run: | + $env:DOTNET_gcServer=1 + dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj --filter FullyQualifiedName~ShipyardTest -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed + ci-success: + name: Build & Run Shipyard Tests + needs: + - build + runs-on: ubuntu-latest + steps: + - name: CI succeeded + run: exit 0 \ No newline at end of file diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml deleted file mode 100644 index 8700f52fc1c..00000000000 --- a/.github/workflows/pr-labeler.yml +++ /dev/null @@ -1,24 +0,0 @@ -# This workflow will triage pull requests and apply a label based on the -# paths that are modified in the pull request. -# -# To use this workflow, you will need to set up a .github/labeler.yml -# file with configuration. For more information, see: -# https://github.com/actions/labeler - -# This is entirely a github default file, except for this comment, but it should be fine. -Tsjip - -name: Labeler -on: [pull_request_target] - -jobs: - label: - - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - - steps: - - uses: actions/labeler@v4 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index be728dcf5ee..9b2bbb49d51 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,25 +1,24 @@ name: Publish -#concurrency: -# group: publish +concurrency: + group: publish on: workflow_dispatch: schedule: - - cron: '0 1 * * *' + - cron: '0 10 * * *' jobs: build: runs-on: ubuntu-latest steps: -# - name: Install dependencies -# run: sudo apt-get install -y python3-paramiko python3-lxml + - name: Install dependencies + run: sudo apt-get install -y python3-paramiko python3-lxml - uses: actions/checkout@v3.6.0 with: submodules: 'recursive' - - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: @@ -42,34 +41,19 @@ jobs: - name: Package client run: dotnet run --project Content.Packaging client --no-wipe-release - - name: Upload build artifact - id: artifact-upload-step - uses: actions/upload-artifact@v4 - with: - name: build - path: release/*.zip - compression-level: 0 - retention-days: 0 - - name: Publish version run: Tools/publish_multi_request.py env: PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }} - FORK_ID: ${{ vars.FORK_ID }} - # - name: Publish changelog (Discord) - # run: Tools/actions_changelogs_since_last_run.py - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }} + #- name: Publish changelog (Discord) + # run: Tools/actions_changelogs_since_last_run.py + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }} - # - name: Publish changelog (RSS) - # run: Tools/actions_changelog_rss.py - # env: - # CHANGELOG_RSS_KEY: ${{ secrets.CHANGELOG_RSS_KEY }} - - - uses: geekyeggo/delete-artifact@v5 - if: always() - with: - name: build + - name: Publish changelog (RSS) + run: Tools/actions_changelog_rss.py + env: + CHANGELOG_RSS_KEY: ${{ secrets.CHANGELOG_RSS_KEY }} diff --git a/.github/workflows/update-credits.yml b/.github/workflows/update-credits.yml index 87babfa2a68..5659ed66908 100644 --- a/.github/workflows/update-credits.yml +++ b/.github/workflows/update-credits.yml @@ -4,19 +4,19 @@ on: workflow_dispatch: schedule: - cron: 0 0 * * 0 - + jobs: get_credits: runs-on: ubuntu-latest # Hey there fork dev! If you like to include your own contributors in this then you can probably just change this to your own repo # Do this in dump_github_contributors.ps1 too into your own repo - if: github.repository == 'space-wizards/space-station-14' - + if: github.repository == 'new-frontiers-14/frontier-station-14' # Frontier: space-wizards/space-station-14 Resources/Credits/Patrons.yml - + # run: Tools/script2dumppatreons > Resources/Credits/Patrons.yml + # MAKE SURE YOU ENABLED "Allow GitHub Actions to create and approve pull requests" IN YOUR ACTIONS, OTHERWISE IT WILL MOST LIKELY FAIL - # For this you can use a pat token of an account with direct push access to the repo if you have protected branches. + # For this you can use a pat token of an account with direct push access to the repo if you have protected branches. # Uncomment this and comment the other line if you do this. # https://github.com/stefanzweifel/git-auto-commit-action#push-to-protected-branches - - #- name: Commit new credit files - # uses: stefanzweifel/git-auto-commit-action@v4 - # with: - # commit_message: Update Credits - # commit_author: PJBot - - # This will make a PR - - name: Set current date as env variable - run: echo "NOW=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_ENV - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 + + - name: Commit new credit files + uses: stefanzweifel/git-auto-commit-action@v4 with: - commit-message: Update Credits - title: Update Credits - body: This is an automated Pull Request. This PR updates the github contributors in the credits section. - author: PJBot - branch: automated/credits-${{env.NOW}} + commit_message: Update Credits + commit_author: FrontierATC diff --git a/.github/workflows/validate-rgas.yml b/.github/workflows/validate-rgas.yml index 2c4bb40fdf3..5a302d612b8 100644 --- a/.github/workflows/validate-rgas.yml +++ b/.github/workflows/validate-rgas.yml @@ -9,7 +9,7 @@ on: jobs: yaml-schema-validation: name: YAML RGA schema validator - if: github.actor != 'PJBot' && github.event.pull_request.draft == false + if: github.actor != 'PJBot' && github.event.pull_request.draft == false && github.actor != 'FrontierATC' # Frontier runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.6.0 diff --git a/.github/workflows/validate-rsis.yml b/.github/workflows/validate-rsis.yml index b76df28e6af..4c311fb622c 100644 --- a/.github/workflows/validate-rsis.yml +++ b/.github/workflows/validate-rsis.yml @@ -18,6 +18,10 @@ jobs: run: git submodule update --init - name: Pull engine updates uses: space-wizards/submodule-dependency@v0.1.5 + - name: Set up Python 3.10 # Frontier + uses: actions/setup-python@v3 # Frontier + with: # Frontier + python-version: "3.10" # Frontier - name: Install Python dependencies run: | pip3 install --ignore-installed --user pillow jsonschema diff --git a/.github/workflows/validate_mapfiles.yml b/.github/workflows/validate_mapfiles.yml index fb11e1a4697..ccc3bffe88e 100644 --- a/.github/workflows/validate_mapfiles.yml +++ b/.github/workflows/validate_mapfiles.yml @@ -9,7 +9,7 @@ on: jobs: yaml-schema-validation: name: YAML map schema validator - if: github.actor != 'PJBot' && github.event.pull_request.draft == false + if: github.actor != 'PJBot' && github.event.pull_request.draft == false && github.actor != 'FrontierATC' # Frontier runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.6.0 diff --git a/.github/workflows/yaml-linter.yml b/.github/workflows/yaml-linter.yml index 691eb29f1de..e7e666508fc 100644 --- a/.github/workflows/yaml-linter.yml +++ b/.github/workflows/yaml-linter.yml @@ -10,7 +10,7 @@ on: jobs: build: name: YAML Linter - if: github.actor != 'PJBot' && github.event.pull_request.draft == false + if: github.actor != 'PJBot' && github.event.pull_request.draft == false && github.actor != 'FrontierATC' # Frontier runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.6.0 diff --git a/Content.Client/Administration/UI/CustomControls/HSeparator.cs b/Content.Client/Administration/UI/CustomControls/HSeparator.cs index 2dfb0b27fe8..5e99771d9bd 100644 --- a/Content.Client/Administration/UI/CustomControls/HSeparator.cs +++ b/Content.Client/Administration/UI/CustomControls/HSeparator.cs @@ -5,21 +5,53 @@ namespace Content.Client.Administration.UI.CustomControls; +/** + * FRONTIER CHANGE: Added SeparatorColor so it can be set in the UI. + */ public sealed class HSeparator : Control { - private static readonly Color SeparatorColor = Color.FromHex("#3D4059"); + private static readonly Color DefaultSeparatorColor = Color.FromHex("#3D4059"); + + private Color _separatorColor = DefaultSeparatorColor; + public Color SeparatorColor + { + get => _separatorColor; + set + { + _separatorColor = Color.FromHex(value.ToHex()); + UpdateSeparatorColor(); + } + } + + private PanelContainer? _panelContainer = null; public HSeparator(Color color) { - AddChild(new PanelContainer + SeparatorColor = color; + Initialize(); + } + + public HSeparator() : this(DefaultSeparatorColor) { } + + private void Initialize() + { + _panelContainer = new PanelContainer { PanelOverride = new StyleBoxFlat { - BackgroundColor = color, - ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2 + BackgroundColor = SeparatorColor, + ContentMarginBottomOverride = 2, + ContentMarginLeftOverride = 2 } - }); + }; + AddChild(_panelContainer); } - public HSeparator() : this(SeparatorColor) { } + private void UpdateSeparatorColor() + { + if (_panelContainer?.PanelOverride is StyleBoxFlat styleBox) + { + styleBox.BackgroundColor = SeparatorColor; + } + } } diff --git a/Content.Client/Crayon/CrayonSystem.cs b/Content.Client/Crayon/CrayonSystem.cs index 2ed82b6a711..d489361afba 100644 --- a/Content.Client/Crayon/CrayonSystem.cs +++ b/Content.Client/Crayon/CrayonSystem.cs @@ -65,6 +65,17 @@ protected override void FrameUpdate(FrameEventArgs args) } _parent.UIUpdateNeeded = false; + + // Frontier: unlimited crayon + if (_parent.Capacity == int.MaxValue) + { + _label.SetMarkup(Robust.Shared.Localization.Loc.GetString("crayon-drawing-label-unlimited", + ("color", _parent.Color), + ("state", _parent.SelectedState))); + return; + } + // End Frontier + _label.SetMarkup(Robust.Shared.Localization.Loc.GetString("crayon-drawing-label", ("color",_parent.Color), ("state",_parent.SelectedState), diff --git a/Content.Client/DeltaV/Abilities/CrawlUnderObjectsSystem.cs b/Content.Client/DeltaV/Abilities/CrawlUnderObjectsSystem.cs new file mode 100644 index 00000000000..879a5efee55 --- /dev/null +++ b/Content.Client/DeltaV/Abilities/CrawlUnderObjectsSystem.cs @@ -0,0 +1,44 @@ +using Content.Shared.DeltaV.Abilities; +using Content.Shared.Popups; +using Robust.Client.GameObjects; +using DrawDepth = Content.Shared.DrawDepth.DrawDepth; + +namespace Content.Client.DeltaV.Abilities; + +public sealed partial class HideUnderTableAbilitySystem : SharedCrawlUnderObjectsSystem +{ + [Dependency] private readonly AppearanceSystem _appearance = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnAppearanceChange); + } + + private void OnAppearanceChange(EntityUid uid, + CrawlUnderObjectsComponent component, + AppearanceChangeEvent args) + { + if (!TryComp(uid, out var sprite)) + return; + + _appearance.TryGetData(uid, SneakMode.Enabled, out bool enabled); + if (enabled) + { + if (component.OriginalDrawDepth != null) + return; + + component.OriginalDrawDepth = sprite.DrawDepth; + sprite.DrawDepth = (int) DrawDepth.SmallMobs; + } + else + { + if (component.OriginalDrawDepth == null) + return; + + sprite.DrawDepth = (int) component.OriginalDrawDepth; + component.OriginalDrawDepth = null; + } + } +} diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs index 1c2d70c8db6..56d1a04c4ef 100644 --- a/Content.Client/Entry/EntryPoint.cs +++ b/Content.Client/Entry/EntryPoint.cs @@ -35,6 +35,7 @@ using Robust.Shared.Prototypes; using Robust.Shared.Replays; using Robust.Shared.Timing; +using Content.Client._NF.Emp.Overlays; // Frontier namespace Content.Client.Entry { @@ -154,6 +155,7 @@ public override void PostInit() _overlayManager.AddOverlay(new SingularityOverlay()); _overlayManager.AddOverlay(new RadiationPulseOverlay()); + _overlayManager.AddOverlay(new EmpBlastOverlay()); // Frontier _chatManager.Initialize(); _clientPreferencesManager.Initialize(); _euiManager.Initialize(); diff --git a/Content.Client/GPS/Components/HandheldGPSComponent.cs b/Content.Client/GPS/Components/HandheldGPSComponent.cs deleted file mode 100644 index 0f5271fd80c..00000000000 --- a/Content.Client/GPS/Components/HandheldGPSComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Content.Shared.GPS; - -namespace Content.Client.GPS.Components -{ - [RegisterComponent] - public sealed partial class HandheldGPSComponent : SharedHandheldGPSComponent - { - } -} diff --git a/Content.Client/GPS/Systems/HandheldGpsSystem.cs b/Content.Client/GPS/Systems/HandheldGpsSystem.cs index cc2b888da37..3f38a3b6952 100644 --- a/Content.Client/GPS/Systems/HandheldGpsSystem.cs +++ b/Content.Client/GPS/Systems/HandheldGpsSystem.cs @@ -1,4 +1,4 @@ -using Content.Client.GPS.Components; +using Content.Shared.GPS.Components; using Content.Client.GPS.UI; using Content.Client.Items; diff --git a/Content.Client/GPS/UI/HandheldGpsStatusControl.cs b/Content.Client/GPS/UI/HandheldGpsStatusControl.cs index 7dcf3f29c51..57645e386e7 100644 --- a/Content.Client/GPS/UI/HandheldGpsStatusControl.cs +++ b/Content.Client/GPS/UI/HandheldGpsStatusControl.cs @@ -1,4 +1,4 @@ -using Content.Client.GPS.Components; +using Content.Shared.GPS.Components; using Content.Client.Message; using Content.Client.Stylesheets; using Robust.Client.GameObjects; @@ -30,6 +30,13 @@ protected override void FrameUpdate(FrameEventArgs args) { base.FrameUpdate(args); + // don't display the label if the gps component is being removed + if (_parent.Comp.LifeStage > ComponentLifeStage.Running) + { + _label.Visible = false; + return; + } + _updateDif += args.DeltaSeconds; if (_updateDif < _parent.Comp.UpdateRate) return; @@ -44,9 +51,9 @@ private void UpdateGpsDetails() var posText = "Error"; if (_entMan.TryGetComponent(_parent, out TransformComponent? transComp)) { - var pos = _transform.GetMapCoordinates(_parent.Owner, xform: transComp); - var x = (int) pos.X; - var y = (int) pos.Y; + var pos = _transform.GetMapCoordinates(_parent.Owner, xform: transComp); + var x = (int)pos.X; + var y = (int)pos.Y; posText = $"({x}, {y})"; } _label.SetMarkup(Loc.GetString("handheld-gps-coordinates-title", ("coordinates", posText))); diff --git a/Content.Client/GameTicking/Managers/ClientGameTicker.cs b/Content.Client/GameTicking/Managers/ClientGameTicker.cs index fcf5ae91a49..d82724e6c7b 100644 --- a/Content.Client/GameTicking/Managers/ClientGameTicker.cs +++ b/Content.Client/GameTicking/Managers/ClientGameTicker.cs @@ -1,15 +1,14 @@ +using System.Linq; using Content.Client.Administration.Managers; using Content.Client.Gameplay; using Content.Client.Lobby; using Content.Client.RoundEnd; using Content.Shared.GameTicking; using Content.Shared.GameWindow; -using Content.Shared.Roles; using JetBrains.Annotations; using Robust.Client.Graphics; using Robust.Client.State; using Robust.Client.UserInterface; -using Robust.Shared.Prototypes; namespace Content.Client.GameTicking.Managers { @@ -21,8 +20,7 @@ public sealed class ClientGameTicker : SharedGameTicker [Dependency] private readonly IClyde _clyde = default!; [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!; - private Dictionary, int?>> _jobsAvailable = new(); - private Dictionary _stationNames = new(); + private Dictionary _stationJobInformationList = new(); [ViewVariables] public bool AreWeReady { get; private set; } [ViewVariables] public bool IsGameStarted { get; private set; } @@ -33,13 +31,21 @@ public sealed class ClientGameTicker : SharedGameTicker [ViewVariables] public TimeSpan StartTime { get; private set; } [ViewVariables] public new bool Paused { get; private set; } - [ViewVariables] public IReadOnlyDictionary, int?>> JobsAvailable => _jobsAvailable; - [ViewVariables] public IReadOnlyDictionary StationNames => _stationNames; + [ViewVariables] public IReadOnlyDictionary StationJobInformationList => _stationJobInformationList; + + // Frontier addition + // Replaced StationNames with a getter that uses _stationJobInformationList + [ViewVariables] + public IReadOnlyDictionary StationNames => + _stationJobInformationList.ToDictionary( + kvp => kvp.Key, + kvp => kvp.Value.StationName + ); public event Action? InfoBlobUpdated; public event Action? LobbyStatusUpdated; public event Action? LobbyLateJoinStatusUpdated; - public event Action, int?>>>? LobbyJobsAvailableUpdated; + public event Action>? LobbyJobsAvailableUpdated; public override void Initialize() { @@ -87,20 +93,9 @@ private void LateJoinStatus(TickerLateJoinStatusEvent message) private void UpdateJobsAvailable(TickerJobsAvailableEvent message) { - _jobsAvailable.Clear(); - - foreach (var (job, data) in message.JobsAvailableByStation) - { - _jobsAvailable[job] = data; - } - - _stationNames.Clear(); - foreach (var weh in message.StationNames) - { - _stationNames[weh.Key] = weh.Value; - } - - LobbyJobsAvailableUpdated?.Invoke(JobsAvailable); + _stationJobInformationList.Clear(); + _stationJobInformationList = message.StationJobList; + LobbyJobsAvailableUpdated?.Invoke(StationJobInformationList); } private void JoinLobby(TickerJoinLobbyEvent message) diff --git a/Content.Client/Kitchen/UI/MicrowaveBoundUserInterface.cs b/Content.Client/Kitchen/UI/MicrowaveBoundUserInterface.cs index 643ac47054b..05904007544 100644 --- a/Content.Client/Kitchen/UI/MicrowaveBoundUserInterface.cs +++ b/Content.Client/Kitchen/UI/MicrowaveBoundUserInterface.cs @@ -21,8 +21,24 @@ public sealed class MicrowaveBoundUserInterface : BoundUserInterface [ViewVariables] private readonly Dictionary _reagents = new(); + // Frontier: UI parameters + private readonly string _menuTitle; + private readonly string _leftFlavorText; + public MicrowaveBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { + // Frontier: switch UI params based on key + if ((MicrowaveUiKey)uiKey == MicrowaveUiKey.ElectricRangeKey) + { + _menuTitle = "microwave-menu-range-title"; + _leftFlavorText = "microwave-menu-range-footer-flavor-left"; + } + else + { + _menuTitle = "microwave-menu-title"; + _leftFlavorText = "microwave-menu-footer-flavor-left"; + } + // End Frontier } protected override void Open() @@ -60,6 +76,10 @@ protected override void Open() ("time", Loc.GetString("microwave-menu-instant-button"))); } }; + // Frontier: UI customization + _menu.Title = Loc.GetString(_menuTitle); + _menu.LeftFooter.Text = Loc.GetString(_leftFlavorText); + // End Frontier } protected override void UpdateState(BoundUserInterfaceState state) diff --git a/Content.Client/Kitchen/UI/MicrowaveMenu.xaml b/Content.Client/Kitchen/UI/MicrowaveMenu.xaml index cd81ea0a9bf..c99462d9e7a 100644 --- a/Content.Client/Kitchen/UI/MicrowaveMenu.xaml +++ b/Content.Client/Kitchen/UI/MicrowaveMenu.xaml @@ -98,7 +98,7 @@ -