mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 21:48:58 +03:00
<!-- This is a semi-strict format, you can add/remove sections as needed but the order/format should be kept the same Remove these comments before submitting --> # Description It's simple as it sounds, really. Adds part upgrading to these machines. The experimental anomaly vessel becomes a stronger demon core every time you upgrade it because I wanted to keep the "More Good but Dangerous" motif and to keep it somewhat balanced... --- <!-- This is default collapsed, readers click to expand it and see all your media The PR media section can get very large at times, so this is a good way to keep it clean The title is written using HTML tags The title must be within the <summary> tags or you won't see it --> <details><summary><h1>Media</h1></summary> <p> i don't feel like opening up OBS today... </p> </details> --- # Changelog <!-- You can add an author after the `🆑` to change the name that appears in the changelog (ex: `🆑 Death`) Leaving it blank will default to your GitHub display name This includes all available types for the changelog --> 🆑 - add: Added part upgrading to the artifact analysis machine. - tweak: Tweaked default artifact analysis scan time to 40 seconds. - fix: Fixed anomaly vessels not actually upgrading. --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: VMSolidus <evilexecutive@gmail.com> (cherry picked from commit cf6707bd67b9c2ab27bc57d91205b204ac3636de)
90 lines
3.0 KiB
C#
90 lines
3.0 KiB
C#
using Content.Shared.Anomaly;
|
|
using Content.Shared.Construction.Prototypes;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
|
|
namespace Content.Server.Anomaly.Components;
|
|
|
|
/// <summary>
|
|
/// Anomaly Vessels can have an anomaly "stored" in them
|
|
/// by interacting on them with an anomaly scanner. Then,
|
|
/// they generate points for the selected server based on
|
|
/// the anomaly's stability and severity.
|
|
/// </summary>
|
|
[RegisterComponent, Access(typeof(SharedAnomalySystem)), AutoGenerateComponentPause]
|
|
public sealed partial class AnomalyVesselComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The anomaly that the vessel is storing.
|
|
/// Can be null.
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public EntityUid? Anomaly;
|
|
|
|
/// <summary>
|
|
/// The base multiplier without any frills
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public float BasePointMultiplier = 1;
|
|
|
|
/// <summary>
|
|
/// The base radiation for only the experimental vessel
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public float BaseRadiation = .75f;
|
|
|
|
/// <summary>
|
|
/// A multiplier applied to the amount of points generated.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public float PointMultiplier = 1;
|
|
|
|
/// <summary>
|
|
/// A multiplier applied to the amount of points generated based on the machine parts inserted.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public float UpgradePointMultiplier = .5f;
|
|
|
|
/// <summary>
|
|
/// A multipler applied to the radiation
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// no free ultra point machine 100% legit
|
|
/// </remarks>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public float UpgradeRadiationMultiplier = .35f;
|
|
|
|
/// <summary>
|
|
/// Which machine part affects the point multiplier
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
|
public string MachinePartPointMultiplier = "Capacitor";
|
|
|
|
/// <summary>
|
|
/// The maximum time between each beep
|
|
/// </summary>
|
|
[DataField("maxBeepInterval")]
|
|
public TimeSpan MaxBeepInterval = TimeSpan.FromSeconds(2f);
|
|
|
|
/// <summary>
|
|
/// The minimum time between each beep
|
|
/// </summary>
|
|
[DataField("minBeepInterval")]
|
|
public TimeSpan MinBeepInterval = TimeSpan.FromSeconds(0.75f);
|
|
|
|
/// <summary>
|
|
/// When the next beep sound will play
|
|
/// </summary>
|
|
[DataField("nextBeep", customTypeSerializer:typeof(TimeOffsetSerializer))]
|
|
[AutoPausedField]
|
|
public TimeSpan NextBeep = TimeSpan.Zero;
|
|
|
|
/// <summary>
|
|
/// The sound that is played repeatedly when the anomaly is destabilizing/decaying
|
|
/// </summary>
|
|
[DataField("beepSound")]
|
|
public SoundSpecifier BeepSound = new SoundPathSpecifier("/Audio/Machines/vessel_warning.ogg");
|
|
}
|