-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'new-frontiers-14:master' into oscar-shuttle
- Loading branch information
Showing
3,564 changed files
with
468,216 additions
and
478,587 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: PR Changelogs | ||
concurrency: commit_action | ||
on: | ||
pull_request_target: | ||
types: [closed] | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
CHANGELOG_DIR: Resources/Changelog/Changelog.yml | ||
PR_NUMBER: ${{ github.event.number }} | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged == true | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout Master | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.BOT_TOKEN }} | ||
ref: master | ||
|
||
- name: Setup Git | ||
run: | | ||
git config --global user.name "${{ vars.CHANGELOG_USER }}" | ||
git config --global user.email "${{ vars.CHANGELOG_EMAIL }}" | ||
shell: bash | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Install Dependencies | ||
run: | | ||
cd "Tools/changelog" | ||
npm install | ||
shell: bash | ||
|
||
- name: Generate Changelog | ||
run: | | ||
cd "Tools/changelog" | ||
node changelog.js | ||
shell: bash | ||
|
||
- name: Commit Changelog | ||
run: | | ||
git pull origin master | ||
git add *.yml | ||
git commit -m "${{ vars.CHANGELOG_MESSAGE }} (#${{ env.PR_NUMBER }})" | ||
git push | ||
shell: bash | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Publish Changelog | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 10 * * *' | ||
|
||
jobs: | ||
publish_changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
ref: master | ||
|
||
- name: Publish changelog | ||
run: Tools/actions_changelogs_since_last_run.py | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }} | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Content.Shared.Access.Systems; | ||
using JetBrains.Annotations; | ||
|
||
namespace Content.Client.Access | ||
{ | ||
[UsedImplicitly] | ||
public sealed class AccessOverriderSystem : SharedAccessOverriderSystem | ||
{ | ||
|
||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
Content.Client/Access/UI/AccessOverriderBoundUserInterface.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
using Content.Shared.Access.Components; | ||
using Content.Shared.Access.Systems; | ||
using Content.Shared.Containers.ItemSlots; | ||
using Robust.Client.GameObjects; | ||
using Robust.Shared.Prototypes; | ||
using static Content.Shared.Access.Components.AccessOverriderComponent; | ||
|
||
namespace Content.Client.Access.UI | ||
{ | ||
public sealed class AccessOverriderBoundUserInterface : BoundUserInterface | ||
{ | ||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; | ||
private readonly SharedAccessOverriderSystem _accessOverriderSystem = default!; | ||
|
||
private AccessOverriderWindow? _window; | ||
|
||
public AccessOverriderBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) | ||
{ | ||
_accessOverriderSystem = EntMan.System<SharedAccessOverriderSystem>(); | ||
} | ||
|
||
protected override void Open() | ||
{ | ||
base.Open(); | ||
|
||
List<string> accessLevels; | ||
|
||
if (EntMan.TryGetComponent<AccessOverriderComponent>(Owner, out var accessOverrider)) | ||
{ | ||
accessLevels = accessOverrider.AccessLevels; | ||
accessLevels.Sort(); | ||
} | ||
|
||
else | ||
{ | ||
accessLevels = new List<string>(); | ||
_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(); | ||
} | ||
|
||
protected override void UpdateState(BoundUserInterfaceState state) | ||
{ | ||
base.UpdateState(state); | ||
var castState = (AccessOverriderBoundUserInterfaceState) state; | ||
_window?.UpdateState(castState); | ||
} | ||
|
||
public void SubmitData(List<string> newAccessList) | ||
{ | ||
SendMessage(new WriteToTargetAccessReaderIdMessage(newAccessList)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<DefaultWindow xmlns="https://spacestation14.io" | ||
MinSize="650 290"> | ||
<BoxContainer Orientation="Vertical"> | ||
<GridContainer Columns="2"> | ||
<GridContainer Columns="3" HorizontalExpand="True"> | ||
<Label Text="{Loc 'access-overrider-window-privileged-id'}" /> | ||
<Button Name="PrivilegedIdButton" Access="Public"/> | ||
<Label Name="PrivilegedIdLabel" /> | ||
</GridContainer> | ||
</GridContainer> | ||
<Label Name="TargetNameLabel" /> | ||
<Control MinSize="0 8"/> | ||
<GridContainer Name="AccessLevelGrid" Columns="5" HorizontalAlignment="Center"> | ||
|
||
<!-- Access level buttons are added here by the C# code --> | ||
|
||
</GridContainer> | ||
<Control MinSize="0 8"/> | ||
<Label Name="MissingPrivilegesLabel" /> | ||
<Control MinSize="0 4"/> | ||
<Label Name="MissingPrivilegesText" /> | ||
</BoxContainer> | ||
</DefaultWindow> |
Oops, something went wrong.