forked from Vault-Overseers/nuclear-14
-
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 pull request #31 from Corvax-Frontier/Up16072024
Up16072024
- Loading branch information
Showing
718 changed files
with
19,703 additions
and
7,650 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
25 changes: 25 additions & 0 deletions
25
Content.Client/UserInterface/Systems/Ghost/Controls/GhostRespawnRulesWindow.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,25 @@ | ||
<controls:FancyWindow xmlns="https://spacestation14.io" | ||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" | ||
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" | ||
Title="{Loc 'ghost-respawn-rules-window-title'}" | ||
MinSize="500 350"> | ||
<ScrollContainer VerticalExpand="True" HorizontalExpand="True" HScrollEnabled="False" Margin="5"> | ||
<PanelContainer StyleClasses="Inset"> | ||
<PanelContainer.PanelOverride> | ||
<graphics:StyleBoxFlat BackgroundColor="#303133"/> | ||
</PanelContainer.PanelOverride> | ||
|
||
<BoxContainer Orientation="Vertical" VerticalExpand="True" SeparationOverride="5"> | ||
<PanelContainer Name="TextContainer" StyleClasses="Inset" Margin="5"> | ||
<PanelContainer.PanelOverride> | ||
<!-- <graphics:StyleBoxFlat BackgroundColor="#464950"/> --> | ||
<graphics:StyleBoxFlat BackgroundColor="#303133"/> | ||
</PanelContainer.PanelOverride> | ||
</PanelContainer> | ||
|
||
<Control VerticalExpand="True" VerticalAlignment="Stretch" /> | ||
<Button Name="ConfirmRespawnButton" Text="{Loc 'ghost-respawn-rules-window-confirm-button'}" Margin="5" /> | ||
</BoxContainer> | ||
</PanelContainer> | ||
</ScrollContainer> | ||
</controls:FancyWindow> |
29 changes: 29 additions & 0 deletions
29
Content.Client/UserInterface/Systems/Ghost/Controls/GhostRespawnRulesWindow.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,29 @@ | ||
using Content.Client.UserInterface.Controls; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface.Controls; | ||
using Robust.Client.UserInterface.XAML; | ||
using Robust.Shared.Utility; | ||
|
||
namespace Content.Client.UserInterface.Systems.Ghost.Controls | ||
{ | ||
[GenerateTypedNameReferences] | ||
public sealed partial class GhostRespawnRulesWindow : FancyWindow | ||
{ | ||
public PanelContainer RulesContainer => TextContainer; | ||
public RichTextLabel RulesLabel = new() { Margin = new Thickness(5, 5, 5, 5) }; | ||
public Button RespawnButton => ConfirmRespawnButton; | ||
|
||
public GhostRespawnRulesWindow() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
|
||
var message = new FormattedMessage(); | ||
message.AddMarkup(Loc.GetString("ghost-respawn-rules-window-rules")); | ||
RulesLabel.SetMessage(message); | ||
RulesContainer.AddChild(RulesLabel); | ||
RulesLabel.SetPositionFirst(); | ||
|
||
RespawnButton.OnPressed += _ => Close(); | ||
} | ||
} | ||
} |
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,22 @@ | ||
using Content.Shared._NF.Respawn; | ||
|
||
namespace Content.Client._NF.Respawn; | ||
|
||
public sealed class RespawnSystem : EntitySystem | ||
{ | ||
public TimeSpan? RespawnResetTime { get; private set; } | ||
|
||
public event Action? RespawnReseted; | ||
|
||
public override void Initialize() | ||
{ | ||
SubscribeNetworkEvent<RespawnResetEvent>(OnRespawnReset); | ||
} | ||
|
||
private void OnRespawnReset(RespawnResetEvent e) | ||
{ | ||
RespawnResetTime = e.Time; | ||
|
||
RespawnReseted?.Invoke(); | ||
} | ||
} |
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.