Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add uncloneable health analyzer text #2824

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ public void Populate(HealthAnalyzerScannedUserMessage msg)
MaxWidth = 300
});

// Frontier: uncloneable text
if (msg.Uncloneable == true)
AlertsContainer.AddChild(new RichTextLabel
{
Text = Loc.GetString("health-analyzer-window-entity-uncloneable-text"),
Margin = new Thickness(0, 4),
MaxWidth = 300
});
// End Frontier

if (msg.Bleeding == true)
AlertsContainer.AddChild(new RichTextLabel
{
Expand Down
3 changes: 2 additions & 1 deletion Content.Server/Medical/CryoPodSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ private void OnActivateUI(Entity<CryoPodComponent> entity, ref AfterActivatableU
: 0,
null,
null,
null
null,
null // Frontier
));
}

Expand Down
8 changes: 7 additions & 1 deletion Content.Server/Medical/HealthAnalyzerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
using Robust.Shared.Timing;
using Content.Server._NF.Traits.Assorted; // Frontier

namespace Content.Server.Medical;

Expand Down Expand Up @@ -198,6 +199,7 @@ public void UpdateScannedUser(EntityUid healthAnalyzer, EntityUid target, bool s
var bloodAmount = float.NaN;
var bleeding = false;
var unrevivable = false;
var uncloneable = false; // Frontier

if (TryComp<BloodstreamComponent>(target, out var bloodstream) &&
_solutionContainerSystem.ResolveSolution(target, bloodstream.BloodSolutionName,
Expand All @@ -210,13 +212,17 @@ public void UpdateScannedUser(EntityUid healthAnalyzer, EntityUid target, bool s
if (HasComp<UnrevivableComponent>(target))
unrevivable = true;

if (HasComp<UncloneableComponent>(target)) // Frontier
uncloneable = true; // Frontier

_uiSystem.ServerSendUiMessage(healthAnalyzer, HealthAnalyzerUiKey.Key, new HealthAnalyzerScannedUserMessage(
GetNetEntity(target),
bodyTemperature,
bloodAmount,
scanMode,
bleeding,
unrevivable
unrevivable,
uncloneable // Frontier
));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ public sealed class HealthAnalyzerScannedUserMessage : BoundUserInterfaceMessage
public bool? ScanMode;
public bool? Bleeding;
public bool? Unrevivable;
public bool? Uncloneable; // Frontier

public HealthAnalyzerScannedUserMessage(NetEntity? targetEntity, float temperature, float bloodLevel, bool? scanMode, bool? bleeding, bool? unrevivable)
public HealthAnalyzerScannedUserMessage(NetEntity? targetEntity, float temperature, float bloodLevel, bool? scanMode, bool? bleeding, bool? unrevivable, bool? uncloneable) // Frontier: add uncloneable
{
TargetEntity = targetEntity;
Temperature = temperature;
BloodLevel = bloodLevel;
ScanMode = scanMode;
Bleeding = bleeding;
Unrevivable = unrevivable;
Uncloneable = uncloneable; // Frontier
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
health-analyzer-window-entity-uncloneable-text = [color=yellow]Unknown genetic sequence detected! Patient can not be cloned.[/color]
Loading