-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from VMSolidus/upstream-merge-7-21-2024
Upstream Merge 7/21/2024 Only 4 tests fails and it runs, that's good enough for me.
- Loading branch information
Showing
2,200 changed files
with
32,497 additions
and
14,326 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
{ | ||
"omnisharp.analyzeOpenDocumentsOnly": true, | ||
"dotnet.defaultSolution": "SpaceStation14.sln" | ||
"dotnet.defaultSolution": "SpaceStation14.sln", | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": [ "**/meta.json" ], | ||
"url": "https://raw.githubusercontent.com/Simple-Station/Einstein-Engines/master/.github/rsi-schema.json" | ||
} | ||
] | ||
} |
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,4 @@ | ||
<GridContainer xmlns="https://spacestation14.io" | ||
Columns="5" | ||
HorizontalAlignment="Center"> | ||
</GridContainer> |
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,52 @@ | ||
using System.Linq; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface; | ||
using Robust.Client.UserInterface.Controls; | ||
using Robust.Client.UserInterface.XAML; | ||
using Robust.Shared.Prototypes; | ||
using Content.Shared.Access; | ||
using Content.Shared.Access.Systems; | ||
|
||
namespace Content.Client.Access.UI; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class AccessLevelControl : GridContainer | ||
{ | ||
public readonly Dictionary<ProtoId<AccessLevelPrototype>, Button> ButtonsList = new(); | ||
|
||
public AccessLevelControl() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
} | ||
|
||
public void Populate(List<ProtoId<AccessLevelPrototype>> accessLevels, IPrototypeManager prototypeManager) | ||
{ | ||
foreach (var access in accessLevels) | ||
{ | ||
if (!prototypeManager.TryIndex(access, out var accessLevel)) | ||
{ | ||
Logger.Error($"Unable to find accesslevel for {access}"); | ||
continue; | ||
} | ||
|
||
var newButton = new Button | ||
{ | ||
Text = accessLevel.GetAccessLevelName(), | ||
ToggleMode = true, | ||
}; | ||
AddChild(newButton); | ||
ButtonsList.Add(accessLevel.ID, newButton); | ||
} | ||
} | ||
|
||
public void UpdateState( | ||
List<ProtoId<AccessLevelPrototype>> pressedList, | ||
List<ProtoId<AccessLevelPrototype>>? enabledList = null) | ||
{ | ||
foreach (var (accessName, button) in ButtonsList) | ||
{ | ||
button.Pressed = pressedList.Contains(accessName); | ||
button.Disabled = !(enabledList?.Contains(accessName) ?? 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
Oops, something went wrong.