Skip to content

Commit

Permalink
Upstream2707 (AdventureTimeSS14#139)
Browse files Browse the repository at this point in the history
<!-- ЭТО ШАБЛОН ВАШЕГО PULL REQUEST. Текст между стрелками - это
комментарии - они не будут видны в PR. -->

## Описание PR
<!-- Ниже опишите ваш Pull Request. Что он изменяет? На что еще это
может повлиять? Постарайтесь описать все внесённые вами изменения! -->

## Changelog.yml
<details><summary>Лист чейнжлогов, смотреть подробнее..</summary>

```yml
- author: SlamBamActionman
  changes:
  - message: RGBee and Rainbow Carp plushies now cycle color when held/worn.
    type: Fix
  id: 6917
  time: '2024-07-14T10:26:34.0000000+00:00'
  url: space-wizards/space-station-14#30023
- author: Winkarst-cpu
  changes:
  - message: Now grappling gun is clumsy proof.
    type: Tweak
  id: 6918
  time: '2024-07-14T10:26:56.0000000+00:00'
  url: space-wizards/space-station-14#29904
- author: HahayesSiH
  changes:
  - message: It is now possible to pet cyborgs.
    type: Add
  - message: Clicking on cyborgs and opening the strip menu no longer unlocks them.
    type: Tweak
  id: 6919
  time: '2024-07-14T14:09:41.0000000+00:00'
  url: space-wizards/space-station-14#30037
- author: deltanedas
  changes:
  - message: Fixed ninja shoes not working as magboots.
    type: Fix
  id: 6920
  time: '2024-07-14T15:11:40.0000000+00:00'
  url: space-wizards/space-station-14#28586
- author: lzk228
  changes:
  - message: Scarves are eatable again.
    type: Fix
  id: 6921
  time: '2024-07-14T15:12:25.0000000+00:00'
  url: space-wizards/space-station-14#29959
- author: Winkarst-cpu
  changes:
  - message: Now addgamerule command processes only valid game rules.
    type: Fix
  id: 6922
  time: '2024-07-15T19:18:33.0000000+00:00'
  url: space-wizards/space-station-14#29912
- author: Jezithyr
  changes:
  - message: Removed the Geras ability from Slimes
    type: Remove
  id: 6923
  time: '2024-07-16T22:50:17.0000000+00:00'
  url: space-wizards/space-station-14#29731
- author: K-Dynamic
  changes:
  - message: nerfed paraylze timer of all slippable objects (including soaps, water
      puddles, and clown-related items)
    type: Tweak
  id: 6924
  time: '2024-07-16T23:26:02.0000000+00:00'
  url: space-wizards/space-station-14#27879
- author: EmoGarbage404
  changes:
  - message: Resprited wall signs.
    type: Tweak
  id: 6925
  time: '2024-07-17T04:35:19.0000000+00:00'
  url: space-wizards/space-station-14#29806
- author: lzk228
  changes:
  - message: Added health examine for caustic and cold damage.
    type: Add
  id: 6926
  time: '2024-07-17T06:19:13.0000000+00:00'
  url: space-wizards/space-station-14#29989
- author: lzk228
  changes:
  - message: Surgery saws now are normal-sized (no more pocket circular saw).
    type: Tweak
  id: 6927
  time: '2024-07-17T06:26:10.0000000+00:00'
  url: space-wizards/space-station-14#29995
- author: Winkarst-cpu
  changes:
  - message: The super door remote is now able to control Syndicate doors.
    type: Fix
  id: 6928
  time: '2024-07-17T13:50:25.0000000+00:00'
  url: space-wizards/space-station-14#30033
- author: Errant
  changes:
  - message: Vox are temporarily removed from Space Ninjas and all Unknown Shuttle
      ghostroles, until code supports giving them species-specific gear.
    type: Tweak
  id: 6929
  time: '2024-07-17T22:04:51.0000000+00:00'
  url: space-wizards/space-station-14#30099
- author: Cojoke-dot
  changes:
  - message: You can no longer teleport objects that should not be in other objects
      into other objects with the Quantum Spin Inverter
    type: Fix
  id: 6930
  time: '2024-07-18T00:40:54.0000000+00:00'
  url: space-wizards/space-station-14#29200
- author: Plykiya
  changes:
  - message: Stun batons no longer use up charges when hitting objects without stamina.
    type: Fix
  id: 6931
  time: '2024-07-18T00:48:09.0000000+00:00'
  url: space-wizards/space-station-14#30136
- author: Sh18RW
  changes:
  - message: Moth can't eat boots with an item more
    type: Fix
  id: 6932
  time: '2024-07-18T22:34:18.0000000+00:00'
  url: space-wizards/space-station-14#30019
- author: portfiend
  changes:
  - message: Reptilians display correct mask sprites in character customization screen.
    type: Fix
  id: 6933
  time: '2024-07-18T22:36:53.0000000+00:00'
  url: space-wizards/space-station-14#30095
- author: Plykiya
  changes:
  - message: You no longer deal double damage to your first target when throwing an
      item.
    type: Fix
  id: 6934
  time: '2024-07-19T01:08:52.0000000+00:00'
  url: space-wizards/space-station-14#30115
- author: deepdarkdepths
  changes:
  - message: Removed the description about geras in the Slime guidebook section.
    type: Remove
  id: 6935
  time: '2024-07-19T09:04:43.0000000+00:00'
  url: space-wizards/space-station-14#30140
- author: Blackern5000
  changes:
  - message: Nuclear operatives are now able to purchase durable armor which is NOT
      space-proof.
    type: Add
  id: 6936
  time: '2024-07-19T09:38:26.0000000+00:00'
  url: space-wizards/space-station-14#29845
- author: Plykiya, slarticodefast
  changes:
  - message: Explosive pens now correctly embed into their target.
    type: Fix
  id: 6937
  time: '2024-07-19T09:42:58.0000000+00:00'
  url: space-wizards/space-station-14#30112
- author: ThatOneEnby1337
  changes:
  - message: News Reporters are now able to use markup tags in their reports without
      bricking the PDAs of readers
    type: Fix
  id: 6938
  time: '2024-07-19T14:18:39.0000000+00:00'
  url: space-wizards/space-station-14#30169
- author: themias
  changes:
  - message: Mailing units are functional again
    type: Fix
  id: 6939
  time: '2024-07-20T02:31:26.0000000+00:00'
  url: space-wizards/space-station-14#30174
- author: Ghagliiarghii
  changes:
  - message: Nuclear Operatives' Reinforcements now have a PDA!
    type: Tweak
  id: 6940
  time: '2024-07-20T02:59:31.0000000+00:00'
  url: space-wizards/space-station-14#28088
- author: Plykiya
  changes:
  - message: Chameleon scarves now work again.
    type: Fix
  id: 6941
  time: '2024-07-20T03:00:28.0000000+00:00'
  url: space-wizards/space-station-14#30156
- author: Aidenkrz
  changes:
  - message: The mass hallucinations event no longer affects non-humanoids.
    type: Fix
  id: 6942
  time: '2024-07-20T05:53:58.0000000+00:00'
  url: space-wizards/space-station-14#28748
- author: buntobaggins
  changes:
  - message: Increased light radius on the Spationaut Hardsuit
    type: Tweak
  id: 6943
  time: '2024-07-21T03:29:21.0000000+00:00'
  url: space-wizards/space-station-14#30049
- author: EmoGarbage404
  changes:
  - message: Fixed wires not updating UI on the Particle Accelerator.
    type: Fix
  id: 6944
  time: '2024-07-21T05:27:18.0000000+00:00'
  url: space-wizards/space-station-14#28750
- author: CroilBird
  changes:
  - message: 6-pack of cola displays correctly when not being handled
    type: Fix
  id: 6945
  time: '2024-07-21T05:49:48.0000000+00:00'
  url: space-wizards/space-station-14#29309
- author: metalgearsloth
  changes:
  - message: Fix muzzle flashes not tracking properly.
    type: Fix
  id: 6946
  time: '2024-07-21T06:09:17.0000000+00:00'
  url: space-wizards/space-station-14#30163
- author: metalgearsloth
  changes:
  - message: Fix being able to throw items while your cursor is off-screen.
    type: Fix
  id: 6947
  time: '2024-07-21T06:13:28.0000000+00:00'
  url: space-wizards/space-station-14#30164
- author: metalgearsloth
  changes:
  - message: Reset the scroll bar in the ghost warp menu whenever you search for a
      role. Previously it remained at your previous position and you would have to
      scroll up to see the first entry.
    type: Tweak
  id: 6948
  time: '2024-07-21T06:38:45.0000000+00:00'
  url: space-wizards/space-station-14#30159
- author: Blackern5000
  changes:
  - message: The syndicate agent's cyborg weapons module now uses syndicate weaponry
      rather than NT weaponry.
    type: Tweak
  id: 6949
  time: '2024-07-21T07:04:33.0000000+00:00'
  url: space-wizards/space-station-14#26947
- author: Winkarst-cpu
  changes:
  - message: Added ambience to the camera routers and telecommunication servers.
    type: Add
  - message: Now server's and router's ambience stops once they are unpowered.
    type: Fix
  id: 6950
  time: '2024-07-21T07:22:02.0000000+00:00'
  url: space-wizards/space-station-14#30091
- author: Scott Dimeling
  changes:
  - message: Reduced the number of botanists in some stations, for optimal _workflow_
    type: Tweak
  id: 6951
  time: '2024-07-21T07:23:28.0000000+00:00'
  url: space-wizards/space-station-14#29581
- author: metalgearsloth
  changes:
  - message: Escape pods won't show up on shuttle map anymore.
    type: Tweak
  id: 6952
  time: '2024-07-21T07:23:44.0000000+00:00'
  url: space-wizards/space-station-14#29758
- author: IProduceWidgets
  changes:
  - message: an arabian lamp!
    type: Add
  id: 6953
  time: '2024-07-21T07:24:28.0000000+00:00'
  url: space-wizards/space-station-14#27270
- author: osjarw
  changes:
  - message: NPCs no longer get stuck trying to pick up anchored pipes.
    type: Fix
  id: 6954
  time: '2024-07-21T07:28:37.0000000+00:00'
  url: space-wizards/space-station-14#30061
- author: The Hands Leader - JoJo cat
  changes:
  - message: Train map is back into rotation
    type: Tweak
  id: 6955
  time: '2024-07-21T07:44:18.0000000+00:00'
  url: space-wizards/space-station-14#30145
```

</details>


**Медиа**
<!-- Если приемлемо, добавьте скриншоты для демонстрации вашего PR. Если
ваш PR представляет собой визуальное изменение, добавьте
скриншоты, иначе он может быть закрыт. -->

**Проверки**
<!-- Выполнение всех следующих действий, если это приемлемо для вида
изменений сильно ускорит разбор вашего PR -->
- [ ] PR полностью завершён и мне не нужна помощь чтобы его закончить.
- [ ] Я внимательно просмотрел все свои изменения и багов в них не
нашёл.
- [ ] Я запускал локальный сервер со своими изменениями и всё
протестировал.
- [ ] Я добавил скриншот/видео демонстрации PR в игре, **или** этот PR
этого не требует.

**Изменения**

:cl: Шрёдька
- tweak: Подтянуты коммиты с корвакса, 27.07.24
  • Loading branch information
Schrodinger71 committed Jul 27, 2024
2 parents 48402eb + 825b55a commit a89ccb7
Show file tree
Hide file tree
Showing 558 changed files with 96,656 additions and 96,138 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ csharp_indent_braces = false
csharp_indent_switch_labels = true

# Space preferences
csharp_space_after_cast = true
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
Expand Down
63 changes: 36 additions & 27 deletions .github/workflows/publish-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,23 @@ name: Publish Public
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
- cron: '0 1 * * *'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check configuration
env:
PUBLIC_PATH: ${{ secrets.BUILDS_PUBLIC_PATH }}
if: ${{ env.PUBLIC_PATH == '' }}
uses: andymckay/[email protected]
# - name: Install dependencies
# run: sudo apt-get install -y python3-paramiko python3-lxml

- uses: actions/[email protected]
with:
submodules: 'recursive'

- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Get Engine Tag
run: |
Expand All @@ -40,27 +36,40 @@ jobs:
run: dotnet build Content.Packaging --configuration Release --no-restore /m

- name: Package server
run: dotnet run --project Content.Packaging server --hybrid-acz --platform win-x64 --platform linux-x64 --platform osx-x64 --platform linux-arm64
run: dotnet run --project Content.Packaging server --platform win-x64 --platform linux-x64 --platform osx-x64 --platform linux-arm64

- name: Shuffle files around
run: |
mkdir "release/${{ github.sha }}"
mv release/SS14.Server*.zip "release/${{ github.sha }}"
- name: Package client
run: dotnet run --project Content.Packaging client --no-wipe-release

- name: Upload files to mothership
uses: burnett01/[email protected]
- name: Upload build artifact
id: artifact-upload-step
uses: actions/upload-artifact@v4
with:
switches: -avzr --ignore-existing
path: "release/${{ github.sha }}"
remote_path: ${{ secrets.BUILDS_PUBLIC_PATH }}
remote_host: ${{ secrets.BUILDS_HOST }}
remote_user: ${{ secrets.BUILDS_USERNAME }}
remote_key: ${{ secrets.BUILDS_SSH_KEY }}
name: build
path: release/*.zip
compression-level: 0
retention-days: 0

- name: Publish version
run: Tools/publish_github_artifact.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
ARTIFACT_ID: ${{ steps.artifact-upload-step.outputs.artifact-id }}
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }}

# - 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 }}

- name: Generate public HTML
uses: appleboy/ssh-action@master
- uses: geekyeggo/delete-artifact@v5
if: always()
with:
host: ${{ secrets.BUILDS_HOST }}
username: ${{ secrets.BUILDS_USERNAME }}
key: ${{ secrets.BUILDS_SSH_KEY }}
script: node ~/scripts/generate_html_page.js -fork ${{ vars.FORK_ID_PUBLIC }} -id ${{ github.sha }}
name: build
44 changes: 12 additions & 32 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Publish

concurrency:
group: publish
#concurrency:
# group: publish

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'
- cron: '0 1 * * *'

jobs:
build:
Expand All @@ -19,25 +19,6 @@ jobs:
- uses: actions/[email protected]
with:
submodules: 'recursive'

# Corvax-Secrets-Start
- name: Setup secrets
env:
SSH_KEY: ${{ secrets.SECRETS_PRIVATE_KEY }}
if: ${{ env.SSH_KEY != '' }}
run: |
mkdir ~/.ssh
echo "${{ secrets.SECRETS_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "HOST *" > ~/.ssh/config
echo "StrictHostKeyChecking no" >> ~/.ssh/config
git clone [email protected]:corvax-nexus/secrets.git Secrets
cp -R Secrets/Resources/Prototypes Resources/Prototypes/CorvaxSecrets
cp -R Secrets/Resources/ServerPrototypes Resources/Prototypes/CorvaxSecretsServer
cp -R Secrets/Resources/Locale Resources/Locale/ru-RU/corvax-secrets
cp -R Secrets/Resources/Textures Resources/Textures/CorvaxSecrets
# Corvax-Secrets-End

- name: Setup .NET Core
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -77,17 +58,16 @@ jobs:
ARTIFACT_ID: ${{ steps.artifact-upload-step.outputs.artifact-id }}
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }}

# - 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 }}
# TRANSLATION_API_URL: ${{ secrets.CHANGELOG_TRANSLATION_API_URL }}
# - 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 }}
# - 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()
Expand Down
9 changes: 8 additions & 1 deletion Content.Client/Access/UI/AccessLevelControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ namespace Content.Client.Access.UI;
[GenerateTypedNameReferences]
public sealed partial class AccessLevelControl : GridContainer
{
[Dependency] private readonly ILogManager _logManager = default!;

private ISawmill _sawmill = default!;

public readonly Dictionary<ProtoId<AccessLevelPrototype>, Button> ButtonsList = new();

public AccessLevelControl()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);

_sawmill = _logManager.GetSawmill("accesslevelcontrol");
}

public void Populate(List<ProtoId<AccessLevelPrototype>> accessLevels, IPrototypeManager prototypeManager)
Expand All @@ -25,7 +32,7 @@ public void Populate(List<ProtoId<AccessLevelPrototype>> accessLevels, IPrototyp
{
if (!prototypeManager.TryIndex(access, out var accessLevel))
{
Logger.Error($"Unable to find accesslevel for {access}");
_sawmill.Error($"Unable to find accesslevel for {access}");
continue;
}

Expand Down
45 changes: 25 additions & 20 deletions Content.Client/Access/UI/AccessOverriderBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Content.Shared.Containers.ItemSlots;
using Robust.Client.UserInterface;
using Robust.Shared.Prototypes;
using static Content.Shared.Access.Components.AccessOverriderComponent;

Expand All @@ -23,45 +24,49 @@ protected override void Open()
{
base.Open();

_window = this.CreateWindow<AccessOverriderWindow>();
RefreshAccess();
_window.Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName;
_window.OnSubmit += SubmitData;

_window.PrivilegedIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(PrivilegedIdCardSlotId));
}

public override void OnProtoReload(PrototypesReloadedEventArgs args)
{
base.OnProtoReload(args);
if (!args.WasModified<AccessLevelPrototype>())
return;

RefreshAccess();

if (State != null)
_window?.UpdateState(_prototypeManager, (AccessOverriderBoundUserInterfaceState) State);
}

private void RefreshAccess()
{
List<ProtoId<AccessLevelPrototype>> accessLevels;

if (EntMan.TryGetComponent<AccessOverriderComponent>(Owner, out var accessOverrider))
{
accessLevels = accessOverrider.AccessLevels;
accessLevels.Sort();
}

else
{
accessLevels = new List<ProtoId<AccessLevelPrototype>>();
_accessOverriderSystem.Log.Error($"No AccessOverrider component found for {EntMan.ToPrettyString(Owner)}!");
}

_window = new AccessOverriderWindow(this, _prototypeManager, accessLevels)
{
Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName
};

_window.PrivilegedIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(PrivilegedIdCardSlotId));

_window.OnClose += Close;
_window.OpenCentered();
}

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

_window?.Dispose();
_window?.SetAccessLevels(_prototypeManager, accessLevels);
}

protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
var castState = (AccessOverriderBoundUserInterfaceState) state;
_window?.UpdateState(castState);
_window?.UpdateState(_prototypeManager, castState);
}

public void SubmitData(List<ProtoId<AccessLevelPrototype>> newAccessList)
Expand Down
41 changes: 18 additions & 23 deletions Content.Client/Access/UI/AccessOverriderWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,24 @@ namespace Content.Client.Access.UI
[GenerateTypedNameReferences]
public sealed partial class AccessOverriderWindow : DefaultWindow
{
[Dependency] private readonly ILogManager _logManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;

private readonly AccessOverriderBoundUserInterface _owner;
private readonly Dictionary<string, Button> _accessButtons = new();

public AccessOverriderWindow(AccessOverriderBoundUserInterface owner, IPrototypeManager prototypeManager,
List<ProtoId<AccessLevelPrototype>> accessLevels)
public event Action<List<ProtoId<AccessLevelPrototype>>>? OnSubmit;

public AccessOverriderWindow()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
var logMill = _logManager.GetSawmill(SharedAccessOverriderSystem.Sawmill);
}

_owner = owner;
public void SetAccessLevels(IPrototypeManager protoManager, List<ProtoId<AccessLevelPrototype>> accessLevels)
{
_accessButtons.Clear();
AccessLevelGrid.DisposeAllChildren();

foreach (var access in accessLevels)
{
if (!prototypeManager.TryIndex(access, out var accessLevel))
if (!protoManager.TryIndex(access, out var accessLevel))
{
logMill.Error($"Unable to find accesslevel for {access}");
continue;
}

Expand All @@ -44,11 +42,16 @@ public AccessOverriderWindow(AccessOverriderBoundUserInterface owner, IPrototype

AccessLevelGrid.AddChild(newButton);
_accessButtons.Add(accessLevel.ID, newButton);
newButton.OnPressed += _ => SubmitData();
newButton.OnPressed += _ =>
{
OnSubmit?.Invoke(
// Iterate over the buttons dictionary, filter by `Pressed`, only get key from the key/value pair
_accessButtons.Where(x => x.Value.Pressed).Select(x => new ProtoId<AccessLevelPrototype>(x.Key)).ToList());
};
}
}

public void UpdateState(AccessOverriderBoundUserInterfaceState state)
public void UpdateState(IPrototypeManager protoManager, AccessOverriderBoundUserInterfaceState state)
{
PrivilegedIdLabel.Text = state.PrivilegedIdName;
PrivilegedIdButton.Text = state.IsPrivilegedIdPresent
Expand All @@ -66,11 +69,11 @@ public void UpdateState(AccessOverriderBoundUserInterfaceState state)

if (state.MissingPrivilegesList != null && state.MissingPrivilegesList.Any())
{
List<string> missingPrivileges = new List<string>();
var missingPrivileges = new List<string>();

foreach (string tag in state.MissingPrivilegesList)
{
string privilege = Loc.GetString(_prototypeManager.Index<AccessLevelPrototype>(tag)?.Name ?? "generic-unknown");
var privilege = Loc.GetString(protoManager.Index<AccessLevelPrototype>(tag)?.Name ?? "generic-unknown");
missingPrivileges.Add(privilege);
}

Expand All @@ -90,13 +93,5 @@ public void UpdateState(AccessOverriderBoundUserInterfaceState state)
}
}
}

private void SubmitData()
{
_owner.SubmitData(

// Iterate over the buttons dictionary, filter by `Pressed`, only get key from the key/value pair
_accessButtons.Where(x => x.Value.Pressed).Select(x => new ProtoId<AccessLevelPrototype>(x.Key)).ToList());
}
}
}
Loading

0 comments on commit a89ccb7

Please sign in to comment.