-
Notifications
You must be signed in to change notification settings - Fork 66
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' into Tilkku's-Toys
- Loading branch information
Showing
1,066 changed files
with
16,563 additions
and
4,897 deletions.
There are no files selected for viewing
6 changes: 2 additions & 4 deletions
6
...ionics/GlimmerMonitor/GlimmerMonitorUi.cs → ...idgeLoader/Cartridges/GlimmerMonitorUi.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
3 changes: 1 addition & 2 deletions
3
...mmerMonitor/GlimmerMonitorUiFragment.xaml → .../Cartridges/GlimmerMonitorUiFragment.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
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
4 changes: 2 additions & 2 deletions
4
...nics/Telepathy/PsionicChatUpdateSystem.cs → ...nt.Client/Chat/PsionicChatUpdateSystem.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
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
19 changes: 0 additions & 19 deletions
19
Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchEntryControl.xaml
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchEntryControl.xaml.cs
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUi.cs
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUiFragment.xaml
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUiFragment.xaml.cs
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
Content.Client/Eye/PenLight/UI/PenLightBoundUserInterface.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,47 @@ | ||
using Content.Shared.Medical; | ||
using JetBrains.Annotations; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client.Eye.PenLight.UI | ||
{ | ||
[UsedImplicitly] | ||
public sealed class PenLightBoundUserInterface : BoundUserInterface | ||
{ | ||
[ViewVariables] | ||
private PenLightWindow? _window; | ||
|
||
public PenLightBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { } | ||
|
||
protected override void Open() | ||
{ | ||
base.Open(); | ||
_window = new PenLightWindow | ||
{ | ||
Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName, | ||
}; | ||
_window.OnClose += Close; | ||
_window.OpenCentered(); | ||
} | ||
|
||
protected override void ReceiveMessage(BoundUserInterfaceMessage message) | ||
{ | ||
if (_window == null | ||
|| message is not PenLightUserMessage cast) | ||
return; | ||
|
||
_window.Diagnose(cast); | ||
} | ||
|
||
protected override void Dispose(bool disposing) | ||
{ | ||
base.Dispose(disposing); | ||
if (!disposing) | ||
return; | ||
|
||
if (_window != null) | ||
_window.OnClose -= Close; | ||
|
||
_window?.Dispose(); | ||
} | ||
} | ||
} |
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,11 @@ | ||
<controls:FancyWindow xmlns="https://spacestation14.io" | ||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" | ||
Title="{Loc 'pen-light-exam-title'}" | ||
SetSize="0 -300"> | ||
<ScrollContainer VerticalExpand="True"> | ||
<BoxContainer Name="RootContainer" Orientation="Vertical" HorizontalExpand="True"> | ||
<Label Name="NoPatientDataText" Text="{Loc 'pen-light-window-no-patient-data-text'}" Visible="False"/> | ||
<Label Name="ExamDataLabel"/> | ||
</BoxContainer> | ||
</ScrollContainer> | ||
</controls:FancyWindow> |
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,78 @@ | ||
using Content.Client.UserInterface.Controls; | ||
using Content.Shared.Damage; | ||
using Content.Shared.IdentityManagement; | ||
using Content.Shared.Medical; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface.XAML; | ||
using System.Text; | ||
|
||
|
||
namespace Content.Client.Eye.PenLight.UI | ||
{ | ||
[GenerateTypedNameReferences] | ||
public sealed partial class PenLightWindow : FancyWindow | ||
{ | ||
private readonly IEntityManager _entityManager; | ||
private const int LightHeight = 150; | ||
private const int LightWidth = 900; | ||
|
||
public PenLightWindow() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
|
||
var dependencies = IoCManager.Instance!; | ||
_entityManager = dependencies.Resolve<IEntityManager>(); | ||
} | ||
public void Diagnose(PenLightUserMessage msg) | ||
{ | ||
var target = _entityManager.GetEntity(msg.TargetEntity); | ||
|
||
if (target == null || !_entityManager.TryGetComponent<DamageableComponent>(target, out var damageable)) | ||
{ | ||
NoPatientDataText.Visible = true; | ||
ExamDataLabel.Text = string.Empty; | ||
return; | ||
} | ||
|
||
NoPatientDataText.Visible = false; | ||
|
||
|
||
string entityName = Loc.GetString("pen-light-window-entity-unknown-text"); | ||
if (_entityManager.HasComponent<MetaDataComponent>(target.Value)) | ||
entityName = Identity.Name(target.Value, _entityManager); | ||
|
||
var sb = new StringBuilder(); | ||
sb.AppendLine(Loc.GetString("pen-light-window-entity-eyes-text", ("entityName", entityName))); | ||
|
||
// Check if Blind and return early if true | ||
if (msg.Blind == true) | ||
{ | ||
sb.AppendLine(Loc.GetString("pen-light-exam-blind-text")); | ||
ExamDataLabel.Text = sb.ToString(); | ||
SetHeight = LightHeight; | ||
SetWidth = LightWidth; | ||
return; | ||
} | ||
// EyeDamage | ||
if (msg.EyeDamage == true) | ||
sb.AppendLine(Loc.GetString("pen-light-exam-eyedamage-text")); | ||
|
||
// Drunk | ||
if (msg.Drunk == true) | ||
sb.AppendLine(Loc.GetString("pen-light-exam-drunk-text")); | ||
|
||
// Hallucinating | ||
if (msg.SeeingRainbows == true) | ||
sb.AppendLine(Loc.GetString("pen-light-exam-hallucinating-text")); | ||
|
||
// Healthy | ||
if (msg.Healthy == true) | ||
sb.AppendLine(Loc.GetString("pen-light-exam-healthy-text")); | ||
|
||
ExamDataLabel.Text = sb.ToString(); | ||
|
||
SetHeight = LightHeight; | ||
SetWidth = LightWidth; | ||
} | ||
} | ||
} |
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.