-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/master' into flesh_cult
# Conflicts: # Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs
- Loading branch information
Showing
168 changed files
with
77,516 additions
and
61,562 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
23 changes: 23 additions & 0 deletions
23
Content.Client/_Sunrise/AssaultOps/AssaultOps/AssaultOpsSystem.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,23 @@ | ||
using Content.Shared._Sunrise.AssaultOps; | ||
using Content.Shared.StatusIcon.Components; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Client._Sunrise.AssaultOps.AssaultOps; | ||
|
||
public sealed class AssaultOpsSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly IPrototypeManager _prototype = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<AssaultOperativeComponent, GetStatusIconsEvent>(GetVampireIcon); | ||
} | ||
|
||
private void GetVampireIcon(EntityUid uid, AssaultOperativeComponent component, ref GetStatusIconsEvent args) | ||
{ | ||
var iconPrototype = _prototype.Index(component.StatusIcon); | ||
args.StatusIcons.Add(iconPrototype); | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
Content.Client/_Sunrise/AssaultOps/Icarus/IcarusTerminalBoundUserInterface.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,55 @@ | ||
using Content.Shared._Sunrise.AssaultOps.Icarus; | ||
|
||
namespace Content.Client._Sunrise.AssaultOps.Icarus; | ||
|
||
public sealed class IcarusTerminalBoundUserInterface : BoundUserInterface | ||
{ | ||
private IcarusTerminalWindow? _window; | ||
|
||
public IcarusTerminalBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) | ||
{ | ||
} | ||
|
||
protected override void Open() | ||
{ | ||
base.Open(); | ||
_window = new IcarusTerminalWindow(); | ||
_window.OnClose += Close; | ||
_window.OpenCentered(); | ||
|
||
_window.FireButtonPressed += OnFireButtonPressed; | ||
} | ||
|
||
private void OnFireButtonPressed() | ||
{ | ||
if (_window == null) | ||
return; | ||
|
||
SendMessage(new IcarusTerminalFireMessage()); | ||
} | ||
|
||
protected override void UpdateState(BoundUserInterfaceState state) | ||
{ | ||
base.UpdateState(state); | ||
|
||
if (_window == null) | ||
return; | ||
|
||
if (state is not IcarusTerminalUiState cast) | ||
return; | ||
|
||
_window.UpdateState(cast); | ||
} | ||
|
||
protected override void Dispose(bool disposing) | ||
{ | ||
base.Dispose(disposing); | ||
if (!disposing) | ||
return; | ||
|
||
if (_window != null) | ||
_window.OnClose -= Close; | ||
|
||
_window?.Dispose(); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
Content.Client/_Sunrise/AssaultOps/Icarus/IcarusTerminalWindow.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 @@ | ||
<DefaultWindow xmlns="https://spacestation14.io" | ||
Title="{Loc 'icarus-ui-window-title'}" | ||
MinSize="300 120"> | ||
<BoxContainer Orientation="Vertical"> | ||
<Button Name="FireButton" | ||
Text="{Loc 'icarus-ui-fire-button'}" | ||
StyleClasses="Caution" | ||
MinHeight="50" | ||
Disabled="True" /> | ||
<BoxContainer Name="TimerBox" Orientation="Horizontal" Visible="False"> | ||
<Label Text="{Loc 'icarus-ui-timer-label'}" /> | ||
<Label Text=" " /> | ||
<Label Name="TimerValue" Text="-" /> | ||
</BoxContainer> | ||
<BoxContainer Name="CooldownBox" Orientation="Horizontal" Visible="False"> | ||
<Label Text="{Loc 'icarus-ui-cooldown-label'}" /> | ||
<Label Text=" " /> | ||
<Label Name="CooldownValue" Text="-" /> | ||
</BoxContainer> | ||
</BoxContainer> | ||
</DefaultWindow> |
36 changes: 36 additions & 0 deletions
36
Content.Client/_Sunrise/AssaultOps/Icarus/IcarusTerminalWindow.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,36 @@ | ||
using Content.Shared._Sunrise.AssaultOps.Icarus; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface.CustomControls; | ||
using Robust.Client.UserInterface.XAML; | ||
|
||
namespace Content.Client._Sunrise.AssaultOps.Icarus; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class IcarusTerminalWindow : DefaultWindow | ||
{ | ||
public event Action? FireButtonPressed; | ||
|
||
public IcarusTerminalWindow() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
|
||
FireButton.OnPressed += _ => FireButtonPressed?.Invoke(); | ||
} | ||
|
||
public void UpdateState(IcarusTerminalUiState state) | ||
{ | ||
FireButton.Disabled = state.Status != IcarusTerminalStatus.FIRE_READY; | ||
TimerBox.Visible = state.Status == IcarusTerminalStatus.FIRE_PREPARING; | ||
CooldownBox.Visible = state.Status == IcarusTerminalStatus.COOLDOWN; | ||
|
||
switch (state.Status) | ||
{ | ||
case IcarusTerminalStatus.FIRE_PREPARING: | ||
TimerValue.Text = state.RemainingTime.ToString(); | ||
break; | ||
case IcarusTerminalStatus.COOLDOWN: | ||
CooldownValue.Text = state.CooldownTime.ToString(); | ||
break; | ||
} | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
Content.Client/_Sunrise/Interrogator/InterrogatorSystem.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,54 @@ | ||
using Content.Shared._Sunrise.Interrogator; | ||
using Content.Shared.Verbs; | ||
using Robust.Client.GameObjects; | ||
using DrawDepth = Content.Shared.DrawDepth.DrawDepth; | ||
|
||
namespace Content.Client._Sunrise.Interrogator; | ||
|
||
public sealed class InterrogatorSystem: SharedInterrogatorSystem | ||
{ | ||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<InterrogatorComponent, ComponentInit>(OnComponentInit); | ||
SubscribeLocalEvent<InterrogatorComponent, GetVerbsEvent<AlternativeVerb>>(AddAlternativeVerbs); | ||
|
||
SubscribeLocalEvent<InterrogatorComponent, AppearanceChangeEvent>(OnAppearanceChange); | ||
} | ||
|
||
private void OnAppearanceChange(EntityUid uid, InterrogatorComponent component, ref AppearanceChangeEvent args) | ||
{ | ||
if (args.Sprite == null) | ||
{ | ||
return; | ||
} | ||
|
||
if (!_appearance.TryGetData<bool>(uid, InterrogatorComponent.InterrogatorVisuals.ContainsEntity, out var isOpen, args.Component) | ||
|| !_appearance.TryGetData<bool>(uid, InterrogatorComponent.InterrogatorVisuals.IsOn, out var isOn, args.Component)) | ||
{ | ||
return; | ||
} | ||
|
||
if (isOpen) | ||
{ | ||
args.Sprite.LayerSetState(InterrogatorVisualLayers.Base, "open"); | ||
args.Sprite.LayerSetVisible(InterrogatorVisualLayers.Extract, false); | ||
args.Sprite.DrawDepth = (int) DrawDepth.Objects; | ||
} | ||
else | ||
{ | ||
args.Sprite.DrawDepth = (int) DrawDepth.Mobs; | ||
args.Sprite.LayerSetState(InterrogatorVisualLayers.Extract, isOn ? "extraction-on" : "extraction-off"); | ||
args.Sprite.LayerSetVisible(InterrogatorVisualLayers.Extract, true); | ||
} | ||
} | ||
} | ||
|
||
public enum InterrogatorVisualLayers : byte | ||
{ | ||
Base, | ||
Extract, | ||
} |
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
11 changes: 0 additions & 11 deletions
11
Content.Server/GameTicking/Rules/Components/NukeOpsShuttleComponent.cs
This file was deleted.
Oops, something went wrong.
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.