-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
809 changed files
with
36,041 additions
and
20,026 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 |
---|---|---|
|
@@ -36,7 +36,7 @@ jobs: | |
- name: Setup .NET Core | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.0.100 | ||
dotnet-version: 8.0.x | ||
|
||
- name: Install dependencies | ||
run: dotnet restore | ||
|
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 |
---|---|---|
|
@@ -36,7 +36,7 @@ jobs: | |
- name: Setup .NET Core | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.0.100 | ||
dotnet-version: 8.0.x | ||
|
||
- name: Install dependencies | ||
run: dotnet restore | ||
|
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
- name: Setup .NET Core | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.0.100 | ||
dotnet-version: 8.0.x | ||
|
||
- name: Get Engine Tag | ||
run: | | ||
|
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 |
---|---|---|
|
@@ -51,7 +51,7 @@ jobs: | |
- name: Setup .NET Core | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.0.100 | ||
dotnet-version: 8.0.x | ||
|
||
- name: Install dependencies | ||
run: dotnet restore | ||
|
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 |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
- name: Setup .NET Core | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.0.100 | ||
dotnet-version: 8.0.x | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Build | ||
|
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,7 @@ | ||
using Content.Shared.Administration; | ||
|
||
namespace Content.Client.Administration.Systems; | ||
|
||
public sealed class AdminFrozenSystem : SharedAdminFrozenSystem | ||
{ | ||
} |
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,119 @@ | ||
using System; | ||
using Robust.Client.Graphics; | ||
using Robust.Client.UserInterface.Controls; | ||
|
||
namespace Content.Client.Chemistry.UI; | ||
|
||
/// <summary> | ||
/// Creates a grid of buttons given a comma-seperated list of Text | ||
/// </summary> | ||
public sealed class ButtonGrid : GridContainer | ||
{ | ||
private string _buttonList = ""; | ||
|
||
/// <summary> | ||
/// A comma-seperated list of text to use for each button. These will be inserted sequentially. | ||
/// </summary> | ||
public string ButtonList | ||
{ | ||
get => _buttonList; | ||
set | ||
{ | ||
_buttonList = value; | ||
Update(); | ||
} | ||
} | ||
|
||
public bool RadioGroup { get; set; } = false; | ||
|
||
private string? _selected; | ||
|
||
/// <summary> | ||
/// Which button is currently selected. Only matters when <see cref="RadioGroup"/> is true. | ||
/// </summary> | ||
public string? Selected | ||
{ | ||
get => _selected; | ||
set | ||
{ | ||
_selected = value; | ||
Update(); | ||
} | ||
} | ||
|
||
public Action<string>? OnButtonPressed; | ||
|
||
/// <summary> | ||
/// <see cref="GridContainer.Columns"/> | ||
/// </summary> | ||
public new int Columns | ||
{ | ||
get => base.Columns; | ||
set | ||
{ | ||
base.Columns = value; | ||
Update(); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// <see cref="GridContainer.Rows"/> | ||
/// </summary> | ||
public new int Rows | ||
{ | ||
get => base.Rows; | ||
set | ||
{ | ||
base.Rows = value; | ||
Update(); | ||
} | ||
} | ||
|
||
private void Update() | ||
{ | ||
if (ButtonList == "") | ||
return; | ||
|
||
this.Children.Clear(); | ||
var i = 0; | ||
var list = ButtonList.Split(","); | ||
|
||
var group = new ButtonGroup(); | ||
|
||
foreach (var button in list) | ||
{ | ||
var btn = new Button(); | ||
btn.Text = button; | ||
btn.OnPressed += _ => | ||
{ | ||
if (RadioGroup) | ||
btn.Pressed = true; | ||
Selected = button; | ||
OnButtonPressed?.Invoke(button); | ||
}; | ||
if (button == Selected) | ||
btn.Pressed = true; | ||
var sep = HSeparationOverride ?? 0; | ||
// ReSharper disable once PossibleLossOfFraction | ||
// btn.SetWidth = (this.PixelWidth - sep * (Columns - 1)) / 3; | ||
btn.Group = group; | ||
|
||
var row = i / Columns; | ||
var col = i % Columns; | ||
var last = i == list.Length - 1; | ||
var lastCol = i == Columns - 1; | ||
var lastRow = row == list.Length / Columns - 1; | ||
|
||
if (row == 0 && (lastCol || last)) | ||
btn.AddStyleClass("OpenLeft"); | ||
else if (col == 0 && lastRow) | ||
btn.AddStyleClass("OpenRight"); | ||
else | ||
btn.AddStyleClass("OpenBoth"); | ||
|
||
this.Children.Add(btn); | ||
|
||
i++; | ||
} | ||
} | ||
} |
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,36 @@ | ||
<Control xmlns="https://spacestation14.io" HorizontalExpand="True"> | ||
<BoxContainer Name="MainContainer" | ||
Orientation="Horizontal" | ||
HorizontalExpand="True"> | ||
<PanelContainer Name="ColorPanel" | ||
VerticalExpand="True" | ||
SetWidth="7" | ||
Margin="0 1 0 0" /> | ||
<Button Name="MainButton" | ||
HorizontalExpand="True" | ||
VerticalExpand="True" | ||
StyleClasses="ButtonSquare" | ||
Margin="-1 0 0 0"> | ||
<BoxContainer Orientation="Horizontal" HorizontalExpand="True"> | ||
<BoxContainer Orientation="Vertical" | ||
VerticalExpand="True" | ||
HorizontalExpand="True" | ||
Margin="-5 0 0 0"> | ||
<Label Name="ReagentNameLabel" /> | ||
<Label Name="FillLabel" | ||
StyleClasses="LabelSubText" | ||
Margin="0 -5 0 0" /> | ||
</BoxContainer> | ||
</BoxContainer> | ||
</Button> | ||
<Button Name="EjectButton" | ||
StyleClasses="OpenLeft" | ||
VerticalExpand="True" | ||
SetWidth="20"> | ||
<Label Name="EjectButtonIcon" | ||
VerticalAlignment="Center" | ||
HorizontalAlignment="Center" | ||
Margin="-7 -4 0 0" /> | ||
</Button> | ||
</BoxContainer> | ||
</Control> |
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,32 @@ | ||
using Content.Shared.Chemistry; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.Graphics; | ||
using Robust.Client.UserInterface; | ||
using Robust.Client.UserInterface.XAML; | ||
|
||
namespace Content.Client.Chemistry.UI; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class ReagentCardControl : Control | ||
{ | ||
public string StorageSlotId { get; } | ||
public Action<string>? OnPressed; | ||
public Action<string>? OnEjectButtonPressed; | ||
|
||
public ReagentCardControl(ReagentInventoryItem item) | ||
{ | ||
RobustXamlLoader.Load(this); | ||
|
||
StorageSlotId = item.StorageSlotId; | ||
ColorPanel.PanelOverride = new StyleBoxFlat { BackgroundColor = item.ReagentColor }; | ||
ReagentNameLabel.Text = item.ReagentLabel; | ||
FillLabel.Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", item.Quantity));; | ||
EjectButtonIcon.Text = Loc.GetString("reagent-dispenser-window-eject-container-button"); | ||
|
||
if (item.Quantity == 0.0) | ||
MainButton.Disabled = true; | ||
|
||
MainButton.OnPressed += args => OnPressed?.Invoke(StorageSlotId); | ||
EjectButton.OnPressed += args => OnEjectButtonPressed?.Invoke(StorageSlotId); | ||
} | ||
} |
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.