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

[Tweak] Upstream sync #866

Merged
merged 77 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
eec533c
Reduce player softcap for wizden servers and panic bunker wizden Levi…
nikthechampiongr Oct 20, 2024
c221ef0
System to automatically restart server after certain uptime. (#32814)
PJB3005 Oct 20, 2024
0c62c03
[Maps] Astra halloween (#2691)
lastPechkin Oct 20, 2024
785918a
Automatic changelog update
IanComradeBot Oct 20, 2024
e241e5c
[Maps] Awesome halloween (#2695)
Stubaretka24 Oct 20, 2024
bd7d879
Automatic changelog update
IanComradeBot Oct 20, 2024
45a3f7f
[Maps] Silly halloween (#2694)
Doctorjakes Oct 20, 2024
4c51b9c
Automatic changelog update
IanComradeBot Oct 20, 2024
155667a
[Maps] Avrite, Pilgrim, Tushkan halloween (#2696)
Ko4ergaPunk Oct 20, 2024
c4fdca5
Automatic changelog update
IanComradeBot Oct 20, 2024
ae882de
[Maps] Maus halloween (#2697)
Meguneri Oct 20, 2024
a688f80
Automatic changelog update
IanComradeBot Oct 20, 2024
d2633c4
[Maps] Paper hotfix (#2698)
XsenonDash Oct 21, 2024
5579c9c
Automatic changelog update
IanComradeBot Oct 21, 2024
0b8d6a1
Mutetoxin buff (#32915)
Thatonestomf Oct 21, 2024
1d2ad3c
Automatic changelog update
PJBot Oct 21, 2024
b5687e4
prevent typing sound from playing when AI interacts with consoles (#3…
MendaxxDev Oct 21, 2024
04e422b
Automatic changelog update
PJBot Oct 21, 2024
8a5d9a3
Let station AI use long range fax machines (#32929)
NoElkaTheGod Oct 21, 2024
afd4c73
Automatic changelog update
PJBot Oct 21, 2024
6cb0806
[Maps] Glacier Major update (#2699)
NotSoDana Oct 21, 2024
9e1ffc0
Automatic changelog update
IanComradeBot Oct 21, 2024
a227c3b
Box Station - Resolved #32771, #32949, and #32921 (#32950)
southbridge-fur Oct 22, 2024
7d91bcb
Automatic changelog update
PJBot Oct 22, 2024
c9f8428
Corvax Ruins (#2700)
Ko4ergaPunk Oct 22, 2024
cf6ae49
Automatic changelog update
IanComradeBot Oct 22, 2024
8142ac0
Cog sec maints updated (#32948)
Spessmann Oct 22, 2024
5f1b848
Ammo boxes now have sprites for being parially filled! (#32930)
Moomoobeef Oct 22, 2024
94bbf72
Automatic changelog update
PJBot Oct 22, 2024
62f5a31
Syringe gun! (#32112)
ScarKy0 Oct 22, 2024
fc2bb79
Automatic changelog update
PJBot Oct 22, 2024
9873efd
Adding intellicard functionality. (#32347)
ScarKy0 Oct 22, 2024
5e637aa
Automatic changelog update
PJBot Oct 22, 2024
997aec2
[Maps] Glacier hotfix #4 (#2701)
NotSoDana Oct 22, 2024
04dbd21
Add more tts sanitize (#2689)
lzk228 Oct 22, 2024
0ea3cf2
fix guidebook typo (#2645)
lzk228 Oct 22, 2024
5d6ec18
Add Nuclear Cola centrifuge recipe (#32441)
southbridge-fur Oct 22, 2024
8f52a34
Automatic changelog update
PJBot Oct 22, 2024
ee8dede
Several Ninja Suit power cell upgrade fixes. (#32902)
BramvanZijp Oct 22, 2024
445cad4
Automatic changelog update
PJBot Oct 22, 2024
c1d5e6f
In-hand apprasial tool sprite (#32849)
UBlueberry Oct 22, 2024
3b0d8e6
Automatic changelog update
PJBot Oct 22, 2024
bee4fde
[Maps] Map pool tweaks (#2703)
NotSoDana Oct 23, 2024
5463086
Automatic changelog update
IanComradeBot Oct 23, 2024
7b9b2b1
fix locale (#2688)
lzk228 Oct 23, 2024
5460f41
Upstream translate #2677 (#2685)
lzk228 Oct 23, 2024
f5f1bf8
Translate Guidebook (#2420)
Roudenn Oct 23, 2024
d221683
Visualized regions for NavMapControl (#31910)
chromiumboy Oct 23, 2024
05a0051
Automatic changelog update
PJBot Oct 23, 2024
92c49af
Packed Update (#32971)
spanky-spanky Oct 23, 2024
5a86b88
adds Meat Tag to FoodMeatSnake (#32965)
hyphenationc Oct 24, 2024
79c35e0
Automatic changelog update
PJBot Oct 24, 2024
d4da992
Fix Emote Chat Sanitizer (#32940)
Aeshus Oct 24, 2024
5ff5a72
Fix multiplying colors of differing nullabilities (#32991)
chromiumboy Oct 25, 2024
1307733
Make atmos alert computer colors private variables (#32992)
chromiumboy Oct 25, 2024
583fad3
Ruin tweak (#2706)
Vonsant Oct 25, 2024
893c60f
Automatic changelog update
IanComradeBot Oct 25, 2024
e3f442e
Add flash reaction effect (#32377)
slarticodefast Oct 25, 2024
6998fa8
Automatic changelog update
PJBot Oct 25, 2024
66432c5
Fix loneop spawnrate by reverting it to not use the shuttle event sys…
BramvanZijp Oct 26, 2024
988b620
Automatic changelog update
PJBot Oct 26, 2024
5a10bf0
add atmosia to devmap (#32460)
Ilya246 Oct 26, 2024
97ef463
bowls now make drinking sounds (#32819)
Moomoobeef Oct 26, 2024
dcb615d
Automatic changelog update
PJBot Oct 26, 2024
ef43ab8
[Resprite] Security trooper's uniform (#2704)
MureixloI Oct 26, 2024
62bf055
Automatic changelog update
IanComradeBot Oct 26, 2024
a95c8ba
Add health analyzer unrevivability warning (#32636)
SaphireLattice Oct 26, 2024
427817e
Automatic changelog update
PJBot Oct 26, 2024
9d6e625
Removed the name "Hujsak" (#32998)
Moomoobeef Oct 26, 2024
6486cdf
Update Credits (#33016)
github-actions[bot] Oct 27, 2024
4252fdf
fix pie throwing sound not playing (#33017)
slarticodefast Oct 27, 2024
a1c36dc
Automatic changelog update
PJBot Oct 27, 2024
424d7f7
New voices (#2705)
Morb0 Oct 27, 2024
a0c621a
Automatic changelog update
IanComradeBot Oct 27, 2024
7e526da
Fix Bug With Uppercase Radio Keys (#32997) (master) (#33031)
VasilisThePikachu Oct 27, 2024
6e4a9a1
Merge remote-tracking branch 'wizard/master' into upstream-sync
Roudenn Oct 28, 2024
a141027
Merge remote-tracking branch 'corvax/master' into upstream-sync
Roudenn Oct 28, 2024
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
81 changes: 72 additions & 9 deletions Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public sealed partial class AtmosAlertsComputerWindow : FancyWindow
{
private readonly IEntityManager _entManager;
private readonly SpriteSystem _spriteSystem;
private readonly SharedNavMapSystem _navMapSystem;

private EntityUid? _owner;
private NetEntity? _trackedEntity;
Expand All @@ -42,19 +43,32 @@ public sealed partial class AtmosAlertsComputerWindow : FancyWindow

private const float SilencingDuration = 2.5f;

// Colors
private Color _wallColor = new Color(64, 64, 64);
private Color _tileColor = new Color(28, 28, 28);
private Color _monitorBlipColor = Color.Cyan;
private Color _untrackedEntColor = Color.DimGray;
private Color _regionBaseColor = new Color(154, 154, 154);
private Color _inactiveColor = StyleNano.DisabledFore;
private Color _statusTextColor = StyleNano.GoodGreenFore;
private Color _goodColor = Color.LimeGreen;
private Color _warningColor = new Color(255, 182, 72);
private Color _dangerColor = new Color(255, 67, 67);

public AtmosAlertsComputerWindow(AtmosAlertsComputerBoundUserInterface userInterface, EntityUid? owner)
{
RobustXamlLoader.Load(this);
_entManager = IoCManager.Resolve<IEntityManager>();
_spriteSystem = _entManager.System<SpriteSystem>();
_navMapSystem = _entManager.System<SharedNavMapSystem>();

// Pass the owner to nav map
_owner = owner;
NavMap.Owner = _owner;

// Set nav map colors
NavMap.WallColor = new Color(64, 64, 64);
NavMap.TileColor = Color.DimGray * NavMap.WallColor;
NavMap.WallColor = _wallColor;
NavMap.TileColor = _tileColor;

// Set nav map grid uid
var stationName = Loc.GetString("atmos-alerts-window-unknown-location");
Expand Down Expand Up @@ -179,6 +193,9 @@ public void UpdateUI(EntityCoordinates? consoleCoords, AtmosAlertsComputerEntry[
// Add tracked entities to the nav map
foreach (var device in console.AtmosDevices)
{
if (!device.NetEntity.Valid)
continue;

if (!NavMap.Visible)
continue;

Expand Down Expand Up @@ -209,7 +226,7 @@ public void UpdateUI(EntityCoordinates? consoleCoords, AtmosAlertsComputerEntry[
if (consoleCoords != null && consoleUid != null)
{
var texture = _spriteSystem.Frame0(new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/NavMap/beveled_circle.png")));
var blip = new NavMapBlip(consoleCoords.Value, texture, Color.Cyan, true, false);
var blip = new NavMapBlip(consoleCoords.Value, texture, _monitorBlipColor, true, false);
NavMap.TrackedEntities[consoleUid.Value] = blip;
}

Expand Down Expand Up @@ -258,7 +275,7 @@ public void UpdateUI(EntityCoordinates? consoleCoords, AtmosAlertsComputerEntry[
VerticalAlignment = VAlignment.Center,
};

label.SetMarkup(Loc.GetString("atmos-alerts-window-no-active-alerts", ("color", StyleNano.GoodGreenFore.ToHexNoAlpha())));
label.SetMarkup(Loc.GetString("atmos-alerts-window-no-active-alerts", ("color", _statusTextColor.ToHexNoAlpha())));

AlertsTable.AddChild(label);
}
Expand All @@ -270,6 +287,34 @@ public void UpdateUI(EntityCoordinates? consoleCoords, AtmosAlertsComputerEntry[
else
MasterTabContainer.SetTabTitle(0, Loc.GetString("atmos-alerts-window-tab-alerts", ("value", activeAlarmCount)));

// Update sensor regions
NavMap.RegionOverlays.Clear();
var prioritizedRegionOverlays = new Dictionary<NavMapRegionOverlay, int>();

if (_owner != null &&
_entManager.TryGetComponent<TransformComponent>(_owner, out var xform) &&
_entManager.TryGetComponent<NavMapComponent>(xform.GridUid, out var navMap))
{
var regionOverlays = _navMapSystem.GetNavMapRegionOverlays(_owner.Value, navMap, AtmosAlertsComputerUiKey.Key);

foreach (var (regionOwner, regionOverlay) in regionOverlays)
{
var alarmState = GetAlarmState(regionOwner);

if (!TryGetSensorRegionColor(regionOwner, alarmState, out var regionColor))
continue;

regionOverlay.Color = regionColor;

var priority = (_trackedEntity == regionOwner) ? 999 : (int)alarmState;
prioritizedRegionOverlays.Add(regionOverlay, priority);
}

// Sort overlays according to their priority
var sortedOverlays = prioritizedRegionOverlays.OrderBy(x => x.Value).Select(x => x.Key).ToList();
NavMap.RegionOverlays = sortedOverlays;
}

// Auto-scroll re-enable
if (_autoScrollAwaitsUpdate)
{
Expand All @@ -290,14 +335,32 @@ private void AddTrackedEntityToNavMap(AtmosAlertsDeviceNavMapData metaData, Atmo
var coords = _entManager.GetCoordinates(metaData.NetCoordinates);

if (_trackedEntity != null && _trackedEntity != metaData.NetEntity)
color *= Color.DimGray;
color *= _untrackedEntColor;

var selectable = true;
var blip = new NavMapBlip(coords, _spriteSystem.Frame0(texture), color, _trackedEntity == metaData.NetEntity, selectable);

NavMap.TrackedEntities[metaData.NetEntity] = blip;
}

private bool TryGetSensorRegionColor(NetEntity regionOwner, AtmosAlarmType alarmState, out Color color)
{
color = Color.White;

var blip = GetBlipTexture(alarmState);

if (blip == null)
return false;

// Color the region based on alarm state and entity tracking
color = blip.Value.Item2 * _regionBaseColor;

if (_trackedEntity != null && _trackedEntity != regionOwner)
color *= _untrackedEntColor;

return true;
}

private void UpdateUIEntry(AtmosAlertsComputerEntry entry, int index, Control table, AtmosAlertsComputerComponent console, AtmosAlertsFocusDeviceData? focusData = null)
{
// Make new UI entry if required
Expand Down Expand Up @@ -534,13 +597,13 @@ private AtmosAlarmType GetAlarmState(NetEntity netEntity)
switch (alarmState)
{
case AtmosAlarmType.Invalid:
output = (new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/NavMap/beveled_circle.png")), StyleNano.DisabledFore); break;
output = (new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/NavMap/beveled_circle.png")), _inactiveColor); break;
case AtmosAlarmType.Normal:
output = (new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/NavMap/beveled_circle.png")), Color.LimeGreen); break;
output = (new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/NavMap/beveled_circle.png")), _goodColor); break;
case AtmosAlarmType.Warning:
output = (new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/NavMap/beveled_triangle.png")), new Color(255, 182, 72)); break;
output = (new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/NavMap/beveled_triangle.png")), _warningColor); break;
case AtmosAlarmType.Danger:
output = (new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/NavMap/beveled_square.png")), new Color(255, 67, 67)); break;
output = (new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/NavMap/beveled_square.png")), _dangerColor); break;
}

return output;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@

<PanelContainer Name="AlertsDivider" Visible="False" StyleClasses="LowDivider" />

<BoxContainer Name="AlertsContainer" Visible="False" Margin="0 5" Orientation="Horizontal"
HorizontalExpand="True" HorizontalAlignment="Center">
<BoxContainer Name="AlertsContainer" Visible="False" Margin="0 5" Orientation="Vertical" HorizontalAlignment="Center">

</BoxContainer>

Expand Down
25 changes: 18 additions & 7 deletions Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,29 @@ public void Populate(HealthAnalyzerScannedUserMessage msg)

// Alerts

AlertsDivider.Visible = msg.Bleeding == true;
AlertsContainer.Visible = msg.Bleeding == true;
var showAlerts = msg.Unrevivable == true || msg.Bleeding == true;

if (msg.Bleeding == true)
{
AlertsDivider.Visible = showAlerts;
AlertsContainer.Visible = showAlerts;

if (showAlerts)
AlertsContainer.DisposeAllChildren();
AlertsContainer.AddChild(new Label

if (msg.Unrevivable == true)
AlertsContainer.AddChild(new RichTextLabel
{
Text = Loc.GetString("health-analyzer-window-entity-unrevivable-text"),
Margin = new Thickness(0, 4),
MaxWidth = 300
});

if (msg.Bleeding == true)
AlertsContainer.AddChild(new RichTextLabel
{
Text = Loc.GetString("health-analyzer-window-entity-bleeding-text"),
FontColorOverride = Color.Red,
Margin = new Thickness(0, 4),
MaxWidth = 300
});
}

// Damage Groups

Expand Down
Loading
Loading