-
Notifications
You must be signed in to change notification settings - Fork 146
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 Plushie-Update
- Loading branch information
Showing
261 changed files
with
2,116 additions
and
465 deletions.
There are no files selected for viewing
5 changes: 2 additions & 3 deletions
5
...idgeLoader/Cartridges/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
2 changes: 1 addition & 1 deletion
2
.../Cartridges/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
4 changes: 2 additions & 2 deletions
4
...rtridges/GlimmerMonitorUiFragment.xaml.cs → ...rtridges/GlimmerMonitorUiFragment.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
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
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; | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
31 changes: 31 additions & 0 deletions
31
Content.Server/Botany/Components/TeleportingTraitComponent.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,31 @@ | ||
namespace Content.Server.Botany | ||
{ | ||
[RegisterComponent] | ||
|
||
public sealed partial class TeleportingTraitComponent : Component | ||
{ | ||
/// <summary> | ||
/// Teleportation radius of produce. | ||
/// </summary> | ||
[DataField] | ||
public float ProduceTeleportRadius; | ||
|
||
/// <summary> | ||
/// How much to divide the potency. | ||
/// </summary> | ||
[DataField] | ||
public float PotencyDivide = 10f; | ||
|
||
/// <summary> | ||
/// Potency of fruit. | ||
/// </summary> | ||
[DataField] | ||
public float Potency; | ||
|
||
/// <summary> | ||
/// Chance of deletion. | ||
/// </summary> | ||
[DataField] | ||
public float DeletionChance = .5f; | ||
} | ||
} |
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
Oops, something went wrong.