Fix tranquiliser shells not working (#23886)
* Fix tranquiliser darts not working
Fixes a bug introduced by 9f47079d02 which
was made to stop the fly-by fixture from triggering the system. This was
done by checking whether the fixture was hard. Apparently the
projectile's fixture is never hard as well. The change just makes it so
that check only succeeds when the fixture is a fly-by fixture.
* Remove something that I think is redundant
* Remove random using directive that somehow appeared.
* Address Review
* Adress Review 2
* Put the appropriate fixture ids
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Projectiles;
|
||||
|
||||
namespace Content.Server.Chemistry.Components;
|
||||
|
||||
@@ -24,4 +25,7 @@ public sealed partial class SolutionInjectOnCollideComponent : Component
|
||||
/// </summary>
|
||||
[DataField("blockSlots"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public SlotFlags BlockSlots = SlotFlags.MASK;
|
||||
|
||||
[DataField]
|
||||
public string FixtureId = SharedProjectileSystem.ProjectileFixture;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public sealed class SolutionInjectOnCollideSystem : EntitySystem
|
||||
var target = args.OtherEntity;
|
||||
|
||||
if (!args.OtherBody.Hard ||
|
||||
!args.OurBody.Hard ||
|
||||
args.OurFixtureId != ent.Comp.FixtureId ||
|
||||
!EntityManager.TryGetComponent<BloodstreamComponent>(target, out var bloodstream) ||
|
||||
!_solutionContainersSystem.TryGetInjectableSolution(ent.Owner, out var solution, out _))
|
||||
{
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
- type: SolutionInjectOnCollide
|
||||
transferAmount: 2
|
||||
blockSlots: OUTERCLOTHING
|
||||
fixtureId: "throw-fixture"
|
||||
- type: SolutionTransfer
|
||||
maxTransferAmount: 2
|
||||
- type: Damageable
|
||||
@@ -125,6 +126,7 @@
|
||||
- type: SolutionInjectOnCollide
|
||||
transferAmount: 7
|
||||
blockSlots: NONE
|
||||
fixtureId: "throw-fixture"
|
||||
- type: SolutionTransfer
|
||||
maxTransferAmount: 7
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
solution: melee
|
||||
- type: SolutionInjectOnCollide
|
||||
transferAmount: 2
|
||||
fixtureId: "throw-fixture"
|
||||
blockSlots: NONE
|
||||
- type: SolutionTransfer
|
||||
maxTransferAmount: 2
|
||||
|
||||
Reference in New Issue
Block a user