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,7 @@
using Content.Server.Administration.Logs;
using Content.Server.Body.Systems;
using Content.Server.Explosion.Components;
using Content.Server.Flash;
using Content.Shared.Flash;
using Content.Server.Electrocution;
using Content.Server.Pinpointer;
using Content.Shared.Chemistry.EntitySystems;
@@ -69,7 +69,7 @@ namespace Content.Server.Explosion.EntitySystems
{
[Dependency] private readonly ExplosionSystem _explosions = default!;
[Dependency] private readonly FixtureSystem _fixtures = default!;
[Dependency] private readonly FlashSystem _flashSystem = default!;
[Dependency] private readonly SharedFlashSystem _flashSystem = default!;
[Dependency] private readonly SharedBroadphaseSystem _broadphase = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
@@ -196,8 +196,7 @@ namespace Content.Server.Explosion.EntitySystems
private void HandleFlashTrigger(EntityUid uid, FlashOnTriggerComponent component, TriggerEvent args)
{
// TODO Make flash durations sane ffs.
_flashSystem.FlashArea(uid, args.User, component.Range, component.Duration * 1000f, probability: component.Probability);
_flashSystem.FlashArea(uid, args.User, component.Range, component.Duration, probability: component.Probability);
args.Handled = true;
}