More artifacts triggers and tweaks (#6723)
Co-authored-by: mirrorcult <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Activate artifact when it contacted with an electricity source.
|
||||
/// It could be connected MV cables, stun baton or multi tool.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactElectricityTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// How much power should artifact receive to operate.
|
||||
/// </summary>
|
||||
[DataField("minPower")]
|
||||
public float MinPower = 400;
|
||||
}
|
||||
@@ -1,7 +1,4 @@
|
||||
using Content.Shared.Atmos;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
|
||||
|
||||
// TODO: This should probably be generalized for cold temperature too,
|
||||
// but right now there is no sane way to make a freezer.
|
||||
|
||||
/// <summary>
|
||||
/// Triggers artifact if its in hot environment or
|
||||
/// has contacted with a hot object (lit welder, lighter, etc).
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactHeatTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Minimal surrounding gas temperature to trigger artifact.
|
||||
/// Around 100 degrees celsius by default.
|
||||
/// Doesn't affect hot items temperature.
|
||||
/// </summary>
|
||||
[DataField("activationTemperature")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float ActivationTemperature = 373;
|
||||
|
||||
/// <summary>
|
||||
/// Should artifact be activated by hot items (welders, lighter, etc)?
|
||||
/// </summary>
|
||||
[DataField("activateHot")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool ActivateHotItems = true;
|
||||
}
|
||||
@@ -1,11 +1,29 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Activate artifact just by touching it.
|
||||
/// Activate artifact by touching, attacking or pulling it.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactInteractionTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Should artifact be activated just by touching with empty hand?
|
||||
/// </summary>
|
||||
[DataField("emptyHandActivation")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool EmptyHandActivation = true;
|
||||
|
||||
/// <summary>
|
||||
/// Should artifact be activated by melee attacking?
|
||||
/// </summary>
|
||||
[DataField("attackActivation")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool AttackActivation = true;
|
||||
|
||||
/// <summary>
|
||||
/// Should artifact be activated by starting pulling it?
|
||||
/// </summary>
|
||||
[DataField("pullActivation")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool PullActivation = true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Will try to activate artifact periodically.
|
||||
/// Doesn't used for random artifacts, can be spawned by admins.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactTimerTriggerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Time between artifact activation attempts.
|
||||
/// </summary>
|
||||
[DataField("rate")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public TimeSpan ActivationRate = TimeSpan.FromSeconds(5.0f);
|
||||
|
||||
/// <summary>
|
||||
/// Last time when artifact was activated.
|
||||
/// </summary>
|
||||
public TimeSpan LastActivation;
|
||||
}
|
||||
Reference in New Issue
Block a user