More portal fixes (#13359)
fixes https://github.com/space-wizards/space-station-14/issues/13338 fixes https://github.com/space-wizards/space-station-14/issues/13337
This commit is contained in:
@@ -5,5 +5,11 @@ namespace Content.Server.Explosion.Components
|
||||
{
|
||||
[DataField("fixtureID", required: true)]
|
||||
public string FixtureID = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Doesn't trigger if the other colliding fixture is nonhard.
|
||||
/// </summary>
|
||||
[DataField("ignoreOtherNonHard")]
|
||||
public bool IgnoreOtherNonHard = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
|
||||
private void OnTriggerCollide(EntityUid uid, TriggerOnCollideComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if(args.OurFixture.ID == component.FixtureID)
|
||||
if(args.OurFixture.ID == component.FixtureID && (!component.IgnoreOtherNonHard || args.OtherFixture.Hard))
|
||||
Trigger(component.Owner);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public sealed class LinkedEntitySystem : EntitySystem
|
||||
// Remove any links to this entity when deleted.
|
||||
foreach (var ent in component.LinkedEntities.ToArray())
|
||||
{
|
||||
if (LifeStage(ent) < EntityLifeStage.Terminating && TryComp<LinkedEntityComponent>(ent, out var link))
|
||||
if (!Deleted(ent) && LifeStage(ent) < EntityLifeStage.Terminating && TryComp<LinkedEntityComponent>(ent, out var link))
|
||||
{
|
||||
TryUnlink(uid, ent, component, link);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user