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