Skip to content

Commit

Permalink
Merge branch 'master' into 2025-02-04-backport-cards
Browse files Browse the repository at this point in the history
  • Loading branch information
dvir001 authored Feb 5, 2025
2 parents 6e50fec + 9e2cc70 commit 5064204
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 3 deletions.
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
}
}

6 changes: 6 additions & 0 deletions Resources/Changelog/Frontier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6896,3 +6896,9 @@ Entries:
message: Only the SR, sheriff and DOC can open station job slots.
id: 5727
time: '2025-02-04T23:35:15.0000000+00:00'
- author: whatston3
changes:
- type: Add
message: The health analyzer will tell you when a scanned patient is uncloneable.
id: 5728
time: '2025-02-05T16:44:46.0000000+00:00'
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]

0 comments on commit 5064204

Please sign in to comment.