public ShipDesign(Player player, string designName, ShipHullStat hullStat, EnginesStat enginesStat, ShipCombatStance combatStance, IEnumerable<WeaponDesign> weaponDesigns, IEnumerable<PassiveCountermeasureStat> passiveCmStats, IEnumerable<ActiveCountermeasureStat> activeCmStats, IEnumerable<SensorStat> sensorStats, IEnumerable<ShieldGeneratorStat> shieldGenStats, Priority hqPriority) : base(player, designName, weaponDesigns, passiveCmStats, activeCmStats, sensorStats, shieldGenStats, hqPriority) { HullStat = hullStat; EnginesStat = enginesStat; CombatStance = combatStance; }
/// <summary> /// Initializes a new instance of the <see cref="ShipStat" /> struct. /// </summary> /// <param name="name">The name.</param> /// <param name="mass">The mass.</param> /// <param name="maxHitPts">The maximum hit PTS.</param> /// <param name="category">The category.</param> /// <param name="stance">The stance.</param> /// <param name="maxTurnRate">The ship's maximum turn rate in degrees per hour.</param> /// <param name="drag">The drag.</param> /// <param name="fullStlThrust">The maximum force projected by the STL engines. FullStlSpeed = FullStlThrust / (Mass * Drag). /// NOTE: This value uses a Game Hour denominator. It is adjusted in /// realtime to a Unity seconds value in EngineRoom.ApplyThrust() using GeneralSettings.HoursPerSecond.</param> /// <param name="fullFtlThrust">The maximum force projected by the FTL engines. FullFtlSpeed = FullFtlThrust / (Mass * Drag). /// NOTE: This value uses a Game Hour denominator. It is adjusted in /// realtime to a Unity seconds value in EngineRoom.ApplyThrust() using GeneralSettings.HoursPerSecond.</param> /// <param name="science">The science generated by this ship.</param> /// <param name="culture">The culture generated by this ship.</param> /// <param name="income">The income generated by this ship.</param> /// <param name="expense">The expense consumed by this ship.</param> public ShipStat(string name, float mass, float maxHitPts, ShipHullCategory category, ShipCombatStance stance, float maxTurnRate, float drag, float fullStlThrust, float fullFtlThrust, float science, float culture, float income, float expense) : this() { Name = name; Mass = mass; MaxHitPoints = maxHitPts; Category = category; CombatStance = stance; MaxTurnRate = maxTurnRate; Drag = drag; FullStlThrust = fullStlThrust; FullFtlThrust = fullFtlThrust; Science = science; Culture = culture; Income = income; Expense = expense; }
private void MakeAndRecordElementDesign(string designName, Player owner, ShipHullStat hullStat, IEnumerable<AWeaponStat> weaponStats, IEnumerable<PassiveCountermeasureStat> passiveCmStats, IEnumerable<ActiveCountermeasureStat> activeCmStats, IEnumerable<SensorStat> sensorStats, IEnumerable<ShieldGeneratorStat> shieldGenStats, Priority hqPriority, ShipCombatStance stance) { ShipHullCategory hullCategory = hullStat.HullCategory; var engineStat = MakeEnginesStat(hullCategory); var weaponDesigns = _factory.__MakeWeaponDesigns(hullCategory, weaponStats); var design = new ShipDesign(owner, designName, hullStat, engineStat, stance, weaponDesigns, passiveCmStats, activeCmStats, sensorStats, shieldGenStats, hqPriority); _gameMgr.PlayersDesigns.Add(design); }
/// <summary> /// Initializes a new instance of the <see cref="ShipData" /> class. /// </summary> /// <param name="ship">The ship.</param> /// <param name="owner">The owner.</param> /// <param name="passiveCMs">The passive countermeasures.</param> /// <param name="hullEquipment">The hull equipment.</param> /// <param name="activeCMs">The active countermeasures.</param> /// <param name="sensors">The sensors.</param> /// <param name="shieldGenerators">The shield generators.</param> /// <param name="hqPriority">The HQ priority.</param> /// <param name="enginesStat">The engines stat.</param> /// <param name="combatStance">The combat stance.</param> public ShipData(IShip ship, Player owner, IEnumerable<PassiveCountermeasure> passiveCMs, ShipHullEquipment hullEquipment, IEnumerable<ActiveCountermeasure> activeCMs, IEnumerable<Sensor> sensors, IEnumerable<ShieldGenerator> shieldGenerators, Priority hqPriority, EnginesStat enginesStat, ShipCombatStance combatStance) : base(ship, owner, passiveCMs, hullEquipment, activeCMs, sensors, shieldGenerators, hqPriority) { Science = hullEquipment.Science; Culture = hullEquipment.Culture; Income = hullEquipment.Income; _enginesStat = enginesStat; CombatStance = combatStance; InitializeLocalValuesAndReferences(); }