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 sync #1071

Merged
merged 74 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
26fe029
Update da packages
juliangiebel Jan 23, 2025
ae3def8
ru tape logo (#2950)
lzk228 Jan 25, 2025
6933ef5
[Maps] Maus fix (#2953)
Meguneri Jan 25, 2025
cdf80e7
[Maps] Cute update (#2951)
OneYaHoy Jan 27, 2025
ffc1cc6
fix printer circuit recipe (#2957)
Zekins3366 Jan 30, 2025
d9f1d4e
ClearNewYearOnPearl (#2959)
RinidOps Jan 31, 2025
e357c9d
fix some locale and localized sprites (#2958)
lzk228 Feb 1, 2025
05b6158
Revert "New Year Music" (#2960)
ksen0morph Feb 2, 2025
757baa7
Revert "ru tape logo" (#2962)
lzk228 Feb 2, 2025
6dbe2c6
Mini-fix Update Pearl (#2963)
RinidOps Feb 3, 2025
a27acf2
[Maps] Astra Update (#2965)
lastPechkin Feb 4, 2025
fc179dd
[MAPS] Delta fixes (#2969)
XsenonDash Feb 6, 2025
dee9c2b
[Maps] Cute fixes (#2966)
OneYaHoy Feb 7, 2025
a97b85f
[Maps] Delta fixes (#2970)
Ko4ergaPunk Feb 7, 2025
ba2a937
locale tweaks sauce edition (#2973)
lapatison Feb 8, 2025
0832163
Configurator sprite small fix (#2989)
SonicHDC Feb 9, 2025
340e3fc
[Maps] Delta fix (#2976)
lastPechkin Feb 9, 2025
ef1f7a7
[Maps] New CentCom (#2990)
NotSoDana Feb 9, 2025
24829af
[MAPS] Delta fix :3 (#2992)
XsenonDash Feb 11, 2025
ae4c46a
Corvax sex fixes (#2961)
Zekins3366 Feb 11, 2025
d3eca37
[Maps] Awesome musorka fix (#2993)
Stubaretka24 Feb 13, 2025
c6c8e2d
[Maps] CC small fix. (#2994)
lastPechkin Feb 14, 2025
e4c5eec
[Maps] Terminal upd (#2995)
lastPechkin Feb 15, 2025
41f7dda
[Maps] Silly: little fixes (#2997)
ssdaniel24 Feb 16, 2025
625f8a5
[Maps] Awesome fix (#2998)
Stubaretka24 Feb 16, 2025
8d11501
[Resprite] Some grenades (#2991)
MureixloI Feb 16, 2025
bf42b63
Automatic changelog update
IanComradeBot Feb 16, 2025
d1b8360
[Resprited] Tile's icons and some tiles (#2999)
MureixloI Feb 16, 2025
bfff3de
Automatic changelog update
IanComradeBot Feb 16, 2025
eada49f
[Port] Hood sprites from TGstation (#2987)
MureixloI Feb 18, 2025
912d153
Automatic changelog update
IanComradeBot Feb 18, 2025
6b0792e
Fix station goals (#3002)
FireNameFN Feb 18, 2025
e945784
[Maps] Pilgrim update #10 (#3003)
Ko4ergaPunk Feb 18, 2025
0af3e04
Merge commit '3551eb04115854cdbbf1841f5960c3cdbc508583' into 02-19-up…
lzk228 Feb 19, 2025
8bf7034
fix textures and prototypes
lzk228 Feb 20, 2025
83fb8e0
port locale
lzk228 Feb 20, 2025
3408a14
fix 1
lzk228 Feb 20, 2025
1e03edf
fix 2
lzk228 Feb 20, 2025
9237f09
fix 3
lzk228 Feb 20, 2025
b41a348
fix rubber hammer attack rotation (#35357)
lzk228 Feb 21, 2025
597e4f1
fix 4
lzk228 Feb 21, 2025
54bb2a3
Adds Colored Light Bulbs (#35333)
Boaz1111 Feb 21, 2025
17f3db1
Automatic changelog update
PJBot Feb 21, 2025
f5eafc7
make the detailed examine verb predicted (#35362)
MilonPL Feb 21, 2025
732d9dc
Fix prying shut unpowered doors (#35380)
PJB3005 Feb 22, 2025
30f6737
Fix sink draining sound (#34173)
themias Feb 22, 2025
5b1a527
Merge stable into master (#35387)
metalgearsloth Feb 22, 2025
879234c
Automatic changelog update
PJBot Feb 22, 2025
f32ca4e
Minor SpriteFade stuff (#35385)
metalgearsloth Feb 22, 2025
ee31a1f
Wizard: Repulse Spell (#35377)
keronshb Feb 22, 2025
1ef2820
Comment out broken guidebook test speech code (#35398)
PJB3005 Feb 22, 2025
b912ded
New Feature: Admin Only messages in AHelp (#35283)
Winkarst-cpu Feb 22, 2025
a33189f
Automatic changelog update
PJBot Feb 22, 2025
38fdf6f
Merge pull request #3006 from lzk228/02-19-upstream
Vonsant Feb 22, 2025
e631fa8
Give dogs speech noises (#35383)
Sparlight Feb 22, 2025
1bd3887
Automatic changelog update
PJBot Feb 22, 2025
9fffc37
Фикс спрайтов шлюзов (#3008)
Zekins3366 Feb 22, 2025
c922b4f
Wizard: Smoke Spell (#35403)
keronshb Feb 22, 2025
a6d2948
Update Credits (#35410)
github-actions[bot] Feb 23, 2025
a6861b0
[HOTFIX] Borg emag notification and sound fix (#35394)
ScarKy0 Feb 23, 2025
1d655f6
[HOTFIX] Altered Silicon removal fails to trigger role update (#35399)
Errant-4 Feb 23, 2025
91678f7
Fixed Guidebook Sorting / Ordering (#34960)
GrownSamoyedDog Feb 23, 2025
54e0931
Automatic changelog update
PJBot Feb 23, 2025
f5c7809
Stable merge for hotfix backport (#35412)
PJB3005 Feb 23, 2025
e6d4596
Update nuget packages (#34595)
PJB3005 Feb 23, 2025
b880675
make opening storage on verb or on interact not silent (#35413)
lzk228 Feb 23, 2025
cb0d2b3
Automatic changelog update
PJBot Feb 23, 2025
a457551
Roof data rework (#35388)
metalgearsloth Feb 23, 2025
403d6f8
[MAPS] Paper update (#3009)
XsenonDash Feb 23, 2025
9d82b54
Merge remote-tracking branch 'wizard/master' into upstream-sync
Roudenn Feb 23, 2025
4394c67
Merge remote-tracking branch 'corvax/master' into upstream-sync
Roudenn Feb 23, 2025
94a1a31
fixes yay
Roudenn Feb 23, 2025
1d9ecdb
Update base_structureairlocks.yml
Roudenn Feb 23, 2025
d053ef7
Update newplayer.yml
Roudenn Feb 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions Content.Client/Administration/Systems/BwoinkSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ protected override void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySes
OnBwoinkTextMessageRecieved?.Invoke(this, message);
}

public void Send(NetUserId channelId, string text, bool playSound)
public void Send(NetUserId channelId, string text, bool playSound, bool adminOnly)
{
// Reuse the channel ID as the 'true sender'.
// Server will ignore this and if someone makes it not ignore this (which is bad, allows impersonation!!!), that will help.
RaiseNetworkEvent(new BwoinkTextMessage(channelId, channelId, text, playSound: playSound));
RaiseNetworkEvent(new BwoinkTextMessage(channelId, channelId, text, playSound: playSound, adminOnly: adminOnly));
SendInputTextUpdated(channelId, false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
<BoxContainer Orientation="Vertical" HorizontalExpand="True" SizeFlagsStretchRatio="2">
<BoxContainer Access="Public" Name="BwoinkArea" VerticalExpand="True" />
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<CheckBox Visible="True" Name="PlaySound" Access="Public" Text="{Loc 'admin-bwoink-play-sound'}" Pressed="True" />
<CheckBox Name="AdminOnly" Access="Public" Text="{Loc 'admin-ahelp-admin-only'}" ToolTip="{Loc 'admin-ahelp-admin-only-tooltip'}" />
<Control HorizontalExpand="True" MinWidth="5" />
<CheckBox Name="PlaySound" Access="Public" Text="{Loc 'admin-bwoink-play-sound'}" Pressed="True" />
<Control HorizontalExpand="True" MinWidth="5" />
<Button Visible="True" Name="PopOut" Access="Public" Text="{Loc 'admin-logs-pop-out'}" StyleClasses="OpenBoth" HorizontalAlignment="Left" />
<Control HorizontalExpand="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public BwoinkControl()
_adminManager.AdminStatusUpdated += UpdateButtons;
UpdateButtons();

AdminOnly.OnToggled += args => PlaySound.Disabled = args.Pressed;

ChannelSelector.OnSelectionChanged += sel =>
{
_currentPlayer = sel;
Expand Down
16 changes: 3 additions & 13 deletions Content.Client/Guidebook/Controls/GuidebookWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,14 @@ private IEnumerable<GuideEntry> GetSortedEntries(List<ProtoId<GuideEntryPrototyp
HashSet<ProtoId<GuideEntryPrototype>> entries = new(_entries.Keys);
foreach (var entry in _entries.Values)
{
if (entry.Children.Count > 0)
{
var sortedChildren = entry.Children
.Select(childId => _entries[childId])
.OrderBy(childEntry => childEntry.Priority)
.ThenBy(childEntry => Loc.GetString(childEntry.Name))
.Select(childEntry => new ProtoId<GuideEntryPrototype>(childEntry.Id))
.ToList();

entry.Children = sortedChildren;
}

entries.ExceptWith(entry.Children);
}

rootEntries = entries.ToList();
}

// Only roots need to be sorted.
// As defined in the SS14 Dev Wiki, children are already sorted based on their child field order within their parent's prototype definition.
// Roots are sorted by priority. If there is no defined priority for a root then it is by definition sorted undefined.
return rootEntries
.Select(rootEntryId => _entries[rootEntryId])
.OrderBy(rootEntry => rootEntry.Priority)
Expand Down
4 changes: 3 additions & 1 deletion Content.Client/Guidebook/GuidebookSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ private void OnGuidebookControlsTestInteractHand(EntityUid uid, GuidebookControl
if (!TryComp<SpeechComponent>(uid, out var speech) || speech.SpeechSounds is null)
return;

_audioSystem.PlayGlobal(speech.SpeechSounds, Filter.Local(), false, speech.AudioParams);
// This code is broken because SpeechSounds isn't a file name or sound specifier directly.
// Commenting out to avoid compile failure with https://github.com/space-wizards/RobustToolbox/pull/5540
// _audioSystem.PlayGlobal(speech.SpeechSounds, Filter.Local(), false, speech.AudioParams);
}

public void FakeClientActivateInWorld(EntityUid activated)
Expand Down
26 changes: 7 additions & 19 deletions Content.Client/Light/RoofOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Numerics;
using Content.Shared.Light.Components;
using Content.Shared.Light.EntitySystems;
using Content.Shared.Maps;
using Robust.Client.Graphics;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Map.Enumerators;
using Robust.Shared.Physics;

namespace Content.Client.Light;
Expand All @@ -17,9 +19,9 @@ public sealed class RoofOverlay : Overlay

private readonly EntityLookupSystem _lookup;
private readonly SharedMapSystem _mapSystem;
private readonly SharedRoofSystem _roof = default!;
private readonly SharedTransformSystem _xformSystem;

private readonly HashSet<Entity<OccluderComponent>> _occluders = new();
private List<Entity<MapGridComponent>> _grids = new();

public override OverlaySpace Space => OverlaySpace.BeforeLighting;
Expand All @@ -33,6 +35,7 @@ public RoofOverlay(IEntityManager entManager)

_lookup = _entManager.System<EntityLookupSystem>();
_mapSystem = _entManager.System<SharedMapSystem>();
_roof = _entManager.System<SharedRoofSystem>();
_xformSystem = _entManager.System<SharedTransformSystem>();

ZIndex = ContentZIndex;
Expand Down Expand Up @@ -86,29 +89,14 @@ protected override void Draw(in OverlayDrawArgs args)
worldHandle.SetTransform(matty);

var tileEnumerator = _mapSystem.GetTilesEnumerator(grid.Owner, grid, bounds);
var roofEnt = (grid.Owner, grid.Comp, roof);

// Due to stencilling we essentially draw on unrooved tiles
while (tileEnumerator.MoveNext(out var tileRef))
{
if ((tileRef.Tile.Flags & (byte) TileFlag.Roof) == 0x0)
if (!_roof.IsRooved(roofEnt, tileRef.GridIndices))
{
// Check if the tile is occluded in which case hide it anyway.
// This is to avoid lit walls bleeding over to unlit tiles.
_occluders.Clear();
_lookup.GetLocalEntitiesIntersecting(grid.Owner, tileRef.GridIndices, _occluders);
var found = false;

foreach (var occluder in _occluders)
{
if (!occluder.Comp.Enabled)
continue;

found = true;
break;
}

if (!found)
continue;
continue;
}

var local = _lookup.GetLocalBounds(tileRef, grid.Comp.TileSize);
Expand Down
4 changes: 3 additions & 1 deletion Content.Client/Overlays/StencilOverlay.Weather.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Numerics;
using Content.Shared.Light.Components;
using Content.Shared.Weather;
using Robust.Client.Graphics;
using Robust.Shared.Map.Components;
Expand Down Expand Up @@ -34,11 +35,12 @@ private void DrawWeather(in OverlayDrawArgs args, WeatherPrototype weatherProto,
var matrix = _transform.GetWorldMatrix(grid, xformQuery);
var matty = Matrix3x2.Multiply(matrix, invMatrix);
worldHandle.SetTransform(matty);
_entManager.TryGetComponent(grid.Owner, out RoofComponent? roofComp);

foreach (var tile in _map.GetTilesIntersecting(grid.Owner, grid, worldAABB))
{
// Ignored tiles for stencil
if (_weather.CanWeatherAffect(grid.Owner, grid, tile))
if (_weather.CanWeatherAffect(grid.Owner, grid, tile, roofComp))
{
continue;
}
Expand Down
21 changes: 14 additions & 7 deletions Content.Client/Sprite/SpriteFadeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,21 @@ public sealed class SpriteFadeSystem : EntitySystem

private readonly HashSet<FadingSpriteComponent> _comps = new();

private EntityQuery<SpriteComponent> _spriteQuery;
private EntityQuery<SpriteFadeComponent> _fadeQuery;
private EntityQuery<FadingSpriteComponent> _fadingQuery;

private const float TargetAlpha = 0.4f;
private const float ChangeRate = 1f;

public override void Initialize()
{
base.Initialize();

_spriteQuery = GetEntityQuery<SpriteComponent>();
_fadeQuery = GetEntityQuery<SpriteFadeComponent>();
_fadingQuery = GetEntityQuery<FadingSpriteComponent>();

SubscribeLocalEvent<FadingSpriteComponent, ComponentShutdown>(OnFadingShutdown);
}

Expand All @@ -42,28 +51,26 @@ public override void FrameUpdate(float frameTime)
base.FrameUpdate(frameTime);

var player = _playerManager.LocalEntity;
var spriteQuery = GetEntityQuery<SpriteComponent>();
var change = ChangeRate * frameTime;

if (TryComp(player, out TransformComponent? playerXform) &&
_stateManager.CurrentState is GameplayState state &&
spriteQuery.TryGetComponent(player, out var playerSprite))
_spriteQuery.TryGetComponent(player, out var playerSprite))
{
var fadeQuery = GetEntityQuery<SpriteFadeComponent>();
var mapPos = _transform.GetMapCoordinates(_playerManager.LocalEntity!.Value, xform: playerXform);

// Also want to handle large entities even if they may not be clickable.
foreach (var ent in state.GetClickableEntities(mapPos))
{
if (ent == player ||
!fadeQuery.HasComponent(ent) ||
!spriteQuery.TryGetComponent(ent, out var sprite) ||
!_fadeQuery.HasComponent(ent) ||
!_spriteQuery.TryGetComponent(ent, out var sprite) ||
sprite.DrawDepth < playerSprite.DrawDepth)
{
continue;
}

if (!TryComp<FadingSpriteComponent>(ent, out var fading))
if (!_fadingQuery.TryComp(ent, out var fading))
{
fading = AddComp<FadingSpriteComponent>(ent);
fading.OriginalAlpha = sprite.Color.A;
Expand All @@ -85,7 +92,7 @@ _stateManager.CurrentState is GameplayState state &&
if (_comps.Contains(comp))
continue;

if (!spriteQuery.TryGetComponent(uid, out var sprite))
if (!_spriteQuery.TryGetComponent(uid, out var sprite))
continue;

var newColor = Math.Min(sprite.Color.A + change, comp.OriginalAlpha);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public void EnsureUIHelper()
UIHelper = isAdmin ? new AdminAHelpUIHandler(ownerUserId) : new UserAHelpUIHandler(ownerUserId);
UIHelper.DiscordRelayChanged(_discordRelayActive);

UIHelper.SendMessageAction = (userId, textMessage, playSound) => _bwoinkSystem?.Send(userId, textMessage, playSound);
UIHelper.SendMessageAction = (userId, textMessage, playSound, adminOnly) => _bwoinkSystem?.Send(userId, textMessage, playSound, adminOnly);
UIHelper.InputTextChanged += (channel, text) => _bwoinkSystem?.SendInputTextUpdated(channel, text.Length > 0);
UIHelper.OnClose += () => { SetAHelpPressed(false); };
UIHelper.OnOpen += () => { SetAHelpPressed(true); };
Expand Down Expand Up @@ -325,7 +325,7 @@ public interface IAHelpUIHandler : IDisposable
public void PeopleTypingUpdated(BwoinkPlayerTypingUpdated args);
public event Action OnClose;
public event Action OnOpen;
public Action<NetUserId, string, bool>? SendMessageAction { get; set; }
public Action<NetUserId, string, bool, bool>? SendMessageAction { get; set; }
public event Action<NetUserId, string>? InputTextChanged;
}
public sealed class AdminAHelpUIHandler : IAHelpUIHandler
Expand Down Expand Up @@ -409,7 +409,7 @@ public void PeopleTypingUpdated(BwoinkPlayerTypingUpdated args)

public event Action? OnClose;
public event Action? OnOpen;
public Action<NetUserId, string, bool>? SendMessageAction { get; set; }
public Action<NetUserId, string, bool, bool>? SendMessageAction { get; set; }
public event Action<NetUserId, string>? InputTextChanged;

public void Open(NetUserId channelId, bool relayActive)
Expand Down Expand Up @@ -463,7 +463,7 @@ public BwoinkPanel EnsurePanel(NetUserId channelId)
if (_activePanelMap.TryGetValue(channelId, out var existingPanel))
return existingPanel;

_activePanelMap[channelId] = existingPanel = new BwoinkPanel(text => SendMessageAction?.Invoke(channelId, text, Window?.Bwoink.PlaySound.Pressed ?? true));
_activePanelMap[channelId] = existingPanel = new BwoinkPanel(text => SendMessageAction?.Invoke(channelId, text, Window?.Bwoink.PlaySound.Pressed ?? true, Window?.Bwoink.AdminOnly.Pressed ?? false));
existingPanel.InputTextChanged += text => InputTextChanged?.Invoke(channelId, text);
existingPanel.Visible = false;
if (!Control!.BwoinkArea.Children.Contains(existingPanel))
Expand Down Expand Up @@ -549,7 +549,7 @@ public void PeopleTypingUpdated(BwoinkPlayerTypingUpdated args)

public event Action? OnClose;
public event Action? OnOpen;
public Action<NetUserId, string, bool>? SendMessageAction { get; set; }
public Action<NetUserId, string, bool, bool>? SendMessageAction { get; set; }
public event Action<NetUserId, string>? InputTextChanged;

public void Open(NetUserId channelId, bool relayActive)
Expand All @@ -562,7 +562,7 @@ private void EnsureInit(bool relayActive)
{
if (_window is { Disposed: false })
return;
_chatPanel = new BwoinkPanel(text => SendMessageAction?.Invoke(_ownerId, text, true));
_chatPanel = new BwoinkPanel(text => SendMessageAction?.Invoke(_ownerId, text, true, false));
_chatPanel.InputTextChanged += text => InputTextChanged?.Invoke(_ownerId, text);
_chatPanel.RelayedToDiscordLabel.Visible = relayActive;
_window = new DefaultWindow()
Expand Down
4 changes: 3 additions & 1 deletion Content.Client/Weather/WeatherSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Numerics;
using Content.Shared.Light.Components;
using Content.Shared.Weather;
using Robust.Client.Audio;
using Robust.Client.GameObjects;
Expand Down Expand Up @@ -57,6 +58,7 @@ protected override void Run(EntityUid uid, WeatherData weather, WeatherPrototype
// Work out tiles nearby to determine volume.
if (TryComp<MapGridComponent>(entXform.GridUid, out var grid))
{
TryComp(entXform.GridUid, out RoofComponent? roofComp);
var gridId = entXform.GridUid.Value;
// FloodFill to the nearest tile and use that for audio.
var seed = _mapSystem.GetTileRef(gridId, grid, entXform.Coordinates);
Expand All @@ -71,7 +73,7 @@ protected override void Run(EntityUid uid, WeatherData weather, WeatherPrototype
if (!visited.Add(node.GridIndices))
continue;

if (!CanWeatherAffect(entXform.GridUid.Value, grid, node))
if (!CanWeatherAffect(entXform.GridUid.Value, grid, node, roofComp))
{
// Add neighbors
// TODO: Ideally we pick some deterministically random direction and use that
Expand Down
12 changes: 6 additions & 6 deletions Content.Server/Administration/Systems/BwoinkSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ protected override void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySes
var personalChannel = senderSession.UserId == message.UserId;
var senderAdmin = _adminManager.GetAdminData(senderSession);
var senderAHelpAdmin = senderAdmin?.HasFlag(AdminFlags.Adminhelp) ?? false;
var authorized = personalChannel || senderAHelpAdmin;
var authorized = personalChannel && !message.AdminOnly || senderAHelpAdmin;
if (!authorized)
{
// Unauthorized bwoink (log?)
Expand Down Expand Up @@ -678,11 +678,11 @@ protected override void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySes
bwoinkText = $"{senderSession.Name}";
}

bwoinkText = $"{(message.PlaySound ? "" : "(S) ")}{bwoinkText}: {escapedText}";
bwoinkText = $"{(message.AdminOnly ? Loc.GetString("bwoink-message-admin-only") : !message.PlaySound ? Loc.GetString("bwoink-message-silent") : "")} {bwoinkText}: {escapedText}";

// If it's not an admin / admin chooses to keep the sound then play it.
var playSound = !senderAHelpAdmin || message.PlaySound;
var msg = new BwoinkTextMessage(message.UserId, senderSession.UserId, bwoinkText, playSound: playSound);
// If it's not an admin / admin chooses to keep the sound and message is not an admin only message, then play it.
var playSound = (!senderAHelpAdmin || message.PlaySound) && !message.AdminOnly;
var msg = new BwoinkTextMessage(message.UserId, senderSession.UserId, bwoinkText, playSound: playSound, adminOnly: message.AdminOnly);

LogBwoink(msg);

Expand All @@ -702,7 +702,7 @@ protected override void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySes
}

// Notify player
if (_playerManager.TryGetSessionById(message.UserId, out var session))
if (_playerManager.TryGetSessionById(message.UserId, out var session) && !message.AdminOnly)
{
if (!admins.Contains(session.Channel))
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Backmen/EvilTwin/EvilTwinSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Content.Server.Backmen.Economy;
using Content.Server.Backmen.Fugitive;
using Content.Server.CartridgeLoader.Cartridges;
using Content.Server.DetailExaminable;
using Content.Server.Forensics;
using Content.Server.GameTicking;
using Content.Server.Humanoid;
Expand Down Expand Up @@ -40,6 +39,7 @@
using Content.Shared.CartridgeLoader;
using Content.Shared.CCVar;
using Content.Shared.Clothing;
using Content.Shared.DetailExaminable;
using Content.Shared.Forensics.Components;
using Content.Shared.GameTicking;
using Content.Shared.Inventory;
Expand Down
12 changes: 6 additions & 6 deletions Content.Server/Corvax/StationGoal/StationGoalCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Content.Server.Corvax.StationGoal
public sealed class StationGoalCommand : IConsoleCommand
{
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;

public string Command => "sendstationgoal";
public string Description => Loc.GetString("send-station-goal-command-description");
Expand All @@ -31,15 +32,14 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
}

var protoId = args[1];
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
if (!prototypeManager.TryIndex<StationGoalPrototype>(protoId, out var proto))
if (!_prototypeManager.TryIndex<StationGoalPrototype>(protoId, out var proto))
{
shell.WriteError($"No station goal found with ID {protoId}!");
return;
}

var stationGoalPaper = IoCManager.Resolve<IEntityManager>().System<StationGoalPaperSystem>();
if (!stationGoalPaper.SendStationGoal(euid, protoId))
var stationGoalPaper = _entManager.System<StationGoalPaperSystem>();
if (!stationGoalPaper.SendStationGoal(euid.Value, protoId))
{
shell.WriteError("Station goal was not sent");
return;
Expand All @@ -52,9 +52,9 @@ public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{
case 1:
var stations = ContentCompletionHelper.StationIds(_entManager);
return CompletionResult.FromHintOptions(stations, "[StationId]");
return CompletionResult.FromHintOptions(stations, Loc.GetString("send-station-goal-command-arg-station"));
case 2:
var options = IoCManager.Resolve<IPrototypeManager>()
var options = _prototypeManager
.EnumeratePrototypes<StationGoalPrototype>()
.Select(p => new CompletionOption(p.ID));

Expand Down
Loading
Loading