XenoArch [Science Overhaul] (#12204)
* multi-node xeno artifacts * refactor existing artifact effects * more tweaks to generation * more shit plus fix tests * more generation stuff plus threat levels * doink * now make it build * defer the artifact activation to not cause errors also pricing * some changes * all of the yaml + ui stuff for artifact analyzer * machine linking and starting to make the ui functional * artifact analyzer display * a shit ton of artifact analyzer stuff * more changes; making destroy work properly; progress bar tweaks * getting shit going! ALL RIGHT * small tweaks that didn't help much * Komm susser todd: the end of analysis * recipes and hints and ui, oh my! * add some in-game sources gotta prepare for day 1 launch * node data + ditch random seed in place of id * bunch of triggers * finish off the last few triggers * implement machine examine verb * knock, flicker, blink, throw * shatter, foam, shuffle, heat * fix all the shit i broke * *some* of these have to be good, no? 25 effects * callin' it there for effects * comments + reword some trigger hints * don't mind this little commit here * byref event * fix brokey node entry * fix low pressure trigger * mirror review plus fixing 0x40's bug also the throw artifact threw incorrectly * randomize the event message a teeny bit
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.Equipment.Components;
|
||||
|
||||
/// <summary>
|
||||
/// A machine that is combined and linked to the <see cref="AnalysisConsoleComponent"/>
|
||||
/// in order to analyze and destroy artifacts.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ArtifactAnalyzerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// How long it takes to analyze an artifact
|
||||
/// </summary>
|
||||
[DataField("analysisDuration", customTypeSerializer: typeof(TimespanSerializer))]
|
||||
public TimeSpan AnalysisDuration = TimeSpan.FromSeconds(60);
|
||||
|
||||
/// <summary>
|
||||
/// A mulitplier on the duration of analysis.
|
||||
/// Used for machine upgrading.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float AnalysisDurationMulitplier = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The machine part that modifies analysis duration.
|
||||
/// </summary>
|
||||
[DataField("machinePartAnalysisDuration", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
||||
public string MachinePartAnalysisDuration = "ScanningModule";
|
||||
|
||||
/// <summary>
|
||||
/// The modifier raised to the part rating to determine the duration multiplier.
|
||||
/// </summary>
|
||||
[DataField("partRatingAnalysisDurationMultiplier")]
|
||||
public float PartRatingAnalysisDurationMultiplier = 0.75f;
|
||||
|
||||
/// <summary>
|
||||
/// The corresponding console entity.
|
||||
/// Can be null if not linked.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public EntityUid? Console;
|
||||
|
||||
/// <summary>
|
||||
/// All of the valid artifacts currently touching the analyzer.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public HashSet<EntityUid> Contacts = new();
|
||||
|
||||
[DataField("scanFinishedSound")]
|
||||
public readonly SoundSpecifier ScanFinishedSound = new SoundPathSpecifier("/Audio/Machines/scan_finish.ogg");
|
||||
|
||||
#region Analysis Data
|
||||
[ViewVariables]
|
||||
public EntityUid? LastAnalyzedArtifact;
|
||||
|
||||
[ViewVariables]
|
||||
public ArtifactNode? LastAnalyzedNode;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float? LastAnalyzedCompletion;
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user