Predict and cleanup RingerComponent (#35907)

* clean up most stuff

* move to shared

* works

* shuffle shit around

* oops! access

* fixes

* todo: everything

* SUFFERING

* curse you
This commit is contained in:
Milon
2025-04-19 15:55:05 +02:00
committed by GitHub
parent e214eb7a28
commit 6138fcdce9
18 changed files with 645 additions and 405 deletions

View File

@@ -10,15 +10,16 @@ using Content.Server.Traitor.Uplink;
using Content.Shared.Access.Components;
using Content.Shared.CartridgeLoader;
using Content.Shared.Chat;
using Content.Shared.DeviceNetwork.Components;
using Content.Shared.Light;
using Content.Shared.Light.EntitySystems;
using Content.Shared.PDA;
using Content.Shared.PDA.Ringer;
using Robust.Server.Containers;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.Player;
using Robust.Shared.Utility;
using Content.Shared.DeviceNetwork.Components;
namespace Content.Server.PDA
{
@@ -166,7 +167,7 @@ namespace Content.Server.PDA
/// <summary>
/// Send new UI state to clients, call if you modify something like uplink.
/// </summary>
public void UpdatePdaUi(EntityUid uid, PdaComponent? pda = null)
public override void UpdatePdaUi(EntityUid uid, PdaComponent? pda = null)
{
if (!Resolve(uid, ref pda, false))
return;
@@ -243,7 +244,7 @@ namespace Content.Server.PDA
return;
if (HasComp<RingerComponent>(uid))
_ringer.ToggleRingerUI(uid, msg.Actor);
_ringer.TryToggleRingerUi(uid, msg.Actor);
}
private void OnUiMessage(EntityUid uid, PdaComponent pda, PdaShowMusicMessage msg)
@@ -272,7 +273,7 @@ namespace Content.Server.PDA
if (TryComp<RingerUplinkComponent>(uid, out var uplink))
{
_ringer.LockUplink(uid, uplink);
_ringer.LockUplink((uid, uplink));
UpdatePdaUi(uid, pda);
}
}