Xenoartifact: legendary microwave trigger (#41053)

* Xenoartifact: legendary microwave trigger

* PJB & Slarti's suggestions

* As you command

* Fix issues
This commit is contained in:
TheGrimbeeper 2026-08-02 09:01:33 +10:00 • committed by GitHub
parent 518e5a9644
commit a568fb47b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 44 additions and 2 deletions

View file

@ -4,6 +4,7 @@ using Content.Shared.Damage;
using Content.Shared.Damage.Systems;
using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Kitchen;
using Content.Shared.Movement.Pulling.Events;
using Content.Shared.Throwing;
using Content.Shared.Weapons.Melee.Events;
@ -24,6 +25,7 @@ public abstract partial class SharedXenoArtifactSystem
XATRelayLocalEvent<InteractHandEvent>();
XATRelayLocalEvent<ReactionEntityEvent>();
XATRelayLocalEvent<LandEvent>();
XATRelayLocalEvent<BeingMicrowavedEvent>();
// special case this one because we need to order the messages
SubscribeLocalEvent<XenoArtifactComponent, ExaminedEvent>(OnExamined);

View file

@ -0,0 +1,7 @@
namespace Content.Shared.Xenoarchaeology.Artifact.XAT.Components;
/// <summary>
/// This is used for an artifact that is activated by being microwaved.
/// </summary>
[RegisterComponent, Access(typeof(XATMicrowaveSystem))]
public sealed partial class XATMicrowaveComponent : Component;

View file

@ -0,0 +1,24 @@
using Content.Shared.Kitchen;
using Content.Shared.Xenoarchaeology.Artifact.Components;
using Content.Shared.Xenoarchaeology.Artifact.XAT.Components;
namespace Content.Shared.Xenoarchaeology.Artifact.XAT;
/// <summary>
/// System for checking if microwaved xenoartifact should be triggered.
/// </summary>
public sealed class XATMicrowaveSystem : BaseXATSystem<XATMicrowaveComponent>
{
/// <inheritdoc/>
public override void Initialize()
{
base.Initialize();
XATSubscribeDirectEvent<BeingMicrowavedEvent>(OnMicrowaved);
}
private void OnMicrowaved(Entity<XenoArtifactComponent> artifact, Entity<XATMicrowaveComponent, XenoArtifactNodeComponent> node, ref BeingMicrowavedEvent args)
{
Trigger(artifact, node);
}
}

View file

@ -53,7 +53,8 @@ xenoarch-trigger-tip-tritium = Tritium
xenoarch-trigger-tip-ammonia = Ammonia
xenoarch-trigger-tip-n2o = Nitrous oxide
xenoarch-trigger-tip-frezon = Frezon
xenoarch-trigger-tip-radiation = Radiation
xenoarch-trigger-tip-radiation = Heavy-ion radiation
xenoarch-trigger-tip-microwave = Microwave radiation
xenoarch-trigger-tip-brute-damage = Physical damage
xenoarch-trigger-tip-interaction = Physical interaction
xenoarch-trigger-tip-wrenching = Tightening

View file

@ -149,7 +149,15 @@
- type: XATDamageThresholdReached
typesNeeded:
Radiation: 20
# TODO: legendary microwave trigger
- type: xenoArchTrigger
id: TriggerMicrowave
tip: xenoarch-trigger-tip-microwave
whitelist:
components:
- Item
components:
- type: XATMicrowave
- type: xenoArchTrigger
id: TriggerPressureHigh