Predict Flashes (#37640)

Co-authored-by: ScarKy0 <scarky0@onet.eu>
This commit is contained in:
slarticodefast
2025-06-23 13:32:56 +02:00
committed by GitHub
parent 7e77ee0cd2
commit b83d00b792
23 changed files with 501 additions and 386 deletions

View File

@@ -1,7 +1,6 @@
using Content.Server.Administration.Logs;
using Content.Server.Antag;
using Content.Server.EUI;
using Content.Server.Flash;
using Content.Server.GameTicking.Rules.Components;
using Content.Server.Mind;
using Content.Server.Popups;
@@ -12,6 +11,7 @@ using Content.Server.RoundEnd;
using Content.Server.Shuttles.Systems;
using Content.Server.Station.Systems;
using Content.Shared.Database;
using Content.Shared.Flash;
using Content.Shared.GameTicking.Components;
using Content.Shared.Humanoid;
using Content.Shared.IdentityManagement;
@@ -131,6 +131,9 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
/// </summary>
private void OnPostFlash(EntityUid uid, HeadRevolutionaryComponent comp, ref AfterFlashedEvent ev)
{
if (uid != ev.User || !ev.Melee)
return;
var alwaysConvertible = HasComp<AlwaysRevolutionaryConvertibleComponent>(ev.Target);
if (!_mind.TryGetMind(ev.Target, out var mindId, out var mind) && !alwaysConvertible)