-
Notifications
You must be signed in to change notification settings - Fork 592
Manager of Assistants - Part 2 & ID card computer QOL #5546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
walksanatora
merged 11 commits into
ss14Starlight:starlight-dev
from
bynddark8:assistant-manager
Aug 18, 2026
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
496181a
init
bynddark8 640252f
Merge branch 'starlight-dev' into assistant-manager
bynddark8 e87c27f
removed HOP steal group
bynddark8 ae6fc59
fixes lack of definition for a null icon
bynddark8 4f7005a
Merge branch 'assistant-manager' of https://github.com/bynddark8/spac…
bynddark8 24c9cce
emag validation fixes
bynddark8 f3f9fff
force refresh on emag
bynddark8 cd4c26b
nitpicks and documentation fix
bynddark8 1839c1b
replaces hardcoded console tags with RequiredTags component
bynddark8 9fff426
Merge branch 'starlight-dev' into assistant-manager
bynddark8 e87682a
adds the board to the loadout
bynddark8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
65 changes: 65 additions & 0 deletions
65
Content.Client/_Starlight/Access/UI/JobIdentityConsoleBoundUserInterface.cs
This file contains hidden or 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,65 @@ | ||
| using Content.Shared._Starlight.Access.Components; | ||
| using Content.Shared.CCVar; | ||
| using Content.Shared.Containers.ItemSlots; | ||
| using Content.Shared.StatusIcon; | ||
| using Robust.Client.UserInterface; | ||
| using Robust.Shared.Configuration; | ||
| using Robust.Shared.Prototypes; | ||
| using static Content.Shared._Starlight.Access.Components.JobIdentityConsoleComponent; | ||
|
|
||
| namespace Content.Client._Starlight.Access.UI; | ||
|
|
||
| public sealed partial class JobIdentityConsoleBoundUserInterface : BoundUserInterface | ||
| { | ||
| [Dependency] private IConfigurationManager _cfgManager = default!; | ||
|
|
||
| private JobIdentityConsoleWindow? _window; | ||
|
|
||
| private readonly int _maxIdJobLength; | ||
|
|
||
| public JobIdentityConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) | ||
| { | ||
| _maxIdJobLength = _cfgManager.GetCVar(CCVars.MaxIdJobLength); | ||
| } | ||
|
|
||
| protected override void Open() | ||
| { | ||
| base.Open(); | ||
|
|
||
| var requiredTags = EntMan.GetComponent<JobIdentityConsoleComponent>(Owner).RequiredTags; | ||
|
|
||
| _window = this.CreateWindow<JobIdentityConsoleWindow>(); | ||
| _window.Initialize(this, requiredTags); | ||
| _window.Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName; | ||
|
|
||
| _window.PrivilegedIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(PrivilegedIdCardSlotId)); | ||
| _window.TargetIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(TargetIdCardSlotId)); | ||
|
|
||
| _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 = (JobIdentityConsoleBoundUserInterfaceState) state; | ||
| _window?.UpdateState(castState); | ||
| } | ||
|
|
||
| public void SubmitData(string newJobTitle, ProtoId<JobIconPrototype> newJobIcon) | ||
| { | ||
| if (newJobTitle.Length > _maxIdJobLength) | ||
| newJobTitle = newJobTitle[.._maxIdJobLength]; | ||
|
|
||
| SendMessage(new WriteJobIdentityMessage(newJobTitle, newJobIcon)); | ||
| } | ||
| } |
30 changes: 30 additions & 0 deletions
30
Content.Client/_Starlight/Access/UI/JobIdentityConsoleWindow.xaml
This file contains hidden or 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,30 @@ | ||
| <DefaultWindow xmlns="https://spacestation14.io" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| Title="{Loc 'job-identity-console-window-title'}" | ||
| MinSize="420 280"> | ||
| <BoxContainer Orientation="Vertical"> | ||
| <!-- Privileged and target IDs. --> | ||
| <GridContainer Columns="3" HorizontalExpand="True"> | ||
| <Label Text="{Loc 'id-card-console-window-privileged-id'}" /> | ||
| <Button Name="PrivilegedIdButton" Access="Public"/> | ||
| <Label Name="PrivilegedIdLabel" /> | ||
|
|
||
| <Label Text="{Loc 'id-card-console-window-target-id'}" /> | ||
| <Button Name="TargetIdButton" Access="Public"/> | ||
| <Label Name="TargetIdLabel" /> | ||
| </GridContainer> | ||
| <Control MinSize="0 8" /> | ||
| <!-- Job title editing. --> | ||
| <GridContainer Columns="3" HSeparationOverride="4"> | ||
| <Label Name="JobTitleLabel" Text="{Loc 'id-card-console-window-job-title-label'}" /> | ||
| <LineEdit Name="JobTitleLineEdit" HorizontalExpand="True" /> | ||
| <Button Name="JobTitleSaveButton" Text="{Loc 'id-card-console-window-save-button'}" Disabled="True" /> | ||
| </GridContainer> | ||
| <Control MinSize="0 8" /> | ||
| <!-- Job icon selection. --> | ||
| <Label Name="IconGridLabel" Text="{Loc 'agent-id-card-job-icon-label'}"/> | ||
| <GridContainer Name="IconGrid" Columns="10"> | ||
| <!-- Job icon buttons are generated in code --> | ||
| </GridContainer> | ||
| </BoxContainer> | ||
| </DefaultWindow> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.