Files
OldThink/Content.Server/_White/Cult/Pylon/CheckForStructure.cs
Aviu00 d4525a91e6 Fixes & more (#548)
* - fix: Narsie not spawning, items not dropping on paralyze, cult tweaks.

* - fix: Diagonal grilles layer.

* - add: Cockroaches don't drop organs.

* - add: Magic hands now work on interact & disable context menu interaction.

* - fix: Shackles speech after doafter.

* - tweak: Reduce flashbang knockdown, check for CanLieDown.

* - tweak: Hspear limit.

* - tweak: Remove knockdown tile friction.

* - tweak: Engi belt in sus box.

* - fix: Constructs can hear cult chat.

* - fix: Desword audio.

* - fix: Context menu.

* - fix: Actually drop items on paralyze.

* - tweak: Revert range reduction.

* - add: Update thermal visibility.

* - add: NPCs can miss.

* - tweak: Update desc.

* - fix: Actually fix desword audio.

* - tweak: Secret weights & game presets.

* - fix: Cult stun.
2024-08-03 18:23:46 +03:00

30 lines
1007 B
C#

using Content.Server.Popups;
using Content.Shared._White.Cult.Pylon;
using Content.Shared.Construction;
using Content.Shared.Popups;
using JetBrains.Annotations;
namespace Content.Server._White.Cult.Pylon;
[UsedImplicitly]
[DataDefinition]
public sealed partial class CheckForStructure : IGraphAction
{
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{
var xform = entityManager.GetComponent<TransformComponent>(uid);
var coords = xform.Coordinates;
if (!SharedPylonComponent.CheckForStructure(coords, entityManager, 9f, uid))
return;
entityManager.QueueDeleteEntity(uid);
if (userUid != null)
{
entityManager.System<PopupSystem>()
.PopupEntity(Loc.GetString("cult-structure-craft-another-structure-nearby"),
userUid.Value, userUid.Value, PopupType.MediumCaution);
}
entityManager.SpawnEntity("CultRunicMetal4", coords);
}
}