/// <summary> /// Initializes a new instance of the <see cref="Sensor" /> class. /// </summary> /// <param name="stat">The stat.</param> /// <param name="name">The optional unique name for this equipment. If not provided, the name embedded in the stat will be used.</param> public Sensor(SensorStat stat, string name = null) : base(stat, name) { }
private IList<SensorStat> __CreateAvailableSensorStats(int quantity) { IList<SensorStat> statsList = new List<SensorStat>(quantity); for (int i = 0; i < quantity; i++) { string name = string.Empty; RangeCategory rangeCat = Enums<RangeCategory>.GetRandom(excludeDefault: true); //RangeCategory rangeCat = RangeCategory.Long; switch (rangeCat) { case RangeCategory.Short: name = "ProximityDetector"; break; case RangeCategory.Medium: name = "PulseSensor"; break; case RangeCategory.Long: name = "DeepScanArray"; break; case RangeCategory.None: default: throw new NotImplementedException(ErrorMessages.UnanticipatedSwitchValue.Inject(rangeCat)); } var sensorStat = new SensorStat(name, AtlasID.MyGui, TempGameValues.AnImageFilename, "Description...", 0F, 0F, 0F, 0F, rangeCat); statsList.Add(sensorStat); } return statsList; }