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

Upstream merge #23

Merged
merged 76 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
af72f2e
Applying Fix from #32764 to staging
Jezithyr Oct 13, 2024
30effd5
Fix random test fail in DeleteAllThenGhost (#32753)
Errant-4 Oct 11, 2024
e5ad32f
Fix random test fail in DeleteAllThenGhost (#32753)
Errant-4 Oct 11, 2024
796764d
Fix some rounds failing to end due to mind roles (#32792) (#32793)
PJB3005 Oct 13, 2024
519a6b2
HOTFIX: Fix tech anomaly nexttimer (#32805) (#32807)
Errant-4 Oct 14, 2024
c78b5ae
Fix warden being and qm being not considered head for tot kill head o…
pheenty Oct 18, 2024
103c1dc
Automatic changelog update
PJBot Oct 18, 2024
c606f71
Set Salamander round restart time to 5 minutes (#32776)
JIPDawg Oct 18, 2024
3da9e93
Automatic changelog update
PJBot Oct 18, 2024
338781c
Fix: Radio jammer now doesn't show setting changes to other players (…
beck-thompson Oct 18, 2024
23e4f81
Traitor activation fix for missing PDA (#30359)
Errant-4 Oct 18, 2024
7fc27a1
Automatic changelog update
PJBot Oct 18, 2024
1529048
Fix: Plushies no longer delete items when recycled (#32838)
beck-thompson Oct 18, 2024
304d1d5
Automatic changelog update
PJBot Oct 18, 2024
e04e3a6
HOTFIX spider clan charges can be armed again (#32866)
Errant-4 Oct 18, 2024
cf1b3b0
Merge spider clan charges can be armed again (#32866) to Master (#32881)
Errant-4 Oct 18, 2024
fca95ef
ghost locator maints loot (#32323)
Ilya246 Oct 18, 2024
758c9e4
Automatic changelog update
PJBot Oct 18, 2024
b137b0c
HOTFIX Plushies no longer delete items when recycled (#32882)
Errant-4 Oct 18, 2024
091e4c1
Add Towels (#32235)
IProduceWidgets Oct 18, 2024
22938a9
Allow strip removing items if you're holding something (#32750)
PJB3005 Oct 18, 2024
bf14b3c
Automatic changelog update
PJBot Oct 18, 2024
c4233cc
Scalpels now cut like knives (#32858)
beck-thompson Oct 19, 2024
7e0e641
Automatic changelog update
PJBot Oct 19, 2024
109e0bc
exponential backoff for admin logs db update (#32865)
MendaxxDev Oct 19, 2024
73a82d5
HOTFIX submodule update (#32897)
PJB3005 Oct 19, 2024
77a2907
Automatic changelog update
PJBot Oct 19, 2024
0a10521
Fix for low zombie blood (#32532)
insoPL Oct 19, 2024
a4750b3
Automatic changelog update
PJBot Oct 19, 2024
928877f
HOTFIX (stable) submodule update (#32900)
PJB3005 Oct 19, 2024
a62ddf2
Update Credits (#32916)
github-actions[bot] Oct 20, 2024
69849bf
MMIs and positronic brains now talk like pAIs in plushies (#32914)
beck-thompson Oct 20, 2024
088ec56
Automatic changelog update
PJBot Oct 20, 2024
b7bd7c1
Blunt damage will do stamina damage on wide attacks (#32422)
Calecute Oct 20, 2024
628f51b
Automatic changelog update
PJBot Oct 20, 2024
8cf5f93
Fix starting gear multiple storage fills and tests (#32718)
Zap527 Oct 20, 2024
4c3fd31
Cog small update (#32922)
Spessmann Oct 20, 2024
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
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
a227c3b
Box Station - Resolved #32771, #32949, and #32921 (#32950)
southbridge-fur Oct 22, 2024
7d91bcb
Automatic changelog update
PJBot 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
5d6ec18
Add Nuclear Cola centrifuge recipe (#32441)
southbridge-fur Oct 22, 2024
8f52a34
Automatic changelog update
PJBot Oct 22, 2024
2b02545
Hotfix server config changes for playercap and Levi bunker (#32925)
nikthechampiongr 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
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
c28665c
Merge branch 'staging' of ssh://github.com/space-wizards/space-statio…
VasilisThePikachu Oct 25, 2024
ae1c557
Applying Fix from #32764 to staging
Jezithyr Oct 13, 2024
9b0ae98
Merge branch 'staging' of ssh://github.com/space-wizards/space-statio…
VasilisThePikachu Oct 25, 2024
4fbe50a
Fix Bug With Uppercase Radio Keys (#32997)
Aeshus Oct 27, 2024
a471755
Fix loneop spawnrate by reverting it to not use the shuttle event sys…
BramvanZijp Oct 26, 2024
0468c0f
Fix playtime formatting (#32974)
stalengd Oct 28, 2024
1a60fd1
Merge remote-tracking branch 'upstream/stable' into upstream-merge
Simyon264 Oct 31, 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
3 changes: 2 additions & 1 deletion Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Shared.Localizations;
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
Expand All @@ -16,7 +17,7 @@ public PlaytimeStatsEntry(string role, TimeSpan playtime, StyleBox styleBox)

RoleLabel.Text = role;
Playtime = playtime; // store the TimeSpan value directly
PlaytimeLabel.Text = playtime.ToString(Loc.GetString("ui-playtime-time-format")); // convert to string for display
PlaytimeLabel.Text = ContentLocalizationManager.FormatPlaytime(playtime); // convert to string for display
BackgroundColorPanel.PanelOverride = styleBox;
}

Expand Down
3 changes: 1 addition & 2 deletions Content.Client/Info/PlaytimeStats/PlaytimeStatsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ private void PopulatePlaytimeData()
{
var overallPlaytime = _jobRequirementsManager.FetchOverallPlaytime();

var formattedPlaytime = overallPlaytime.ToString(Loc.GetString("ui-playtime-time-format"));
OverallPlaytimeLabel.Text = Loc.GetString("ui-playtime-overall", ("time", formattedPlaytime));
OverallPlaytimeLabel.Text = Loc.GetString("ui-playtime-overall", ("time", overallPlaytime));

var rolePlaytimes = _jobRequirementsManager.FetchPlaytimeByRoles();

Expand Down
Loading
Loading