Remove FixtureId (#19280)
This commit is contained in:
@@ -33,7 +33,7 @@ public sealed class FlyBySoundSystem : SharedFlyBySoundSystem
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.OurFixture.ID != FlyByFixture ||
|
||||
if (args.OurFixtureId != FlyByFixture ||
|
||||
!_random.Prob(component.Prob))
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -73,7 +73,7 @@ public sealed partial class AnomalySystem : SharedAnomalySystem
|
||||
if (!TryComp<AnomalousParticleComponent>(args.OtherEntity, out var particle))
|
||||
return;
|
||||
|
||||
if (args.OtherFixture.ID != particle.FixtureId)
|
||||
if (args.OtherFixtureId != particle.FixtureId)
|
||||
return;
|
||||
|
||||
// small function to randomize because it's easier to read like this
|
||||
|
||||
@@ -57,9 +57,9 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
|
||||
if (TryComp<FixturesComponent>(uid, out var fixtures))
|
||||
{
|
||||
foreach (var fixture in fixtures.Fixtures.Values)
|
||||
foreach (var (id, fixture) in fixtures.Fixtures)
|
||||
{
|
||||
_physics.AddCollisionMask(uid, fixture, (int) CollisionGroup.TableLayer, manager: fixtures);
|
||||
_physics.AddCollisionMask(uid, id, fixture, (int) CollisionGroup.TableLayer, manager: fixtures);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,15 +70,16 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
}
|
||||
}
|
||||
|
||||
private void AddMobMovedByPressure(MovedByPressureComponent component, PhysicsComponent body)
|
||||
private void AddMobMovedByPressure(EntityUid uid, MovedByPressureComponent component, PhysicsComponent body)
|
||||
{
|
||||
if (!TryComp<FixturesComponent>(component.Owner, out var fixtures)) return;
|
||||
if (!TryComp<FixturesComponent>(uid, out var fixtures))
|
||||
return;
|
||||
|
||||
_physics.SetBodyStatus(body, BodyStatus.InAir);
|
||||
|
||||
foreach (var fixture in fixtures.Fixtures.Values)
|
||||
foreach (var (id, fixture) in fixtures.Fixtures)
|
||||
{
|
||||
_physics.RemoveCollisionMask(body.Owner, fixture, (int) CollisionGroup.TableLayer, manager: fixtures);
|
||||
_physics.RemoveCollisionMask(uid, id, fixture, (int) CollisionGroup.TableLayer, manager: fixtures);
|
||||
}
|
||||
|
||||
// TODO: Make them dynamic type? Ehh but they still want movement so uhh make it non-predicted like weightless?
|
||||
@@ -214,7 +215,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
{
|
||||
if (HasComp<MobStateComponent>(uid))
|
||||
{
|
||||
AddMobMovedByPressure(component, physics);
|
||||
AddMobMovedByPressure(uid, component, physics);
|
||||
}
|
||||
|
||||
if (maxForce > MovedByPressureComponent.ThrowForce)
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
|
||||
// Normal hard collisions, though this isn't generally possible since most flammable things are mobs
|
||||
// which don't collide with one another, shouldn't work here.
|
||||
if (args.OtherFixture.ID != FlammableFixtureID && args.OurFixture.ID != FlammableFixtureID)
|
||||
if (args.OtherFixtureId != FlammableFixtureID && args.OurFixtureId != FlammableFixtureID)
|
||||
return;
|
||||
|
||||
if (!EntityManager.TryGetComponent(otherUid, out FlammableComponent? otherFlammable))
|
||||
|
||||
@@ -49,7 +49,7 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
private const string ClimbingFixtureName = "climb";
|
||||
private const int ClimbingCollisionGroup = (int) (CollisionGroup.TableLayer | CollisionGroup.LowImpassable);
|
||||
|
||||
private readonly Dictionary<EntityUid, List<Fixture>> _fixtureRemoveQueue = new();
|
||||
private readonly Dictionary<EntityUid, Dictionary<string, Fixture>> _fixtureRemoveQueue = new();
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -212,8 +212,8 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
|| (fixture.CollisionMask & ClimbingCollisionGroup) == 0)
|
||||
continue;
|
||||
|
||||
climbingComp.DisabledFixtureMasks.Add(fixture.ID, fixture.CollisionMask & ClimbingCollisionGroup);
|
||||
_physics.SetCollisionMask(uid, fixture, fixture.CollisionMask & ~ClimbingCollisionGroup, fixturesComp);
|
||||
climbingComp.DisabledFixtureMasks.Add(name, fixture.CollisionMask & ClimbingCollisionGroup);
|
||||
_physics.SetCollisionMask(uid, name, fixture, fixture.CollisionMask & ~ClimbingCollisionGroup, fixturesComp);
|
||||
}
|
||||
|
||||
if (!_fixtureSystem.TryCreateFixture(
|
||||
@@ -233,7 +233,7 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
|
||||
private void OnClimbEndCollide(EntityUid uid, ClimbingComponent component, ref EndCollideEvent args)
|
||||
{
|
||||
if (args.OurFixture.ID != ClimbingFixtureName
|
||||
if (args.OurFixtureId != ClimbingFixtureName
|
||||
|| !component.IsClimbing
|
||||
|| component.OwnerIsTransitioning)
|
||||
return;
|
||||
@@ -262,18 +262,18 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
continue;
|
||||
}
|
||||
|
||||
_physics.SetCollisionMask(uid, fixture, fixture.CollisionMask | fixtureMask, fixtures);
|
||||
_physics.SetCollisionMask(uid, name, fixture, fixture.CollisionMask | fixtureMask, fixtures);
|
||||
}
|
||||
climbing.DisabledFixtureMasks.Clear();
|
||||
|
||||
if (!_fixtureRemoveQueue.TryGetValue(uid, out var removeQueue))
|
||||
{
|
||||
removeQueue = new List<Fixture>();
|
||||
removeQueue = new Dictionary<string, Fixture>();
|
||||
_fixtureRemoveQueue.Add(uid, removeQueue);
|
||||
}
|
||||
|
||||
if (fixtures.Fixtures.TryGetValue(ClimbingFixtureName, out var climbingFixture))
|
||||
removeQueue.Add(climbingFixture);
|
||||
removeQueue.Add(ClimbingFixtureName, climbingFixture);
|
||||
|
||||
climbing.IsClimbing = false;
|
||||
climbing.OwnerIsTransitioning = false;
|
||||
@@ -440,7 +440,7 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
|
||||
foreach (var fixture in fixtures)
|
||||
{
|
||||
_fixtureSystem.DestroyFixture(uid, fixture, body: physicsComp, manager: fixturesComp);
|
||||
_fixtureSystem.DestroyFixture(uid, fixture.Key, fixture.Value, body: physicsComp, manager: fixturesComp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ public sealed partial class TriggerSystem
|
||||
component.Shape,
|
||||
TriggerOnProximityComponent.FixtureID,
|
||||
hard: false,
|
||||
body: body,
|
||||
collisionLayer: component.Layer);
|
||||
}
|
||||
|
||||
@@ -72,7 +73,7 @@ public sealed partial class TriggerSystem
|
||||
|
||||
private void OnProximityStartCollide(EntityUid uid, TriggerOnProximityComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (args.OurFixture.ID != TriggerOnProximityComponent.FixtureID)
|
||||
if (args.OurFixtureId != TriggerOnProximityComponent.FixtureID)
|
||||
return;
|
||||
|
||||
component.Colliding[args.OtherEntity] = args.OtherBody;
|
||||
@@ -80,7 +81,7 @@ public sealed partial class TriggerSystem
|
||||
|
||||
private static void OnProximityEndCollide(EntityUid uid, TriggerOnProximityComponent component, ref EndCollideEvent args)
|
||||
{
|
||||
if (args.OurFixture.ID != TriggerOnProximityComponent.FixtureID)
|
||||
if (args.OurFixtureId != TriggerOnProximityComponent.FixtureID)
|
||||
return;
|
||||
|
||||
component.Colliding.Remove(args.OtherEntity);
|
||||
|
||||
@@ -184,13 +184,13 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
|
||||
private void OnTriggerCollide(EntityUid uid, TriggerOnCollideComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (args.OurFixture.ID == component.FixtureID && (!component.IgnoreOtherNonHard || args.OtherFixture.Hard))
|
||||
Trigger(component.Owner);
|
||||
if (args.OurFixtureId == component.FixtureID && (!component.IgnoreOtherNonHard || args.OtherFixture.Hard))
|
||||
Trigger(uid);
|
||||
}
|
||||
|
||||
private void OnActivate(EntityUid uid, TriggerOnActivateComponent component, ActivateInWorldEvent args)
|
||||
{
|
||||
Trigger(component.Owner, args.User);
|
||||
Trigger(uid, args.User);
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public sealed partial class GatherableSystem
|
||||
private void OnProjectileCollide(EntityUid uid, GatheringProjectileComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (!args.OtherFixture.Hard ||
|
||||
args.OurFixture.ID != SharedProjectileSystem.ProjectileFixture ||
|
||||
args.OurFixtureId != SharedProjectileSystem.ProjectileFixture ||
|
||||
component.Amount <= 0 ||
|
||||
!TryComp<GatherableComponent>(args.OtherEntity, out var gatherable))
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ public partial class PolymorphSystem
|
||||
|
||||
private void OnPolymorphCollide(EntityUid uid, PolymorphOnCollideComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (args.OurFixture.ID != SharedProjectileSystem.ProjectileFixture)
|
||||
if (args.OurFixtureId != SharedProjectileSystem.ProjectileFixture)
|
||||
return;
|
||||
|
||||
var other = args.OtherEntity;
|
||||
|
||||
@@ -30,7 +30,7 @@ public sealed class ProjectileSystem : SharedProjectileSystem
|
||||
private void OnStartCollide(EntityUid uid, ProjectileComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
// This is so entities that shouldn't get a collision are ignored.
|
||||
if (args.OurFixture.ID != ProjectileFixture || !args.OtherFixture.Hard || component.DamagedEntity)
|
||||
if (args.OurFixtureId != ProjectileFixture || !args.OtherFixture.Hard || component.DamagedEntity)
|
||||
return;
|
||||
|
||||
var target = args.OtherEntity;
|
||||
|
||||
@@ -95,8 +95,8 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem
|
||||
{
|
||||
foreach (var fixture in args.NewFixtures)
|
||||
{
|
||||
_physics.SetDensity(uid, fixture, TileMassMultiplier, false, manager);
|
||||
_fixtures.SetRestitution(uid, fixture, 0.1f, false, manager);
|
||||
_physics.SetDensity(uid, fixture.Key, fixture.Value, TileMassMultiplier, false, manager);
|
||||
_fixtures.SetRestitution(uid, fixture.Key, fixture.Value, 0.1f, false, manager);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -445,7 +445,7 @@ public sealed class ThrusterSystem : EntitySystem
|
||||
|
||||
private void OnStartCollide(EntityUid uid, ThrusterComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (args.OurFixture.ID != BurnFixture)
|
||||
if (args.OurFixtureId != BurnFixture)
|
||||
return;
|
||||
|
||||
component.Colliding.Add(args.OtherEntity);
|
||||
@@ -453,7 +453,7 @@ public sealed class ThrusterSystem : EntitySystem
|
||||
|
||||
private void OnEndCollide(EntityUid uid, ThrusterComponent component, ref EndCollideEvent args)
|
||||
{
|
||||
if (args.OurFixture.ID != BurnFixture)
|
||||
if (args.OurFixtureId != BurnFixture)
|
||||
return;
|
||||
|
||||
component.Colliding.Remove(args.OtherEntity);
|
||||
|
||||
@@ -398,7 +398,7 @@ public sealed class EventHorizonSystem : SharedEventHorizonSystem
|
||||
{
|
||||
if (comp.BeingConsumedByAnotherEventHorizon)
|
||||
return;
|
||||
if (args.OurFixture.ID != comp.ConsumerFixtureId)
|
||||
if (args.OurFixtureId != comp.ConsumerFixtureId)
|
||||
return;
|
||||
|
||||
AttemptConsumeEntity(uid, args.OtherEntity, comp);
|
||||
|
||||
@@ -36,7 +36,8 @@ namespace Content.Server.Stunnable
|
||||
}
|
||||
private void HandleCollide(EntityUid uid, StunOnCollideComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (args.OurFixture.ID != component.FixtureID) return;
|
||||
if (args.OurFixtureId != component.FixtureID)
|
||||
return;
|
||||
|
||||
TryDoCollideStun(uid, component, args.OtherEntity);
|
||||
}
|
||||
|
||||
@@ -114,16 +114,16 @@ public sealed class WeldableSystem : EntitySystem
|
||||
if (!TryComp<FixturesComponent>(uid, out var fixtures))
|
||||
return;
|
||||
|
||||
foreach (var fixture in fixtures.Fixtures.Values)
|
||||
foreach (var (id, fixture) in fixtures.Fixtures)
|
||||
{
|
||||
switch (args.IsWelded)
|
||||
{
|
||||
case true when fixture.CollisionLayer == (int) component.UnWeldedLayer:
|
||||
_physics.SetCollisionLayer(uid, fixture, (int) component.WeldedLayer);
|
||||
_physics.SetCollisionLayer(uid, id, fixture, (int) component.WeldedLayer);
|
||||
break;
|
||||
|
||||
case false when fixture.CollisionLayer == (int) component.WeldedLayer:
|
||||
_physics.SetCollisionLayer(uid, fixture, (int) component.UnWeldedLayer);
|
||||
_physics.SetCollisionLayer(uid, id, fixture, (int) component.UnWeldedLayer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
|
||||
|
||||
private void OnCollide(EntityUid uid, CollideMaterialReclaimerComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (args.OurFixture.ID != component.FixtureId)
|
||||
if (args.OurFixtureId != component.FixtureId)
|
||||
return;
|
||||
if (!TryComp<MaterialReclaimerComponent>(uid, out var reclaimer))
|
||||
return;
|
||||
|
||||
@@ -38,10 +38,10 @@ public abstract class SharedCorporealSystem : EntitySystem
|
||||
|
||||
if (TryComp<FixturesComponent>(uid, out var fixtures) && fixtures.FixtureCount >= 1)
|
||||
{
|
||||
var fixture = fixtures.Fixtures.Values.First();
|
||||
var fixture = fixtures.Fixtures.First();
|
||||
|
||||
_physics.SetCollisionMask(uid, fixture, (int) (CollisionGroup.SmallMobMask | CollisionGroup.GhostImpassable), fixtures);
|
||||
_physics.SetCollisionLayer(uid, fixture, (int) CollisionGroup.SmallMobLayer, fixtures);
|
||||
_physics.SetCollisionMask(uid, fixture.Key, fixture.Value, (int) (CollisionGroup.SmallMobMask | CollisionGroup.GhostImpassable), fixtures);
|
||||
_physics.SetCollisionLayer(uid, fixture.Key, fixture.Value, (int) CollisionGroup.SmallMobLayer, fixtures);
|
||||
}
|
||||
_movement.RefreshMovementSpeedModifiers(uid);
|
||||
}
|
||||
@@ -52,10 +52,10 @@ public abstract class SharedCorporealSystem : EntitySystem
|
||||
|
||||
if (TryComp<FixturesComponent>(uid, out var fixtures) && fixtures.FixtureCount >= 1)
|
||||
{
|
||||
var fixture = fixtures.Fixtures.Values.First();
|
||||
var fixture = fixtures.Fixtures.First();
|
||||
|
||||
_physics.SetCollisionMask(uid, fixture, (int) CollisionGroup.GhostImpassable, fixtures);
|
||||
_physics.SetCollisionLayer(uid, fixture, 0, fixtures);
|
||||
_physics.SetCollisionMask(uid, fixture.Key, fixture.Value, (int) CollisionGroup.GhostImpassable, fixtures);
|
||||
_physics.SetCollisionLayer(uid, fixture.Key, fixture.Value, 0, fixtures);
|
||||
}
|
||||
component.MovementSpeedDebuff = 1; //just so we can avoid annoying code elsewhere
|
||||
_movement.RefreshMovementSpeedModifiers(uid);
|
||||
|
||||
@@ -158,25 +158,19 @@ public abstract class SharedEventHorizonSystem : EntitySystem
|
||||
return;
|
||||
|
||||
// Update both fixtures the event horizon is associated with:
|
||||
if (consumerId != null)
|
||||
{
|
||||
var consumer = _fixtures.GetFixtureOrNull(uid, consumerId, fixtures);
|
||||
if (consumer != null)
|
||||
{
|
||||
_physics.SetRadius(uid, consumer, consumer.Shape, eventHorizon.Radius, fixtures);
|
||||
_physics.SetRadius(uid, consumerId, consumer, consumer.Shape, eventHorizon.Radius, fixtures);
|
||||
_physics.SetHard(uid, consumer, false, fixtures);
|
||||
}
|
||||
}
|
||||
|
||||
if (colliderId != null)
|
||||
{
|
||||
var collider = _fixtures.GetFixtureOrNull(uid, colliderId, fixtures);
|
||||
if (collider != null)
|
||||
{
|
||||
_physics.SetRadius(uid, collider, collider.Shape, eventHorizon.Radius, fixtures);
|
||||
_physics.SetRadius(uid, colliderId, collider, collider.Shape, eventHorizon.Radius, fixtures);
|
||||
_physics.SetHard(uid, collider, true, fixtures);
|
||||
}
|
||||
}
|
||||
|
||||
EntityManager.Dirty(uid, fixtures);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Content.Shared.Standing
|
||||
continue;
|
||||
|
||||
standingState.ChangedFixtures.Add(key);
|
||||
_physics.SetCollisionMask(uid, fixture, fixture.CollisionMask & ~StandingCollisionLayer, manager: fixtureComponent);
|
||||
_physics.SetCollisionMask(uid, key, fixture, fixture.CollisionMask & ~StandingCollisionLayer, manager: fixtureComponent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Content.Shared.Standing
|
||||
}
|
||||
|
||||
standingState.Standing = true;
|
||||
Dirty(standingState);
|
||||
Dirty(uid, standingState);
|
||||
RaiseLocalEvent(uid, new StoodEvent(), false);
|
||||
|
||||
_appearance.SetData(uid, RotationVisuals.RotationState, RotationState.Vertical, appearance);
|
||||
@@ -144,7 +144,7 @@ namespace Content.Shared.Standing
|
||||
foreach (var key in standingState.ChangedFixtures)
|
||||
{
|
||||
if (fixtureComponent.Fixtures.TryGetValue(key, out var fixture))
|
||||
_physics.SetCollisionMask(uid, fixture, fixture.CollisionMask | StandingCollisionLayer, fixtureComponent);
|
||||
_physics.SetCollisionMask(uid, key, fixture, fixture.CollisionMask | StandingCollisionLayer, fixtureComponent);
|
||||
}
|
||||
}
|
||||
standingState.ChangedFixtures.Clear();
|
||||
|
||||
@@ -429,17 +429,17 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
||||
// RemovedMasks needs to be tracked separately for each fixture, using a fixture Id Dictionary. Also the
|
||||
// fixture IDs probably cant be automatically generated without causing issues, unless there is some
|
||||
// guarantee that they will get deserialized with the same auto-generated ID when saving+loading the map.
|
||||
var fixture = fixtures.Fixtures.Values.First();
|
||||
var fixture = fixtures.Fixtures.First();
|
||||
|
||||
if (component.Open)
|
||||
{
|
||||
component.RemovedMasks = fixture.CollisionLayer & component.MasksToRemove;
|
||||
_physics.SetCollisionLayer(uid, fixture, fixture.CollisionLayer & ~component.MasksToRemove,
|
||||
component.RemovedMasks = fixture.Value.CollisionLayer & component.MasksToRemove;
|
||||
_physics.SetCollisionLayer(uid, fixture.Key, fixture.Value, fixture.Value.CollisionLayer & ~component.MasksToRemove,
|
||||
manager: fixtures);
|
||||
}
|
||||
else
|
||||
{
|
||||
_physics.SetCollisionLayer(uid, fixture, fixture.CollisionLayer | component.RemovedMasks,
|
||||
_physics.SetCollisionLayer(uid, fixture.Key, fixture.Value, fixture.Value.CollisionLayer | component.RemovedMasks,
|
||||
manager: fixtures);
|
||||
component.RemovedMasks = 0;
|
||||
}
|
||||
|
||||
@@ -88,16 +88,16 @@ public abstract class SharedPortalSystem : EntitySystem
|
||||
component.EnteredPortal = state.EnteredPortal;
|
||||
}
|
||||
|
||||
private bool ShouldCollide(Fixture our, Fixture other)
|
||||
private bool ShouldCollide(string ourId, string otherId, Fixture our, Fixture other)
|
||||
{
|
||||
// most non-hard fixtures shouldn't pass through portals, but projectiles are non-hard as well
|
||||
// and they should still pass through
|
||||
return our.ID == PortalFixture && (other.Hard || other.ID == ProjectileFixture);
|
||||
return ourId == PortalFixture && (other.Hard || otherId == ProjectileFixture);
|
||||
}
|
||||
|
||||
private void OnCollide(EntityUid uid, PortalComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (!ShouldCollide(args.OurFixture, args.OtherFixture))
|
||||
if (!ShouldCollide(args.OurFixtureId, args.OtherFixtureId, args.OurFixture, args.OtherFixture))
|
||||
return;
|
||||
|
||||
var subject = args.OtherEntity;
|
||||
@@ -163,7 +163,7 @@ public abstract class SharedPortalSystem : EntitySystem
|
||||
|
||||
private void OnEndCollide(EntityUid uid, PortalComponent component, ref EndCollideEvent args)
|
||||
{
|
||||
if (!ShouldCollide(args.OurFixture, args.OtherFixture))
|
||||
if (!ShouldCollide(args.OurFixtureId, args.OtherFixtureId,args.OurFixture, args.OtherFixture))
|
||||
return;
|
||||
|
||||
var subject = args.OtherEntity;
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace Content.Shared.Throwing
|
||||
|
||||
if (fixture != null)
|
||||
{
|
||||
_fixtures.DestroyFixture(uid, fixture, manager: manager);
|
||||
_fixtures.DestroyFixture(uid, ThrowingFixture, fixture, manager: manager);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
|
||||
private void OnMarkerCollide(EntityUid uid, DamageMarkerOnCollideComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (!args.OtherFixture.Hard ||
|
||||
args.OurFixture.ID != SharedProjectileSystem.ProjectileFixture ||
|
||||
args.OurFixtureId != SharedProjectileSystem.ProjectileFixture ||
|
||||
component.Amount <= 0 ||
|
||||
component.Whitelist?.IsValid(args.OtherEntity, EntityManager) == false ||
|
||||
!TryComp<ProjectileComponent>(uid, out var projectile) ||
|
||||
|
||||
Reference in New Issue
Block a user