using ProtoBuf; using System; using System.Collections.Generic; using ShipClass = VRage.MyTuple; namespace NerdRadar.Definitions { public static class DefConstants { public const long MessageHandlerId = 3244679803; } /// /// Parent class, ignore. /// [ProtoContract] [ProtoInclude(600, typeof(ClassConfig))] [ProtoInclude(601, typeof(BlockConfig))] public class EWARDefinition { public EWARDefinition() { } } /// /// Config for classifications. /// [ProtoContract] public class ClassConfig : EWARDefinition { [ProtoMember(1)] public bool ReplaceClasses; [ProtoMember(2)] public List StationClasses; [ProtoMember(3)] public List LargeGridClasses; [ProtoMember(4)] public List SmallGridClasses; } /// /// Config for actual blocks /// [ProtoContract] public class BlockConfig : EWARDefinition { [ProtoMember(1)] public Dictionary RadarStats; [ProtoMember(2)] public Dictionary JammerStats; [ProtoMember(3)] public Dictionary UpgradeBlockStats; [ProtoMember(4)] public Dictionary IFFBlockStats; } /// /// Class containing various multipliers and addons to all radars, and the grid RCS its mounted on. /// [ProtoContract] public class UpgradeBlockStat { /// /// Sensitivity multiplier for ALL radars on the grid this is mounted on. Multipliers are calculated BEFORE addons. /// /// Units: Unitless /// /// /// Requirements: Value is a real number /// /// [ProtoMember(1)] public float SensitivityMultiplier = 1; /// /// Sensitivity addon for ALL radars on the grid this is mounted on. Addons are calculated AFTER multipliers. /// /// Units: Decibels /// /// /// Requirements: Value is a real number /// /// [ProtoMember(2)] public float SensitivityAddon = 0; /// /// Noise filter multiplier for ALL radars on the grid this is mounted on. Multipliers are calculated BEFORE addons. /// /// Units: Unitless /// /// /// Requirements: Value is a real number /// /// [ProtoMember(3)] public float NoiseFilterMultiplier = 1; /// /// Noise filter addon for ALL radars on the grid this is mounted on. Addons are calculated AFTER multipliers. /// /// Units: Decibels /// /// /// Requirements: Value is a real number /// /// [ProtoMember(4)] public float NoiseFilterAddon = 0; /// /// Positional error multiplier for ALL radars on the grid this is mounted on. Multipliers are calculated BEFORE addons. /// /// Units: Unitless /// /// /// Requirements: Value is a real number /// /// [ProtoMember(5)] public float PositionalErrorMultiplier = 1; /// /// Positional error addon for ALL radars on the grid this is mounted on. Addons are calculated AFTER multipliers. /// /// Units: Meters /// /// /// Requirements: Value is a real number /// /// [ProtoMember(6)] public float PositionalErrorAddon = 0; /// /// Velocity error multiplier for ALL radars on the grid this is mounted on. Multipliers are calculated BEFORE addons. /// /// Units: Unitless /// /// /// Requirements: Value is a real number /// /// [ProtoMember(7)] public float VelocityErrorMultiplier = 1; /// /// Velocity error addon for ALL radars on the grid this is mounted on. Addons are calculated AFTER multipliers. /// /// Units: Meters per second /// /// /// Requirements: Value is a real number /// /// [ProtoMember(8)] public float VelocityErrorAddon = 0; /// /// RCS multiplier for the grid this is mounted on. Multipliers are calculated BEFORE addons. /// /// Units: Unitless /// /// /// Requirements: Value is a real number /// /// [ProtoMember(9)] public float RCSMultiplier = 1; /// /// RCS addon for the grid this is mounted on. Addons are calculated AFTER multipliers. /// /// Units: Meters per second /// /// /// Requirements: Value is a real number /// /// [ProtoMember(10)] public float RCSAddon = 0; /// /// Make multipliers apply only if the block is functional and on. ///
Mutually exclusive with ApplyOnlyWhenFiring
///
[ProtoMember(11)] public bool ApplyOnlyWhenOn = false; /// /// Make multipliers apply only if the block is a weapon and is firing. :) ///
Mutually exclusive with ApplyOnlywhenOn
///
[ProtoMember(12)] public bool ApplyOnlyWhenFiring = false; } /// /// Class containing all the stats for radar. Most stats can be found here: http://nebfltcom.wikidot.com/mechanics:radar /// [ProtoContract] public class RadarStat { /// /// Maximum radiated power of the radar. /// /// Units: Kilowatts (kW) /// /// /// Requirements: Value > 0 /// /// [ProtoMember(1)] public float MaxRadiatedPower; /// /// Gain of the radar system. /// /// Units: Decibels (dB) /// /// /// Requirements: Value > 0 /// /// [ProtoMember(2)] public float Gain; /// /// Maximum possible search range of the radar. Radar will not detect any targets past this range, even if they could otherwise. /// /// Units: Meters (m) /// /// /// Requirements: Value > 0 /// /// [ProtoMember(3)] public float MaxSearchRange; /// /// Aperture Size of the radar. /// /// Units: Meters Squared (m^2) /// /// /// Requirements: Value > 0 /// /// [ProtoMember(4)] public float ApertureSize; /// /// Noise filtering of the radar system. lower is better. /// /// /// Units: Decibels (dB) /// /// /// Requirements: Value is a real number /// /// [ProtoMember(5)] public double NoiseFilter; /// /// Minimum required ratio of returned signal to noise; /// /// Units: None /// /// /// Requirements: Value > 0 /// /// [ProtoMember(6)] public float SignalToNoiseRatio; /// /// Sensitivity of the radar /// /// Units: Decibels (dB) /// /// /// Requirements: Value is a real number /// /// [ProtoMember(7)] public double Sensitivity; /// /// Position error of the radar. Note, position and velocity error of 0 designates locked targets, regardless of whether the target is actually locked. /// /// Units: Meters (m) /// /// /// Requirements: Value >= 0 /// /// [ProtoMember(8)] public float PositionError; /// /// Velocity error of the radar. Does nothing currently, come back later when I figure out how to draw arbitrary lines on screen. Note, position and velocity error of 0 designates locked targets, regardless of whether the target is actually locked. /// /// Units: Meters (m) /// /// /// Requirements: Value >= 0 /// /// [ProtoMember(9)] public float VelocityError; /// /// Determines whether or not the radar system can target lock /// /// Units: N/A /// /// /// Requirements: true or false /// /// [ProtoMember(10)] public bool CanTargetLock; /// /// Determines whether or not the radar system needs to be externally mounted by making the LOS check fail if the parent grid is in the way. /// /// Units: N/A /// /// /// Requirements: true or false /// /// [ProtoMember(11)] public bool LOSCheckIncludesParentGrid; /// /// Multiplier for the RCS of a target grid in stealth from the mod https://steamcommunity.com/sharedfiles/filedetails/?id=2805859069 (Stealth Drive by Ash Like Snow) /// /// Units: None /// /// /// Requirements: Value >= 0 /// /// [ProtoMember(12)] public float StealthMultiplier; /// /// Determines if the radar can detect and show any jumps caused by any track visible to the radar. ///
Mutually exclusive with CanDetectLockedJumps
///
[ProtoMember(13)] public bool CanDetectAllJumps; /// /// Determines if the radar can detect and show any jumps caused by the tracked locked by the radar. ///
Mutually exclusive with CanDetectAllJumps
///
[ProtoMember(14)] public bool CanDetectLockedJumps; public RadarStat() { } } /// /// Class containing all the stats for jammers. /// [ProtoContract] public class JammerStat { /// /// Maximum radiated power of the jammer turret. /// /// Units: Kilowatts (kW) /// /// /// Requirements: Value > 0 /// /// [ProtoMember(1)] public float MaxRadiatedPower; /// /// Gain of the jammer turret. /// /// Units: Decibels (dB) /// /// /// Requirements: Value > 0 /// /// [ProtoMember(2)] public float Gain; /// /// Maximum possible search range of the jammer. The jammer will only affect radars within this range. /// /// Units: Meters (m) /// /// /// Requirements: Value > 0 /// /// [ProtoMember(3)] public float MaxSearchRange; /// /// Determines whether or not the jammer system needs to be externally mounted by failing if the parent grid is in the way. /// /// Units: N/A /// /// /// Requirements: true or false /// /// [ProtoMember(4)] public bool LOSCheckIncludesParentGrid; /// /// Determines whether or not the jammer system needs to be externally mounted by failing if the parent grid is in the way. /// /// Units: Radians (Use MathHelperD.ToRadians([value]), in place of a number to set value in degrees) /// /// /// Requirements: Value > 0 /// /// [ProtoMember(5)] public double AngleRadians; /// /// Area effect ratio of the jammer. Best explained here http://nebfltcom.wikidot.com/mechanics:electronic-warfare, although here it is a cylinder rather than a rectanglular prism. /// /// Units: None /// /// /// Requirements: Value > 0 /// /// [ProtoMember(6)] public float AreaEffectRatio; /// /// Maximum heat buildup before the jammer automatically turns off. Set to -1 to disable. Jammers will gain 1 heat per tick no matter what. /// /// Units: Proprietary Heat Measurement Unit™ /// /// /// Requirements: Value > 0 or -1 /// /// [ProtoMember(7)] public float MaxHeat; /// /// Amount of heat dissapated every tick the jammer is off. /// /// Units: Proprietary Heat Measurement Unit™ per tick /// /// /// Requirements: Value > 0 /// /// [ProtoMember(8)] public float HeatDrainPerTick; public JammerStat() { } } /// /// Class for containing all the stats for an IFF block - a beacon which will overwrite the default name listed on its radar track. /// [ProtoContract] public class IFFBlockStat { /// /// Maximum characters the IFF beacon is allowed to render on the radar track name. Set to zero to disable. /// [ProtoMember(1)] public int MaxCharacters; /// /// Whether or not to include the classification on the IFF name. /// [ProtoMember(2)] public bool ShowClass; } }