Replace obsolete EntityWhitelist IsValid usages (#28465)
* Replace obsolete whitelist is valid with whitelist system * Consistency * Fix logic * Bork * I figured out how to get whitelists on the client lol * test fail * woops * HELP ME FUNCTIONS * Fix errors * simplify --------- Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
@@ -11,6 +12,7 @@ public sealed class DamageContactsSystem : EntitySystem
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly DamageableSystem _damageable = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -63,7 +65,7 @@ public sealed class DamageContactsSystem : EntitySystem
|
||||
if (HasComp<DamagedByContactComponent>(otherUid))
|
||||
return;
|
||||
|
||||
if (component.IgnoreWhitelist?.IsValid(otherUid) ?? false)
|
||||
if (_whitelistSystem.IsWhitelistFail(component.IgnoreWhitelist, otherUid))
|
||||
return;
|
||||
|
||||
var damagedByContact = EnsureComp<DamagedByContactComponent>(otherUid);
|
||||
|
||||
Reference in New Issue
Block a user