mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Xenoartifact: legendary microwave trigger (#41053)
* Xenoartifact: legendary microwave trigger * PJB & Slarti's suggestions * As you command * Fix issues
This commit is contained in:
parent
518e5a9644
commit
a568fb47b1
5 changed files with 44 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue