public static Entity FacPassiveSensor(Game game, Entity faction) { ComponentDesign sensor; ComponentTemplateSD template = NameLookup.GetTemplateSD(game, "PassiveSensor"); sensor = GenericComponentFactory.StaticToDesign(template, faction.GetDataBlob <FactionTechDB>(), game.StaticData); sensor.ComponentDesignAttributes[0].SetValueFromInput(5000); //size sensor.ComponentDesignAttributes[1].SetValueFromInput(500); //best wavelength sensor.ComponentDesignAttributes[2].SetValueFromInput(1000); //wavelength detection width //[3] best detection magnatude. (Not settable) //[4] worst detection magnatude (not settable) sensor.ComponentDesignAttributes[5].SetValueFromInput(5); //resolution sensor.ComponentDesignAttributes[6].SetValueFromInput(3600); //Scan Time sensor.Name = "PassiveSensor-S500"; return(GenericComponentFactory.DesignToDesignEntity(game, faction, sensor)); }
public static ComponentDesign FacPassiveSensor(Game game, Entity faction) { ComponentDesigner sensorDesigner; ComponentTemplateSD template = NameLookup.GetTemplateSD(game, "PassiveSensor"); sensorDesigner = new ComponentDesigner(template, faction.GetDataBlob <FactionTechDB>()); sensorDesigner.ComponentDesignAttributes["Sensor Size"].SetValueFromInput(5000); //size sensorDesigner.ComponentDesignAttributes["Ideal Detection Wavelength"].SetValueFromInput(500); //best wavelength sensorDesigner.ComponentDesignAttributes["Detection Wavelength Width"].SetValueFromInput(1000); //wavelength detection width //[3] best detection magnatude. (Not settable) //[4] worst detection magnatude (not setta[ble) sensorDesigner.ComponentDesignAttributes["Resolution"].SetValueFromInput(5); //resolution sensorDesigner.ComponentDesignAttributes["Scan Time"].SetValueFromInput(3600); //Scan Time sensorDesigner.Name = "PassiveSensor-S500"; //return sensor.CreateDesign(faction); _sensorInstalation = sensorDesigner.CreateDesign(faction); faction.GetDataBlob <FactionTechDB>().IncrementLevel(_sensorInstalation.TechID); return(_sensorInstalation); }
public static ComponentDesign ShipPassiveSensor(Game game, Entity faction) { if (_sensor_50 != null) { return(_sensor_50); } ComponentDesigner sensor; ComponentTemplateSD template = NameLookup.GetTemplateSD(game, "PassiveSensor"); sensor = new ComponentDesigner(template, faction.GetDataBlob <FactionTechDB>()); sensor.ComponentDesignAttributes["Antenna Size"].SetValueFromInput(5.5); //size sensor.ComponentDesignAttributes["Ideal Detection Wavelength"].SetValueFromInput(479); //best wavelength sensor.ComponentDesignAttributes["Detection Bandwidth"].SetValueFromInput(200); //wavelength detection width //sensor.ComponentDesignAttributes[3].SetValueFromInput(10); //best detection magnatude. (Not settable) //[4] worst detection magnatude (not settable) sensor.ComponentDesignAttributes["Resolution"].SetValueFromInput(1); //resolution sensor.ComponentDesignAttributes["Scan Time"].SetValueFromInput(3600); //Scan Time sensor.Name = "PassiveSensor-S50"; _sensor_50 = sensor.CreateDesign(faction); faction.GetDataBlob <FactionTechDB>().IncrementLevel(_sensor_50.TechID); return(_sensor_50); }