using Content.Shared._Horizon.BluespaceHarvester; using Robust.Shared.Audio; using Robust.Shared.Prototypes; namespace Content.Server._Horizon.BluespaceHarvester; [RegisterComponent, Access(typeof(BluespaceHarvesterSystem))] public sealed partial class BluespaceHarvesterComponent : Component { [ViewVariables(VVAccess.ReadWrite)] public TimeSpan ResetTime; /// /// Responsible for forcibly turning off the harvester and blocking input level. /// [ViewVariables(VVAccess.ReadWrite)] public bool Reset; /// /// The current level at which the harvester is located is what other parameters are calculated from. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int CurrentLevel; /// /// The level to which the harvester always strives if possible. It is installed by the player, but during the reset, this feature is blocked. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int TargetLevel; /// /// The level above which it is impossible not to set TargetLevel. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int MaxLevel = 20; /// /// The level above which the Danger begin to rise. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int StableLevel = 10; /// /// Similar to StableLevel, but replaces it when hacked by a Emag. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int EmaggedStableLevel = 5; /// /// Points generated by harvesters, which can be spent on purchasing things in categories. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int Points; /// /// Displays how many points have been generated, regardless of spending. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int TotalPoints; /// /// Tap to visualize any state of the harvester after hacking. /// [DataField] public BluespaceHarvesterVisuals RedspaceTap = BluespaceHarvesterVisuals.TapRedspace; /// /// The level of danger on which the spawn of DANGEROUS rifts depends. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int Danger; /// /// This will allow you to pay a certain fee for careless work with this device. /// Given mainly for reset when there is a loss of electricity from the source, /// but the value is not too large to cause a lot of harm. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int DangerFromReset = 75; /// /// After this danger value, the generation of dangerous creatures and anomalies will begin. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int DangerLimit = 175; /// /// A prototype rift created when the number of allowed points is exceeded. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public EntProtoId Rift = "BluespaceHarvesterRift"; /// /// The maximum number of rifts that can appear, the lower this value, /// the greater the chance of strong mobs /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int RiftCount = 3; /// /// Tries once every 1 second, with this chance to create a rift if DangerLimit is exceeded. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float RiftChance = 0.08f; /// /// Replaces RiftChance when hacked by Emag. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float EmaggedRiftChance = 0.03f; [ViewVariables(VVAccess.ReadWrite)] public int Harvesters; [DataField] public List Categories = new() { new BluespaceHarvesterCategoryInfo { PrototypeId = "RandomHarvesterBiologicalLoot", Cost = 30000, Type = BluespaceHarvesterCategory.Biological, }, new BluespaceHarvesterCategoryInfo() { PrototypeId = "RandomHarvesterTechnologicalLoot", Cost = 50000, Type = BluespaceHarvesterCategory.Technological, }, new BluespaceHarvesterCategoryInfo { PrototypeId = "RandomHarvesterIndustrialLoot", Cost = 75000, Type = BluespaceHarvesterCategory.Industrial, }, new BluespaceHarvesterCategoryInfo() { PrototypeId = "RandomHarvesterDestructionLoot", Cost = 100000, Type = BluespaceHarvesterCategory.Destruction, }, }; /// /// The radius within which crates and rifts can appear. /// [DataField] public float SpawnRadius = 5f; [DataField] public EntProtoId SpawnEffect = "EffectEmpPulse"; [DataField] public SoundSpecifier SpawnSound = new SoundPathSpecifier("/Audio/Effects/teleport_arrival.ogg"); [ViewVariables] public float ReceivedPower; [ViewVariables] public float DrawRate; } [Serializable] public sealed class BluespaceHarvesterTap { /// /// The minimum level from which Visual is enabled. /// [DataField] public int Level; [DataField] public BluespaceHarvesterVisuals Visual; }