ringer bugfixes (#36936)

AAAAAAAAAA
This commit is contained in:
Milon
2025-04-29 19:08:23 +02:00
committed by GitHub
parent 0a394d4af5
commit b9b854e179
4 changed files with 41 additions and 44 deletions

View File

@@ -55,7 +55,6 @@ public sealed class RingerSystem : SharedRingerSystem
/// </summary>
private void OnGenerateUplinkCode(Entity<RingerUplinkComponent> ent, ref GenerateUplinkCodeEvent ev)
{
// Generate a new uplink code
var code = GenerateRingtone();
// Set the code on the component
@@ -74,6 +73,10 @@ public sealed class RingerSystem : SharedRingerSystem
if (!HasComp<StoreComponent>(uid))
return false;
// Wasn't generated yet
if (uplink.Code is null)
return false;
// On the server, we always check if the code matches
if (!uplink.Code.SequenceEqual(ringtone))
return false;