예제 #1
0
 public ResourceInfo(RareResourceID resourceID, ResourceCategory category, string imageFilename, AtlasID atlasID, string description) {
     ResourceID = resourceID;
     Category = category;
     ImageFilename = imageFilename;
     AtlasID = atlasID;
     Description = description;
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AHullStat" /> struct.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The space available within this hull.</param>
 /// <param name="mass">The mass of this hull.</param>
 /// <param name="pwrRqmt">The power required to operate this hull.</param>
 /// <param name="expense">The expense consumed by this hull.</param>
 /// <param name="maxHitPts">The maximum hit points of this hull.</param>
 /// <param name="damageMitigation">The resistance to damage of this hull.</param>
 /// <param name="hullDimensions">The hull dimensions.</param>
 public AHullStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass,
     float pwrRqmt, float expense, float maxHitPts, DamageStrength damageMitigation, Vector3 hullDimensions)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense) {
     MaxHitPoints = maxHitPts;
     DamageMitigation = damageMitigation;
     HullDimensions = hullDimensions;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WeaponStat" /> struct.
 /// </summary>
 /// <param name="name">The name of the weapon.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The physical size of the weapon.</param>
 /// <param name="mass">The mass.</param>
 /// <param name="pwrRqmt">The power required to operate the weapon.</param>
 /// <param name="expense">The expense.</param>
 /// <param name="rangeCat">The range category of the weapon.</param>
 /// <param name="deliveryVehicleStrength">The delivery strength.</param>
 /// <param name="reloadPeriod">The time it takes to reload the weapon in hours.</param>
 /// <param name="damagePotential">The damage potential.</param>
 public AWeaponStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass, float pwrRqmt,
     float expense, RangeCategory rangeCat, WDVStrength deliveryVehicleStrength, float reloadPeriod,
     DamageStrength damagePotential)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense, rangeCat) {
     DeliveryVehicleStrength = deliveryVehicleStrength;
     ReloadPeriod = reloadPeriod;
     DamagePotential = damagePotential;
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FacilityHullStat" /> class.
 /// </summary>
 /// <param name="hullCategory">The hull category.</param>
 /// <param name="name">The name.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The size.</param>
 /// <param name="mass">The mass.</param>
 /// <param name="pwrRqmt">The PWR RQMT.</param>
 /// <param name="expense">The expense.</param>
 /// <param name="maxHitPts">The maximum hit PTS.</param>
 /// <param name="damageMitigation">The damage mitigation.</param>
 /// <param name="hullDimensions">The hull dimensions.</param>
 /// <param name="science">The science generated by this hull, if any.</param>
 /// <param name="culture">The culture generated by this hull, if any.</param>
 /// <param name="income">The income generated by this hull, if any.</param>
 public FacilityHullStat(FacilityHullCategory hullCategory, string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass,
     float pwrRqmt, float expense, float maxHitPts, DamageStrength damageMitigation, Vector3 hullDimensions, float science, float culture, float income)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense, maxHitPts, damageMitigation, hullDimensions) {
     HullCategory = hullCategory;
     Science = science;
     Culture = culture;
     Income = income;
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShieldGeneratorStat"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The size.</param>
 /// <param name="mass">The mass.</param>
 /// <param name="pwrRqmt">The PWR RQMT.</param>
 /// <param name="expense">The expense.</param>
 /// <param name="rangeCat">The range cat.</param>
 /// <param name="maximumCharge">The maximum charge.</param>
 /// <param name="trickleChargeRate">The trickle charge rate.</param>
 /// <param name="reloadPeriod">The reload period.</param>
 /// <param name="damageMitigation">The damage mitigation.</param>
 public ShieldGeneratorStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass,
     float pwrRqmt, float expense, RangeCategory rangeCat, float maximumCharge, float trickleChargeRate, float reloadPeriod, DamageStrength damageMitigation)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense, rangeCat) {
     MaximumCharge = maximumCharge;
     TrickleChargeRate = trickleChargeRate;
     ReloadPeriod = reloadPeriod;
     DamageMitigation = damageMitigation;
 }
예제 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProjectileWeaponStat" /> struct.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="imageAtlasID">The image atlas identifier.</param>
        /// <param name="imageFilename">The image filename.</param>
        /// <param name="description">The description.</param>
        /// <param name="size">The physical size of the weapon.</param>
        /// <param name="mass">The mass of the weapon.</param>
        /// <param name="pwrRqmt">The power required to operate the weapon.</param>
        /// <param name="expense">The expense.</param>
        /// <param name="rangeCat">The range category of the weapon.</param>
        /// <param name="deliveryVehicleStrength">The delivery strength.</param>
        /// <param name="reloadPeriod">The time it takes to reload the weapon in hours.</param>
        /// <param name="damagePotential">The damage potential.</param>
        /// <param name="ordnanceMaxSpeed">The maximum speed of the ordnance in units per hour in Topography.OpenSpace.</param>
        /// <param name="ordnanceMass">The mass of the ordnance.</param>
        /// <param name="ordnanceDrag">The drag of the ordnance in Topography.OpenSpace.</param>
        /// <param name="maxLaunchInaccuracy">The maximum launch inaccuracy in degrees.</param>

        public ProjectileWeaponStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass, float pwrRqmt,
            float expense, RangeCategory rangeCat, WDVStrength deliveryVehicleStrength, float reloadPeriod, DamageStrength damagePotential,
            float ordnanceMaxSpeed, float ordnanceMass, float ordnanceDrag, float maxLaunchInaccuracy)
            : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense, rangeCat, deliveryVehicleStrength, reloadPeriod, damagePotential, ordnanceMaxSpeed, ordnanceMass, ordnanceDrag) {
            if (maxLaunchInaccuracy > 5F) {
                D.Warn("{0} MaxLaunchInaccuracy of {1:0.#} is very high.", DebugName, maxLaunchInaccuracy);
            }
            MaxLaunchInaccuracy = maxLaunchInaccuracy;
        }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AProjectileWeaponStat" /> struct.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The physical size of the weapon.</param>
 /// <param name="mass">The mass of the weapon.</param>
 /// <param name="pwrRqmt">The power required to operate the weapon.</param>
 /// <param name="expense">The expense.</param>
 /// <param name="rangeCat">The range category of the weapon.</param>
 /// <param name="deliveryVehicleStrength">The delivery strength.</param>
 /// <param name="reloadPeriod">The time it takes to reload the weapon in hours.</param>
 /// <param name="damagePotential">The damage potential.</param>
 /// <param name="ordnanceMaxSpeed">The maximum speed of the ordnance in units per hour in Topography.OpenSpace.</param>
 /// <param name="ordnanceMass">The mass of the ordnance.</param>
 /// <param name="ordnanceDrag">The drag of the ordnance in Topography.OpenSpace.</param>
 public AProjectileWeaponStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass, float pwrRqmt,
     float expense, RangeCategory rangeCat, WDVStrength deliveryVehicleStrength, float reloadPeriod, DamageStrength damagePotential, float ordnanceMaxSpeed, float ordnanceMass, float ordnanceDrag)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense, rangeCat, deliveryVehicleStrength, reloadPeriod, damagePotential) {
     D.Assert(ordnanceMaxSpeed > Constants.ZeroF);
     D.Assert(ordnanceMass > Constants.ZeroF);
     D.Assert(ordnanceDrag > Constants.ZeroF);
     MaxSpeed = ordnanceMaxSpeed;
     OrdnanceMass = ordnanceMass;
     OrdnanceDrag = ordnanceDrag;
 }
예제 #8
0
        public float MaxTurnRate { get; private set; }  // IMPROVE replace with LateralThrust and calc maxTurnRate using mass

        /// <summary>
        /// Initializes a new instance of the <see cref="EngineStat"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="imageAtlasID">The image atlas identifier.</param>
        /// <param name="imageFilename">The image filename.</param>
        /// <param name="description">The description.</param>
        /// <param name="fullStlPropulsionPower">The maximum total propulsion power the STL engine(s) can generate.</param>
        /// <param name="maxTurnRate">The maximum turn rate the engines are capable of.</param>
        /// <param name="size">The total physical space consumed by the engine(s).</param>
        /// <param name="mass">The total mass of the engine(s).</param>
        /// <param name="expense">The total expense consumed by the engine(s).</param>
        /// <param name="ftlPropulsionPowerFactor">The FTL power multiplier of these engine(s).</param>
        /// <param name="engineQty">The number of engine(s).</param>
        public EnginesStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float fullStlPropulsionPower,
            float maxTurnRate, float size, float mass, float expense, float ftlPropulsionPowerFactor, int engineQty = Constants.One)
            : base(name, imageAtlasID, imageFilename, description, size * engineQty, mass * engineQty, Constants.ZeroF, expense * engineQty) {
            FullStlPropulsionPower = fullStlPropulsionPower * engineQty;
            FullFtlPropulsionPower = fullStlPropulsionPower * engineQty * ftlPropulsionPowerFactor;
            if (maxTurnRate < TempGameValues.MinimumTurnRate) {
                D.Warn("{0}'s MaxTurnRate {1:0.#} is too low. Game MinTurnRate = {2:0.#}.", DebugName, maxTurnRate, TempGameValues.MinimumTurnRate);
            }
            MaxTurnRate = maxTurnRate;
        }
예제 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AEquipmentStat" /> class.
 /// </summary>
 /// <param name="name">The display name of the Equipment.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The physical size of the equipment.</param>
 /// <param name="mass">The mass of the equipment.</param>
 /// <param name="pwrRqmt">The power required to operate the equipment.</param>
 /// <param name="expense">The expense required to operate this equipment.</param>
 public AEquipmentStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass, float pwrRqmt, float expense) {
     Name = name;
     ImageAtlasID = imageAtlasID;
     ImageFilename = imageFilename;
     Description = description;
     Size = size;
     Mass = mass;
     PowerRequirement = pwrRqmt;
     Expense = expense;
 }
예제 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WeaponStat" /> struct.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The physical size of the weapon.</param>
 /// <param name="mass">The mass.</param>
 /// <param name="pwrRqmt">The power required to operate the weapon.</param>
 /// <param name="expense">The expense.</param>
 /// <param name="rangeCat">The range category of the weapon.</param>
 /// <param name="baseRangeDistance">The base (no owner multiplier applied) range distance in units.</param>
 /// <param name="deliveryVehicleStrength">The delivery strength.</param>
 /// <param name="accuracy">The accuracy of the weapon. Range 0...1.0</param>
 /// <param name="reloadPeriod">The time it takes to reload the weapon in hours.</param>
 /// <param name="damagePotential">The damage potential.</param>
 /// <param name="duration">The firing duration in hours. Applicable only to Beams.</param>
 public WeaponStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass, float pwrRqmt,
     float expense, RangeCategory rangeCat, float baseRangeDistance, WDVStrength deliveryVehicleStrength, float accuracy,
     float reloadPeriod, DamageStrength damagePotential, float duration = Constants.ZeroF)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense, rangeCat, baseRangeDistance) {
     DeliveryVehicleStrength = deliveryVehicleStrength;
     Accuracy = accuracy;
     ReloadPeriod = reloadPeriod;
     DamagePotential = damagePotential;
     Duration = duration;
     Validate();
 }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WeaponStat" /> struct.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The physical size of the weapon.</param>
 /// <param name="mass">The mass.</param>
 /// <param name="pwrRqmt">The power required to operate the weapon.</param>
 /// <param name="expense">The expense.</param>
 /// <param name="rangeCat">The range category of the weapon.</param>
 /// <param name="deliveryVehicleStrength">The delivery strength.</param>
 /// <param name="reloadPeriod">The time it takes to reload the weapon in hours.</param>
 /// <param name="damagePotential">The damage potential.</param>
 /// <param name="duration">The firing duration in hours.</param>
 /// <param name="maxLaunchInaccuracy">The maximum launch inaccuracy in degrees.</param>
 public BeamWeaponStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass,
     float pwrRqmt, float expense, RangeCategory rangeCat, WDVStrength deliveryVehicleStrength,
     float reloadPeriod, DamageStrength damagePotential, float duration, float maxLaunchInaccuracy)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense, rangeCat, deliveryVehicleStrength, reloadPeriod, damagePotential) {
     D.Assert(duration > Constants.ZeroF);
     if (maxLaunchInaccuracy > 5F) {
         D.Warn("{0} MaxLaunchInaccuracy of {1:0.#} is very high.", DebugName, MaxLaunchInaccuracy);
     }
     Duration = duration;
     MaxLaunchInaccuracy = maxLaunchInaccuracy;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ActiveCountermeasureStat" /> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The size.</param>
 /// <param name="mass">The mass.</param>
 /// <param name="pwrRqmt">The PWR RQMT.</param>
 /// <param name="expense">The expense.</param>
 /// <param name="rangeCat">The range cat.</param>
 /// <param name="interceptStrengths">The intercept strengths.</param>
 /// <param name="interceptAccuracy">The intercept accuracy.</param>
 /// <param name="reloadPeriod">The reload period.</param>
 /// <param name="damageMitigation">The damage mitigation.</param>
 public ActiveCountermeasureStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass,
     float pwrRqmt, float expense, RangeCategory rangeCat, WDVStrength[] interceptStrengths, float interceptAccuracy, float reloadPeriod,
     DamageStrength damageMitigation)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense, rangeCat) {
     // confirm if more than one interceptStrength, that they each contain a unique WDVCategory
     D.AssertEqual(interceptStrengths.Length, interceptStrengths.Select(intS => intS.Category).Distinct().Count(), "Duplicate Categories found.");
     InterceptStrengths = interceptStrengths;
     InterceptAccuracy = interceptAccuracy;
     ReloadPeriod = reloadPeriod;
     DamageMitigation = damageMitigation;
 }
예제 #13
0
        /// <summary>
        /// The steering accuracy of the missile. Range 0...1.0. Each 1% (0.01) of
        /// inaccuracy introduces up to 1 degree of steering inaccuracy.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="imageAtlasID">The image atlas identifier.</param>
        /// <param name="imageFilename">The image filename.</param>
        /// <param name="description">The description.</param>
        /// <param name="size">The physical size of the weapon.</param>
        /// <param name="mass">The mass of the weapon.</param>
        /// <param name="pwrRqmt">The power required to operate the weapon.</param>
        /// <param name="expense">The expense.</param>
        /// <param name="rangeCat">The range category of the weapon.</param>
        /// <param name="deliveryVehicleStrength">The delivery strength.</param>
        /// <param name="reloadPeriod">The time it takes to reload the weapon in hours.</param>
        /// <param name="damagePotential">The damage potential.</param>
        /// <param name="ordnanceMaxSpeed">The maximum speed of the ordnance in units per hour in Topography.OpenSpace.</param>
        /// <param name="ordnanceMass">The mass of the ordnance.</param>
        /// <param name="ordnanceDrag">The drag of the ordnance in Topography.OpenSpace.</param>
        /// <param name="turnRate">The turn rate of the ordnance in degrees per hour .</param>
        /// <param name="courseUpdateFreq">How often the ordnance's course is updated in updates per hour.</param>
        /// <param name="maxSteeringInaccuracy">The maximum steering inaccuracy in degrees.</param>

        public MissileWeaponStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass, float pwrRqmt,
            float expense, RangeCategory rangeCat, WDVStrength deliveryVehicleStrength, float reloadPeriod, DamageStrength damagePotential,
            float ordnanceMaxSpeed, float ordnanceMass, float ordnanceDrag, float turnRate, float courseUpdateFreq, float maxSteeringInaccuracy)
            : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense, rangeCat, deliveryVehicleStrength, reloadPeriod, damagePotential, ordnanceMaxSpeed, ordnanceMass, ordnanceDrag) {
            D.Assert(turnRate > Constants.ZeroF);
            D.Assert(courseUpdateFreq > Constants.ZeroF);
            if (maxSteeringInaccuracy > 5F) {
                D.Warn("{0} MaxSteeringInaccuracy of {1:0.#} is very high.", DebugName, MaxSteeringInaccuracy);
            }
            TurnRate = turnRate;
            CourseUpdateFrequency = courseUpdateFreq;
            MaxSteeringInaccuracy = maxSteeringInaccuracy;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PassiveCountermeasureStat"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The size.</param>
 /// <param name="mass">The mass.</param>
 /// <param name="pwrRqmt">The PWR RQMT.</param>
 /// <param name="expense">The expense.</param>
 /// <param name="damageMitigation">The damage mitigation.</param>
 public PassiveCountermeasureStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass, float pwrRqmt, float expense, DamageStrength damageMitigation)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense) {
     DamageMitigation = damageMitigation;
 }
예제 #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CountermeasureStat" /> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The physical size of the countermeasure.</param>
 /// <param name="pwrRqmt">The power required to operate the countermeasure.</param>
 /// <param name="strength">The combat strength of the countermeasure.</param>
 /// <param name="accuracy">The accuracy of the countermeasure.</param>
 public CountermeasureStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float pwrRqmt, CombatStrength strength, float accuracy)
     : base(name, imageAtlasID, imageFilename, description, size, pwrRqmt) {
     Strength = strength;
     Accuracy = accuracy;
 }
예제 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ARangedEquipmentStat" /> class.
 /// </summary>
 /// <param name="name">The name of the RangedEquipment.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The size.</param>
 /// <param name="mass">The mass.</param>
 /// <param name="pwrRqmt">The power needed to operate this equipment.</param>
 /// <param name="expense">The expense.</param>
 /// <param name="rangeCat">The range category.</param>
 public ARangedEquipmentStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass,
     float pwrRqmt, float expense, RangeCategory rangeCat)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense) {
     RangeCategory = rangeCat;
 }
예제 #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SensorStat" /> struct.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="imageAtlasID">The image atlas identifier.</param>
 /// <param name="imageFilename">The image filename.</param>
 /// <param name="description">The description.</param>
 /// <param name="size">The physical size of the sensor.</param>
 /// <param name="mass">The mass.</param>
 /// <param name="pwrRqmt">The power required to operate the sensor.</param>
 /// <param name="expense">The expense.</param>
 /// <param name="rangeCat">The range category of the sensor.</param>
 public SensorStat(string name, AtlasID imageAtlasID, string imageFilename, string description, float size, float mass, float pwrRqmt,
     float expense, RangeCategory rangeCat)
     : base(name, imageAtlasID, imageFilename, description, size, mass, pwrRqmt, expense, rangeCat) { }
예제 #18
0
 protected void PopulateImageValues(string filename, AtlasID atlasID) {
     _imageSprite.atlas = atlasID.GetAtlas();
     _imageSprite.spriteName = filename;
 }