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 update #16

Merged
merged 89 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
08a59dd
Door Remote Changelog Entry (#25144)
Plykiya Feb 12, 2024
c19fbbf
Automatic changelog update
PJBot Feb 12, 2024
9bfd154
Lowered Ion Storm Reoccurence Delay to 20 (#25135)
FungiFellow Feb 12, 2024
cdabc98
Re-added shivs to crafting menus (#25094)
SlamBamActionman Feb 12, 2024
60e6365
Automatic changelog update
PJBot Feb 12, 2024
ff5b618
Color Tipped Ammo (#25103)
PoorMansDreams Feb 12, 2024
f4990d0
Automatic changelog update
PJBot Feb 12, 2024
b9a1812
Add overlay decals for mini tiles and bricks (#24949)
Ko4ergaPunk Feb 12, 2024
b5d5a12
Update Core (#24862)
UbaserB Feb 12, 2024
ae65cf2
Buyable Jani Trolley (#25139)
PoorMansDreams Feb 12, 2024
d0bb632
Added display for amount of hits left in stun batons/stun prods. (#25…
Plykiya Feb 12, 2024
1df0e1e
Automatic changelog update
PJBot Feb 12, 2024
8915d3a
autolatheable air tanks (#25130)
Ilya246 Feb 12, 2024
e2e44e8
Automatic changelog update
PJBot Feb 12, 2024
bee9049
Fix pointing arrow trajectory (#25061)
Krunklehorn Feb 12, 2024
a6629f4
make linking logic gates 1000% better (#25041)
deltanedas Feb 12, 2024
fa5f41a
Buff emergency toolbox fill (#24225)
UbaserB Feb 12, 2024
7939250
Void jetpack resprite (#25150)
UbaserB Feb 12, 2024
606de67
Automatic changelog update
PJBot Feb 12, 2024
8f7055f
Allow configuring gen_build_info.py through environment variables (#2…
deepy Feb 12, 2024
86ccba7
Significantly nerf Deathnettles (#25068)
UltimateJester Feb 13, 2024
7046cea
Automatic changelog update
PJBot Feb 13, 2024
13adc7d
Fix spelling errors in mechs.yml (#25168)
deepdarkdepths Feb 13, 2024
bc8418e
fix showhealthbars perms (#25157)
Genkail Feb 13, 2024
ab5aa6c
Allow inspecting ID's and Health of people behind glass (#25163)
VasilisThePikachu Feb 13, 2024
42401c7
Automatic changelog update
PJBot Feb 13, 2024
fddf1da
Fix decal error spam (#25172)
metalgearsloth Feb 13, 2024
8ca9724
Restore MonoOverlay (#25170)
metalgearsloth Feb 13, 2024
c0c92fd
Automatic changelog update
PJBot Feb 13, 2024
5e98aba
Added "wink" and "tearfully smiles" emotes + more cry emote variation…
jamessimo Feb 13, 2024
3062423
Automatic changelog update
PJBot Feb 13, 2024
724cded
Update submodule to 210.0.0 (#25175)
metalgearsloth Feb 13, 2024
38aeeda
The medical beret is real (#25176)
icekot8 Feb 13, 2024
7bbdcd1
Automatic changelog update
PJBot Feb 13, 2024
f695890
Fixed Tipped ammo not being Spent (#25167)
PoorMansDreams Feb 13, 2024
4d3b3c7
Automatic changelog update
PJBot Feb 13, 2024
2979410
Hoods and some chaplain's hats now hides hair (#25142)
Agoichi Feb 13, 2024
13f3ffd
Glassbox shatter resprite (#25136)
xKREKSx Feb 13, 2024
880872e
Automatic changelog update
PJBot Feb 13, 2024
d6e1002
Random spontaneous cleanup PR (#25131)
PJB3005 Feb 13, 2024
2bc3f92
Decrease the chemical cost of regen mesh and sutures and move them to…
Blackern5000 Feb 13, 2024
3c70d71
Split slime marking leg gradient (#24928)
lzk228 Feb 13, 2024
28b7d9e
Automatic changelog update
PJBot Feb 13, 2024
dd39340
Require plants to be harvestable before sampling (#24851)
Partmedia Feb 13, 2024
198f32d
Add verbs to Open/Close Openable containers, and add optional seals (…
Tayrtahn Feb 13, 2024
09e782d
Automatic changelog update
PJBot Feb 13, 2024
7389612
Shadow anomaly returns (#24629)
TheShuEd Feb 13, 2024
2d6814b
Automatic changelog update
PJBot Feb 13, 2024
b64893b
Microwave UX enhancements (#24547)
jamessimo Feb 13, 2024
9f2b857
Automatic changelog update
PJBot Feb 13, 2024
caa6b79
Additional damage visualisers (#24618)
UbaserB Feb 13, 2024
82e6adf
Anomaly Synchronizer + Signallers tweaks (#24461)
TheShuEd Feb 13, 2024
280789a
Automatic changelog update
PJBot Feb 13, 2024
d53c2a0
saltern update (#25182)
deltanedas Feb 13, 2024
5edb497
Allow players to run saveconfig command. (#25200)
PJB3005 Feb 14, 2024
bda9c17
Revert "Allow configuring gen_build_info.py through environment varia…
PJB3005 Feb 14, 2024
1964138
Fax machines can print from text file (#23262)
joshepvodka Feb 14, 2024
a6bf01e
Automatic changelog update
PJBot Feb 14, 2024
e6356f0
Vox names, species prototype cleanup, some cosmetic changes (#24994)
Errant-4 Feb 14, 2024
76d1db3
Balanced ChemVend Stock (#25207)
wafehling Feb 14, 2024
0eb14dc
Ranged Holosigns (#25120)
Plykiya Feb 14, 2024
583d469
Automatic changelog update
PJBot Feb 14, 2024
bb10a93
Minor test fixes (#25174)
metalgearsloth Feb 14, 2024
663e618
Add pun to diagnostic hud description (#25209)
Interrobang01 Feb 14, 2024
ed77357
Add events for TemperatureProtection and PressureProtection (#25165)
EmoGarbage404 Feb 14, 2024
fe458fa
Update criminal-records.ftl (#25229)
k3yw Feb 14, 2024
829b5f7
Adds always powered variants of colored lights (#25185)
IamVelcroboy Feb 14, 2024
d11ce62
Fixes silver bars being whole stacks (#25239)
IamVelcroboy Feb 14, 2024
03f06e9
Makes clumsy not delete guns (#25243)
jessicamaybe Feb 14, 2024
30245af
Predict Injector (syringes), cleanup (#25235)
PJB3005 Feb 14, 2024
834e9ff
Updated disabler to have suitStorage tag under slots. (#25238)
Zadeon Feb 14, 2024
66104be
Automatic changelog update
PJBot Feb 14, 2024
8b06e0b
Updates to Origin (#24908)
Krunklehorn Feb 14, 2024
9c42610
Fix spawn priority persistence on reconnect and restart (#25246)
Krunklehorn Feb 15, 2024
8d2623b
Add French accent beret (#21430)
brainfood1183 Feb 15, 2024
6cda4ef
Allow thermomachines to exchange with air instead of inlet (#25247)
Menshin Feb 15, 2024
06f4a39
Fix: Holosigns can be stored again (#25249)
Plykiya Feb 15, 2024
70c78e5
Death acidifier fix (#25251)
Jezithyr Feb 15, 2024
d20edf0
Automatic changelog update
PJBot Feb 15, 2024
7c1d4c7
Clarify stripping logs (#25190)
nikthechampiongr Feb 15, 2024
5058b08
Fix disposals bins not automatically flushing after an object is inse…
PJB3005 Feb 15, 2024
b9f0db4
Sec & greysec jumpskirt fix (#25269)
Flareguy Feb 15, 2024
e0a4e1f
Automatic changelog update
PJBot Feb 15, 2024
988174e
Reduce eshield hp (#25258)
liltenhead Feb 15, 2024
e4ae1ba
Automatic changelog update
PJBot Feb 15, 2024
f81d40b
Artifact hemoglobin trigger now accepts all sentient blood types (#25…
wafehling Feb 15, 2024
269db0e
Update engine to v210.1.0 (#25288)
ElectroJr Feb 15, 2024
c273af0
Merge branch 'master' into 2024-02-23-Upstream
dvir001 Feb 23, 2024
38a3ac4
Update RobustToolbox
dvir001 Feb 23, 2024
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
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions Content.Benchmarks/ColorInterpolateBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ public static Color InterpolateSysVector4(Color a, Color b,
public static Color InterpolateSysVector4In(in Color endPoint1, in Color endPoint2,
float lambda)
{
ref var sva = ref Unsafe.As<Color, SysVector4>(ref Unsafe.AsRef(endPoint1));
ref var svb = ref Unsafe.As<Color, SysVector4>(ref Unsafe.AsRef(endPoint2));
ref var sva = ref Unsafe.As<Color, SysVector4>(ref Unsafe.AsRef(in endPoint1));
ref var svb = ref Unsafe.As<Color, SysVector4>(ref Unsafe.AsRef(in endPoint2));

var res = SysVector4.Lerp(svb, sva, lambda);

Expand All @@ -156,8 +156,8 @@ public static Color InterpolateSimd(Color a, Color b,
public static Color InterpolateSimdIn(in Color a, in Color b,
float lambda)
{
var vecA = Unsafe.As<Color, Vector128<float>>(ref Unsafe.AsRef(a));
var vecB = Unsafe.As<Color, Vector128<float>>(ref Unsafe.AsRef(b));
var vecA = Unsafe.As<Color, Vector128<float>>(ref Unsafe.AsRef(in a));
var vecB = Unsafe.As<Color, Vector128<float>>(ref Unsafe.AsRef(in b));

vecB = Fma.MultiplyAdd(Sse.Subtract(vecB, vecA), Vector128.Create(lambda), vecA);

Expand Down
5 changes: 0 additions & 5 deletions Content.Benchmarks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ internal static class Program

public static void Main(string[] args)
{
MainAsync(args).GetAwaiter().GetResult();
}

public static async Task MainAsync(string[] args)
{
#if DEBUG
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("\nWARNING: YOU ARE RUNNING A DEBUG BUILD, USE A RELEASE BUILD FOR AN ACCURATE BENCHMARK");
Expand Down
18 changes: 9 additions & 9 deletions Content.Client/Actions/ActionsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private void BaseHandleState<T>(EntityUid uid, BaseActionComponent component, Ba
component.ItemIconStyle = state.ItemIconStyle;
component.Sound = state.Sound;

if (_playerManager.LocalPlayer?.ControlledEntity == component.AttachedEntity)
if (_playerManager.LocalEntity == component.AttachedEntity)
ActionsUpdated?.Invoke();
}

Expand All @@ -111,7 +111,7 @@ protected override void UpdateAction(EntityUid? actionId, BaseActionComponent? a
return;

base.UpdateAction(actionId, action);
if (_playerManager.LocalPlayer?.ControlledEntity != action.AttachedEntity)
if (_playerManager.LocalEntity != action.AttachedEntity)
return;

ActionsUpdated?.Invoke();
Expand Down Expand Up @@ -144,7 +144,7 @@ private void HandleComponentState(EntityUid uid, ActionsComponent component, ref
_added.Add((actionId, action));
}

if (_playerManager.LocalPlayer?.ControlledEntity != uid)
if (_playerManager.LocalEntity != uid)
return;

foreach (var action in _removed)
Expand Down Expand Up @@ -177,23 +177,23 @@ public static int ActionComparer((EntityUid, BaseActionComponent?) a, (EntityUid
protected override void ActionAdded(EntityUid performer, EntityUid actionId, ActionsComponent comp,
BaseActionComponent action)
{
if (_playerManager.LocalPlayer?.ControlledEntity != performer)
if (_playerManager.LocalEntity != performer)
return;

OnActionAdded?.Invoke(actionId);
}

protected override void ActionRemoved(EntityUid performer, EntityUid actionId, ActionsComponent comp, BaseActionComponent action)
{
if (_playerManager.LocalPlayer?.ControlledEntity != performer)
if (_playerManager.LocalEntity != performer)
return;

OnActionRemoved?.Invoke(actionId);
}

public IEnumerable<(EntityUid Id, BaseActionComponent Comp)> GetClientActions()
{
if (_playerManager.LocalPlayer?.ControlledEntity is not { } user)
if (_playerManager.LocalEntity is not { } user)
return Enumerable.Empty<(EntityUid, BaseActionComponent)>();

return GetActions(user);
Expand All @@ -216,7 +216,7 @@ public void UnlinkAllActions()

public void LinkAllActions(ActionsComponent? actions = null)
{
if (_playerManager.LocalPlayer?.ControlledEntity is not { } user ||
if (_playerManager.LocalEntity is not { } user ||
!Resolve(user, ref actions, false))
{
return;
Expand All @@ -233,7 +233,7 @@ public override void Shutdown()

public void TriggerAction(EntityUid actionId, BaseActionComponent action)
{
if (_playerManager.LocalPlayer?.ControlledEntity is not { } user ||
if (_playerManager.LocalEntity is not { } user ||
!TryComp(user, out ActionsComponent? actions))
{
return;
Expand Down Expand Up @@ -261,7 +261,7 @@ public void TriggerAction(EntityUid actionId, BaseActionComponent action)
/// </summary>
public void LoadActionAssignments(string path, bool userData)
{
if (_playerManager.LocalPlayer?.ControlledEntity is not { } user)
if (_playerManager.LocalEntity is not { } user)
return;

var file = new ResPath(path).ToRootedPath();
Expand Down
17 changes: 9 additions & 8 deletions Content.Client/Administration/Managers/ClientAdminManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ public sealed class ClientAdminManager : IClientAdminManager, IClientConGroupImp
[Dependency] private readonly IClientNetManager _netMgr = default!;
[Dependency] private readonly IClientConGroupController _conGroup = default!;
[Dependency] private readonly IResourceManager _res = default!;
[Dependency] private readonly ILogManager _logManager = default!;

private AdminData? _adminData;
private readonly HashSet<string> _availableCommands = new();

private readonly AdminCommandPermissions _localCommandPermissions = new();
private ISawmill _sawmill = default!;

public event Action? AdminStatusUpdated;

Expand Down Expand Up @@ -92,17 +94,17 @@ private void UpdateMessageRx(MsgUpdateAdminStatus message)
}

_availableCommands.UnionWith(message.AvailableCommands);
Logger.DebugS("admin", $"Have {message.AvailableCommands.Length} commands available");
_sawmill.Debug($"Have {message.AvailableCommands.Length} commands available");

_adminData = message.Admin;
if (_adminData != null)
{
var flagsText = string.Join("|", AdminFlagsHelper.FlagsToNames(_adminData.Flags));
Logger.InfoS("admin", $"Updated admin status: {_adminData.Active}/{_adminData.Title}/{flagsText}");
_sawmill.Info($"Updated admin status: {_adminData.Active}/{_adminData.Title}/{flagsText}");
}
else
{
Logger.InfoS("admin", "Updated admin status: Not admin");
_sawmill.Info("Updated admin status: Not admin");
}

AdminStatusUpdated?.Invoke();
Expand All @@ -114,26 +116,25 @@ private void UpdateMessageRx(MsgUpdateAdminStatus message)
void IPostInjectInit.PostInject()
{
_conGroup.Implementation = this;
_sawmill = _logManager.GetSawmill("admin");
}

public AdminData? GetAdminData(EntityUid uid, bool includeDeAdmin = false)
{
return uid == _player.LocalPlayer?.ControlledEntity
? _adminData
: null;
return uid == _player.LocalEntity ? _adminData : null;
}

public AdminData? GetAdminData(ICommonSession session, bool includeDeAdmin = false)
{
if (_player.LocalPlayer?.UserId == session.UserId)
if (_player.LocalUser == session.UserId)
return _adminData;

return null;
}

public AdminData? GetAdminData(bool includeDeAdmin = false)
{
if (_player.LocalPlayer is { Session: { } session })
if (_player.LocalSession is { } session)
return GetAdminData(session, includeDeAdmin);

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private void SetLocation()
{
UpdateMapOptions();

if (!_entMan.TryGetComponent(_playerManager.LocalPlayer?.ControlledEntity, out TransformComponent? transform))
if (!_entMan.TryGetComponent(_playerManager.LocalEntity, out TransformComponent? transform))
return;

_pausePreview = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private void Reset()
var entManager = IoCManager.Resolve<IEntityManager>();
var xformSystem = entManager.System<SharedTransformSystem>();
var playerManager = IoCManager.Resolve<IPlayerManager>();
var player = playerManager.LocalPlayer?.ControlledEntity;
var player = playerManager.LocalEntity;

var currentMap = MapId.Nullspace;
var position = Vector2.Zero;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected override void EnteredTree()
{
_data.Clear();

var player = _players.LocalPlayer?.ControlledEntity;
var player = _players.LocalEntity;
var playerGrid = _entities.GetComponentOrNull<TransformComponent>(player)?.GridUid;
var query = IoCManager.Resolve<IEntityManager>().AllEntityQueryEnumerator<MapGridComponent>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected override void EnteredTree()
while (gridQuery.MoveNext(out var uid, out _))
{
_gridData.Add(entManager.GetNetEntity(uid));
var player = playerManager.LocalPlayer?.ControlledEntity;
var player = playerManager.LocalEntity;
var playerGrid = entManager.GetComponentOrNull<TransformComponent>(player)?.GridUid;
GridOptions.AddItem($"{uid} {(playerGrid == uid ? " (Current)" : "")}");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected override void EnteredTree()

while (gridQuery.MoveNext(out var uid, out _))
{
var player = playerManager.LocalPlayer?.ControlledEntity;
var player = playerManager.LocalEntity;
var playerGrid = entManager.GetComponentOrNull<TransformComponent>(player)?.GridUid;
GridOptions.AddItem($"{uid} {(playerGrid == uid ? " (Current)" : "")}");
_gridData.Add(entManager.GetNetEntity(uid));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override void EnteredTree()

while (gridQuery.MoveNext(out var uid, out _))
{
var player = playerManager.LocalPlayer?.ControlledEntity;
var player = playerManager.LocalEntity;
var playerGrid = entManager.GetComponentOrNull<TransformComponent>(player)?.GridUid;
GridOptions.AddItem($"{uid} {(playerGrid == uid ? " (Current)" : "")}");
_data.Add(entManager.GetNetEntity(uid));
Expand Down
12 changes: 6 additions & 6 deletions Content.Client/Alerts/ClientAlertsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public IReadOnlyDictionary<AlertKey, AlertState>? ActiveAlerts
{
get
{
var ent = _playerManager.LocalPlayer?.ControlledEntity;
var ent = _playerManager.LocalEntity;
return ent is not null
? GetActiveAlerts(ent.Value)
: null;
Expand All @@ -49,29 +49,29 @@ public IReadOnlyDictionary<AlertKey, AlertState>? ActiveAlerts

protected override void AfterShowAlert(Entity<AlertsComponent> alerts)
{
if (_playerManager.LocalPlayer?.ControlledEntity != alerts.Owner)
if (_playerManager.LocalEntity != alerts.Owner)
return;

SyncAlerts?.Invoke(this, alerts.Comp.Alerts);
}

protected override void AfterClearAlert(Entity<AlertsComponent> alertsComponent)
{
if (_playerManager.LocalPlayer?.ControlledEntity != alertsComponent.Owner)
if (_playerManager.LocalEntity != alertsComponent.Owner)
return;

SyncAlerts?.Invoke(this, alertsComponent.Comp.Alerts);
}

private void ClientAlertsHandleState(EntityUid uid, AlertsComponent component, ref AfterAutoHandleStateEvent args)
{
if (_playerManager.LocalPlayer?.ControlledEntity == uid)
if (_playerManager.LocalEntity == uid)
SyncAlerts?.Invoke(this, component.Alerts);
}

private void OnPlayerAttached(EntityUid uid, AlertsComponent component, LocalPlayerAttachedEvent args)
{
if (_playerManager.LocalPlayer?.ControlledEntity != uid)
if (_playerManager.LocalEntity != uid)
return;

SyncAlerts?.Invoke(this, component.Alerts);
Expand All @@ -81,7 +81,7 @@ protected override void HandleComponentShutdown(EntityUid uid, AlertsComponent c
{
base.HandleComponentShutdown(uid, component, args);

if (_playerManager.LocalPlayer?.ControlledEntity != uid)
if (_playerManager.LocalEntity != uid)
return;

ClearAlerts?.Invoke(this, EventArgs.Empty);
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Animations/EntityPickupAnimationSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void AnimateEntityPickup(EntityUid uid, EntityCoordinates initial, Vector
despawn.Lifetime = 0.25f;
_transform.SetLocalRotationNoLerp(animatableClone, initialAngle);

_animations.Play(animatableClone, animations, new Animation
_animations.Play(new Entity<AnimationPlayerComponent>(animatableClone, animations), new Animation
{
Length = TimeSpan.FromMilliseconds(125),
AnimationTracks =
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace Content.Client.Anomaly.Ui;
[GenerateTypedNameReferences]
public sealed partial class AnomalyGeneratorWindow : FancyWindow
{
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IGameTiming _timing = default!;

private TimeSpan _cooldownEnd = TimeSpan.Zero;
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public sealed partial class AirAlarmWindow : FancyWindow
public event Action<string, AtmosMonitorThresholdType, AtmosAlarmThreshold, Gas?>? AtmosAlarmThresholdChanged;
public event Action<AirAlarmMode>? AirAlarmModeChanged;
public event Action<bool>? AutoModeChanged;
public event Action<string>? ResyncDeviceRequested;
public event Action? ResyncAllRequested;
public event Action<AirAlarmTab>? AirAlarmTabChange;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
HorizontalExpand="True" Orientation="Vertical"
Margin = "20 0 0 0" MinSize="160 0" >
<Label Name="CBoundLabel" HorizontalAlignment="Center" />
<CheckBox Name="CBoundEnabled" HorizontalAlignment="Center" Text="{Loc 'Enable'}"/>
<CheckBox Name="CBoundEnabled" HorizontalAlignment="Center" Text="{Loc 'Enable'}" Pressed="True" />
<FloatSpinBox Name="CSpinner" />
</BoxContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public ThresholdBoundControl(string controlLabel, float value, float uiValueScal
CBoundLabel.Text = controlLabel;

CSpinner.Value = ScaledValue;
CBoundEnabled.Pressed = _value != null;

CSpinner.OnValueChanged += SpinnerValueChanged;
CBoundEnabled.OnToggled += CheckboxToggled;
Expand Down
13 changes: 4 additions & 9 deletions Content.Client/Audio/AmbientSoundSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ public override void Initialize()
UpdatesOutsidePrediction = true;
UpdatesAfter.Add(typeof(AmbientSoundTreeSystem));

_cfg.OnValueChanged(CCVars.AmbientCooldown, SetCooldown, true);
_cfg.OnValueChanged(CCVars.MaxAmbientSources, SetAmbientCount, true);
_cfg.OnValueChanged(CCVars.AmbientRange, SetAmbientRange, true);
_cfg.OnValueChanged(CCVars.AmbienceVolume, SetAmbienceGain, true);
Subs.CVar(_cfg, CCVars.AmbientCooldown, SetCooldown, true);
Subs.CVar(_cfg, CCVars.MaxAmbientSources, SetAmbientCount, true);
Subs.CVar(_cfg, CCVars.AmbientRange, SetAmbientRange, true);
Subs.CVar(_cfg, CCVars.AmbienceVolume, SetAmbienceGain, true);
SubscribeLocalEvent<AmbientSoundComponent, ComponentShutdown>(OnShutdown);
}

Expand Down Expand Up @@ -138,11 +138,6 @@ public override void Shutdown()
{
base.Shutdown();
ClearSounds();

_cfg.UnsubValueChanged(CCVars.AmbientCooldown, SetCooldown);
_cfg.UnsubValueChanged(CCVars.MaxAmbientSources, SetAmbientCount);
_cfg.UnsubValueChanged(CCVars.AmbientRange, SetAmbientRange);
_cfg.UnsubValueChanged(CCVars.AmbienceVolume, SetAmbienceGain);
}

private int PlayingCount(string countSound)
Expand Down
7 changes: 2 additions & 5 deletions Content.Client/Audio/BackgroundAudioSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public override void Initialize()
{
base.Initialize();

_configManager.OnValueChanged(CCVars.LobbyMusicEnabled, LobbyMusicCVarChanged);
_configManager.OnValueChanged(CCVars.LobbyMusicVolume, LobbyMusicVolumeCVarChanged);
Subs.CVar(_configManager, CCVars.LobbyMusicEnabled, LobbyMusicCVarChanged);
Subs.CVar(_configManager, CCVars.LobbyMusicVolume, LobbyMusicVolumeCVarChanged);

_stateManager.OnStateChanged += StateManagerOnStateChanged;

Expand All @@ -50,9 +50,6 @@ public override void Shutdown()
{
base.Shutdown();

_configManager.UnsubValueChanged(CCVars.LobbyMusicEnabled, LobbyMusicCVarChanged);
_configManager.UnsubValueChanged(CCVars.LobbyMusicVolume, LobbyMusicVolumeCVarChanged);

_stateManager.OnStateChanged -= StateManagerOnStateChanged;

_client.PlayerLeaveServer -= OnLeave;
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Audio/ClientGlobalSoundSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public override void Initialize()
base.Initialize();
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundRestart);
SubscribeNetworkEvent<AdminSoundEvent>(PlayAdminSound);
_cfg.OnValueChanged(CCVars.AdminSoundsEnabled, ToggleAdminSound, true);
Subs.CVar(_cfg, CCVars.AdminSoundsEnabled, ToggleAdminSound, true);

SubscribeNetworkEvent<StationEventMusicEvent>(PlayStationEventMusic);
SubscribeNetworkEvent<StopStationEventMusic>(StopStationEventMusic);
_cfg.OnValueChanged(CCVars.EventMusicEnabled, ToggleStationEventMusic, true);
Subs.CVar(_cfg, CCVars.EventMusicEnabled, ToggleStationEventMusic, true);

SubscribeNetworkEvent<GameGlobalSoundEvent>(PlayGameSound);
}
Expand Down
Loading
Loading