Minor artifact fixes (#13360)
* rename phasing artifact + fix it * fix wandering cant be scanned
This commit is contained in:
@@ -123,7 +123,7 @@ namespace Content.Server.Construction
|
|||||||
{
|
{
|
||||||
if (!bodyQuery.TryGetComponent(ent, out var body) ||
|
if (!bodyQuery.TryGetComponent(ent, out var body) ||
|
||||||
!body.CanCollide ||
|
!body.CanCollide ||
|
||||||
(!body.Hard && body.BodyType != BodyType.Static))
|
!body.Hard)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,6 @@
|
|||||||
/// and such.
|
/// and such.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public sealed class ClearFixturesArtifactComponent : Component
|
public sealed class PhasingArtifactComponent : Component
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -2,35 +2,35 @@
|
|||||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
|
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles allowing activated artifacts to phase through walls.
|
/// Handles allowing activated artifacts to phase through walls.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class ClearFixturesArtifactSystem : EntitySystem
|
public sealed class PhasingArtifactSystem : EntitySystem
|
||||||
{
|
{
|
||||||
|
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
SubscribeLocalEvent<ClearFixturesArtifactComponent, ArtifactActivatedEvent>(OnActivate);
|
SubscribeLocalEvent<PhasingArtifactComponent, ArtifactActivatedEvent>(OnActivate);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnActivate(EntityUid uid, ClearFixturesArtifactComponent component, ArtifactActivatedEvent args)
|
private void OnActivate(EntityUid uid, PhasingArtifactComponent component, ArtifactActivatedEvent args)
|
||||||
{
|
{
|
||||||
if (!TryComp<FixturesComponent>(uid, out var fixtures))
|
if (!TryComp<FixturesComponent>(uid, out var fixtures) || !TryComp<PhysicsComponent>(uid, out var phys))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (var (_, fixture) in fixtures.Fixtures)
|
foreach (var (_, fixture) in fixtures.Fixtures)
|
||||||
{
|
{
|
||||||
if (!fixture.Hard)
|
_physics.SetHard(fixture, false, fixtures);
|
||||||
continue;
|
|
||||||
|
|
||||||
fixture.CollisionLayer = (int) CollisionGroup.None;
|
|
||||||
fixture.CollisionMask = (int) CollisionGroup.None;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ artifact-effect-hint-storage = Internal chamber
|
|||||||
artifact-effect-hint-drill = Serrated rotator
|
artifact-effect-hint-drill = Serrated rotator
|
||||||
artifact-effect-hint-soap = Lubricated surface
|
artifact-effect-hint-soap = Lubricated surface
|
||||||
artifact-effect-hint-communication = Long-distance communication
|
artifact-effect-hint-communication = Long-distance communication
|
||||||
artifact-effect-hint-fixtures = Structural phasing
|
artifact-effect-hint-phasing = Structural phasing
|
||||||
artifact-effect-hint-sentience = Neurological activity
|
artifact-effect-hint-sentience = Neurological activity
|
||||||
|
|
||||||
# the triggers should be more obvious than the effects
|
# the triggers should be more obvious than the effects
|
||||||
|
|||||||
@@ -48,16 +48,19 @@
|
|||||||
capacity: 50
|
capacity: 50
|
||||||
|
|
||||||
- type: artifactEffect
|
- type: artifactEffect
|
||||||
id: EffectClearFixtures
|
id: EffectPhasing
|
||||||
targetDepth: 2
|
targetDepth: 2
|
||||||
effectHint: artifact-effect-hint-fixtures
|
effectHint: artifact-effect-hint-phasing
|
||||||
permanentComponents:
|
permanentComponents:
|
||||||
- type: ClearFixturesArtifact
|
- type: PhasingArtifact
|
||||||
|
|
||||||
- type: artifactEffect
|
- type: artifactEffect
|
||||||
id: EffectWandering
|
id: EffectWandering
|
||||||
targetDepth: 2
|
targetDepth: 2
|
||||||
effectHint: artifact-effect-hint-displacement
|
effectHint: artifact-effect-hint-displacement
|
||||||
|
blacklist:
|
||||||
|
components:
|
||||||
|
- Item # item artifacts can't be anchored, so wanderers can't really be scanned properly
|
||||||
permanentComponents:
|
permanentComponents:
|
||||||
- type: RandomWalk
|
- type: RandomWalk
|
||||||
minSpeed: 12
|
minSpeed: 12
|
||||||
|
|||||||
Reference in New Issue
Block a user