diff --git a/Content.Server/Construction/AnchorableSystem.cs b/Content.Server/Construction/AnchorableSystem.cs index 138e73261a..0a2ab04fcb 100644 --- a/Content.Server/Construction/AnchorableSystem.cs +++ b/Content.Server/Construction/AnchorableSystem.cs @@ -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; } diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/ClearFixturesArtifactComponent.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/PhasingArtifactComponent.cs similarity index 80% rename from Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/ClearFixturesArtifactComponent.cs rename to Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/PhasingArtifactComponent.cs index 68ffbfded1..7369060ed4 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/ClearFixturesArtifactComponent.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/PhasingArtifactComponent.cs @@ -5,6 +5,6 @@ /// and such. /// [RegisterComponent] -public sealed class ClearFixturesArtifactComponent : Component +public sealed class PhasingArtifactComponent : Component { } diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/ClearFixturesArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/PhasingArtifactSystem.cs similarity index 51% rename from Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/ClearFixturesArtifactSystem.cs rename to Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/PhasingArtifactSystem.cs index 3a90474eeb..4615b3fb85 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/ClearFixturesArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/PhasingArtifactSystem.cs @@ -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; /// /// Handles allowing activated artifacts to phase through walls. /// -public sealed class ClearFixturesArtifactSystem : EntitySystem +public sealed class PhasingArtifactSystem : EntitySystem { + [Dependency] private readonly SharedPhysicsSystem _physics = default!; + /// public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnActivate); + SubscribeLocalEvent(OnActivate); } - private void OnActivate(EntityUid uid, ClearFixturesArtifactComponent component, ArtifactActivatedEvent args) + private void OnActivate(EntityUid uid, PhasingArtifactComponent component, ArtifactActivatedEvent args) { - if (!TryComp(uid, out var fixtures)) + if (!TryComp(uid, out var fixtures) || !TryComp(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); } } } diff --git a/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl b/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl index 3640c7efdd..cdf2e065fa 100644 --- a/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl +++ b/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl @@ -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 diff --git a/Resources/Prototypes/XenoArch/Effects/utility_effects.yml b/Resources/Prototypes/XenoArch/Effects/utility_effects.yml index 9fbc6a41d4..af2d84a7b9 100644 --- a/Resources/Prototypes/XenoArch/Effects/utility_effects.yml +++ b/Resources/Prototypes/XenoArch/Effects/utility_effects.yml @@ -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