-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/space-wizards/space-stati…
…on-14 into 2024earlyjanuarysync
- Loading branch information
Showing
600 changed files
with
511,435 additions
and
498,554 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
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
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.Atmos.Rotting; | ||
|
||
namespace Content.Client.Atmos.Rotting; | ||
|
||
public sealed class RottingSystem : SharedRottingSystem | ||
{ | ||
} |
56 changes: 56 additions & 0 deletions
56
Content.Client/Bed/Cryostorage/CryostorageBoundUserInterface.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,56 @@ | ||
using Content.Shared.Bed.Cryostorage; | ||
using JetBrains.Annotations; | ||
|
||
namespace Content.Client.Bed.Cryostorage; | ||
|
||
[UsedImplicitly] | ||
public sealed class CryostorageBoundUserInterface : BoundUserInterface | ||
{ | ||
[ViewVariables] | ||
private CryostorageMenu? _menu; | ||
|
||
public CryostorageBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) | ||
{ | ||
} | ||
|
||
protected override void Open() | ||
{ | ||
base.Open(); | ||
|
||
_menu = new(); | ||
|
||
_menu.OnClose += Close; | ||
|
||
_menu.SlotRemoveButtonPressed += (ent, slot) => | ||
{ | ||
SendMessage(new CryostorageRemoveItemBuiMessage(ent, slot, CryostorageRemoveItemBuiMessage.RemovalType.Inventory)); | ||
}; | ||
|
||
_menu.HandRemoveButtonPressed += (ent, hand) => | ||
{ | ||
SendMessage(new CryostorageRemoveItemBuiMessage(ent, hand, CryostorageRemoveItemBuiMessage.RemovalType.Hand)); | ||
}; | ||
|
||
_menu.OpenCentered(); | ||
} | ||
|
||
protected override void UpdateState(BoundUserInterfaceState state) | ||
{ | ||
base.UpdateState(state); | ||
|
||
switch (state) | ||
{ | ||
case CryostorageBuiState msg: | ||
_menu?.UpdateState(msg); | ||
break; | ||
} | ||
} | ||
|
||
protected override void Dispose(bool disposing) | ||
{ | ||
base.Dispose(disposing); | ||
if (!disposing) | ||
return; | ||
_menu?.Dispose(); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml
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,21 @@ | ||
<BoxContainer | ||
xmlns="https://spacestation14.io" | ||
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" | ||
xmlns:xNamespace="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:style="clr-namespace:Content.Client.Stylesheets" | ||
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls" | ||
Orientation="Vertical" | ||
HorizontalExpand="True" | ||
Margin="0 0 0 5"> | ||
<PanelContainer> | ||
<PanelContainer.PanelOverride> | ||
<graphics:StyleBoxFlat BackgroundColor="{xNamespace:Static style:StyleNano.ButtonColorDisabled}" /> | ||
</PanelContainer.PanelOverride> | ||
<Collapsible Orientation="Vertical" Name="Collapsible"> | ||
<CollapsibleHeading Name="Heading" MinHeight="35"/> | ||
<CollapsibleBody Name="Body"> | ||
<BoxContainer Name="ItemsContainer" Orientation="Vertical" HorizontalExpand="True"/> | ||
</CollapsibleBody> | ||
</Collapsible> | ||
</PanelContainer> | ||
</BoxContainer> |
46 changes: 46 additions & 0 deletions
46
Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml.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,46 @@ | ||
using Content.Shared.Bed.Cryostorage; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface.Controls; | ||
using Robust.Client.UserInterface.XAML; | ||
|
||
namespace Content.Client.Bed.Cryostorage; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class CryostorageEntryControl : BoxContainer | ||
{ | ||
public event Action<string>? SlotRemoveButtonPressed; | ||
public event Action<string>? HandRemoveButtonPressed; | ||
|
||
public NetEntity Entity; | ||
public bool LastOpenState; | ||
|
||
public CryostorageEntryControl(CryostorageContainedPlayerData data) | ||
{ | ||
RobustXamlLoader.Load(this); | ||
Entity = data.PlayerEnt; | ||
Update(data); | ||
} | ||
|
||
public void Update(CryostorageContainedPlayerData data) | ||
{ | ||
LastOpenState = Collapsible.BodyVisible; | ||
Heading.Title = data.PlayerName; | ||
Body.Visible = data.ItemSlots.Count != 0 && data.HeldItems.Count != 0; | ||
|
||
ItemsContainer.Children.Clear(); | ||
foreach (var (name, itemName) in data.ItemSlots) | ||
{ | ||
var control = new CryostorageSlotControl(name, itemName); | ||
control.Button.OnPressed += _ => SlotRemoveButtonPressed?.Invoke(name); | ||
ItemsContainer.AddChild(control); | ||
} | ||
|
||
foreach (var (name, held) in data.HeldItems) | ||
{ | ||
var control = new CryostorageSlotControl(Loc.GetString("cryostorage-ui-filler-hand"), held); | ||
control.Button.OnPressed += _ => HandRemoveButtonPressed?.Invoke(name); | ||
ItemsContainer.AddChild(control); | ||
} | ||
Collapsible.BodyVisible = LastOpenState; | ||
} | ||
} |
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,33 @@ | ||
<controls:FancyWindow | ||
xmlns="https://spacestation14.io" | ||
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" | ||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" | ||
xmlns:xNamespace="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:style="clr-namespace:Content.Client.Stylesheets" | ||
Title="{Loc 'cryostorage-ui-window-title'}" | ||
MinSize="350 350" | ||
SetSize="450 400"> | ||
<BoxContainer | ||
Orientation="Vertical" | ||
VerticalExpand="True" | ||
HorizontalExpand="True"> | ||
<PanelContainer | ||
VerticalExpand="True" | ||
HorizontalExpand="True" | ||
Margin="15"> | ||
<PanelContainer.PanelOverride> | ||
<graphics:StyleBoxFlat BackgroundColor="{xNamespace:Static style:StyleNano.PanelDark}" /> | ||
</PanelContainer.PanelOverride> | ||
<ScrollContainer VerticalExpand="True" HorizontalExpand="True"> | ||
<Control> | ||
<Label Text="{Loc 'cryostorage-ui-label-no-bodies'}" Name="EmptyLabel" HorizontalAlignment="Center" VerticalAlignment="Center"/> | ||
<BoxContainer Name="EntriesContainer" | ||
Orientation="Vertical" | ||
Margin="10" | ||
VerticalExpand="True" | ||
HorizontalExpand="True"/> | ||
</Control> | ||
</ScrollContainer> | ||
</PanelContainer> | ||
</BoxContainer> | ||
</controls:FancyWindow> |
Oops, something went wrong.