Skip to content

Commit 120c69b

Browse files
committed
Add support for the Caspian Explorer
Resolves #2763. Resolves #2765.
1 parent 74c926b commit 120c69b

31 files changed

Lines changed: 554 additions & 1099 deletions

ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Full details of the variables available for each noted event, and VoiceAttack in
44

55
## 4.1.7
66
* Core
7+
* Added support for the Caspian Explorer.
78
* Added support for the Type-11 Prospector.
89
* Revised Spansh faction queries to match the latest Spansh API revision.
910
* Various minor bug fixes.

DataDefinitions/Module.cs

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,20 +181,43 @@ public double GetFsdPowerConstant ()
181181
{
182182
if ( @class == 0 ) { return 1; }
183183

184-
var powerConstantFSD = new Dictionary<int, double>
184+
if ( edname?.Contains( "OverchargeBooster_Mkii", StringComparison.OrdinalIgnoreCase ) ?? false )
185185
{
186-
{ 2, 2.00 }, { 3, 2.15 }, { 4, 2.30 }, { 5, 2.45 }, { 6, 2.60 }, { 7, 2.75 }, { 8, 2.90 }
187-
};
188-
return powerConstantFSD.TryGetValue( @class , out var result )
189-
? result
190-
: 1;
186+
var powerConstantFSD_MkII = new Dictionary<int, double>
187+
{
188+
{ 8, 2.50 }
189+
};
190+
return powerConstantFSD_MkII.TryGetValue( @class, out var result )
191+
? result
192+
: 1;
193+
}
194+
else
195+
{
196+
var powerConstantFSD = new Dictionary<int, double>
197+
{
198+
{ 2, 2.00 }, { 3, 2.15 }, { 4, 2.30 }, { 5, 2.45 }, { 6, 2.60 }, { 7, 2.75 }, { 8, 2.90 }
199+
};
200+
return powerConstantFSD.TryGetValue( @class, out var result )
201+
? result
202+
: 1;
203+
}
191204
}
192205

193-
public double GetFsdRatingConstant ()
206+
public double GetFsdRatingConstant () // Fuel Multiplier
194207
{
195208
if ( string.IsNullOrEmpty(grade) ) { return 0; }
196209

197-
if ( edname?.Contains( "hyperdrive_overcharge" ) ?? false )
210+
if ( edname?.Contains( "OverchargeBooster_Mkii", StringComparison.OrdinalIgnoreCase ) ?? false )
211+
{
212+
var ratingConstants_SCO_MkII = new Dictionary<string, double>
213+
{
214+
{ "A", 11.0 }
215+
};
216+
return ratingConstants_SCO_MkII.TryGetValue( grade, out var rating )
217+
? rating
218+
: ratingConstants_SCO_MkII.First().Value;
219+
}
220+
else if ( edname?.Contains( "hyperdrive_overcharge" ) ?? false )
198221
{
199222
var ratingConstants_SCO = new Dictionary<string, double>
200223
{
@@ -230,7 +253,15 @@ public decimal GetFsdMaxFuelPerJump ()
230253

231254
// No modified value exists, use a base value
232255
decimal baseMaxFuelPerJump;
233-
if ( edname?.Contains( "hyperdrive_overcharge" ) ?? false )
256+
if ( edname?.Contains( "OverchargeBooster_Mkii", StringComparison.OrdinalIgnoreCase ) ?? false )
257+
{
258+
var baseMaxFuelsPerJump_SCO_MkII = new Dictionary<string, decimal>
259+
{
260+
{ "7A", 6.8M }
261+
};
262+
baseMaxFuelsPerJump_SCO_MkII.TryGetValue( @class + grade, out baseMaxFuelPerJump );
263+
}
264+
else if ( edname?.Contains( "hyperdrive_overcharge" ) ?? false )
234265
{
235266
var baseMaxFuelsPerJump_SCO = new Dictionary<string, decimal>
236267
{
@@ -288,7 +319,16 @@ public double GetFsdOptimalMass ()
288319
public double GetFsdBaseOptimalMass ()
289320
{
290321
double baseOptimalMass;
291-
if ( edname?.Contains( "hyperdrive_overcharge" ) ?? false )
322+
323+
if ( edname?.Contains( "OverchargeBooster_Mkii", StringComparison.OrdinalIgnoreCase ) ?? false )
324+
{
325+
var baseOptimalMasses_SCO_MkII = new Dictionary<string, double>
326+
{
327+
{ "8A", 4670.0 }
328+
};
329+
baseOptimalMasses_SCO_MkII.TryGetValue( @class + grade, out baseOptimalMass );
330+
}
331+
else if ( edname?.Contains( "hyperdrive_overcharge", StringComparison.OrdinalIgnoreCase ) ?? false )
292332
{
293333
var baseOptimalMasses_SCO = new Dictionary<string, double>
294334
{

DataDefinitions/ModuleDefinitions.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,20 @@ static Module ()
11591159
public static readonly Module lakonminer_armour_reactive = new Module( "lakonminer_armour_reactive", "ReactiveSurfaceComposite", 1, "I", 159950381 );
11601160
public static readonly Module Hpt_MiningToolV2_Fixed_Large = new Module( "Hpt_MiningToolV2_Fixed_Large", "MiningVolleyRepeater", 3, "C", 149905, ModuleMount.Fixed );
11611161
public static readonly Module Int_MultiDroneControl_MiningV2_Size5_Class5 = new Module( "Int_MultiDroneControl_MiningV2_Size5_Class5", "MultiDroneControl_Mining_Mk2", 5, "A", 149905 );
1162+
public static readonly Module Int_Hyperdrive_Overcharge_Size8_Class5_OverchargeBooster_Mkii = new Module( "Int_Hyperdrive_Overcharge_Size8_Class5_OverchargeBooster_Mkii", "FrameShiftDrive_SCO_MkII", 8, "A", 82042065 );
1163+
public static readonly Module Int_Hyperdrive_Overcharge_Size8_Class1 = new Module( "Int_Hyperdrive_Overcharge_Size8_Class1", "FrameShiftDrive_SCO", 8, "E", 6838549 );
1164+
public static readonly Module Int_Hyperdrive_Overcharge_Size8_Class2 = new Module( "Int_Hyperdrive_Overcharge_Size8_Class2", "FrameShiftDrive_SCO", 8, "D", 20515646 );
1165+
public static readonly Module Int_Hyperdrive_Overcharge_Size8_Class3 = new Module( "Int_Hyperdrive_Overcharge_Size8_Class3", "FrameShiftDrive_SCO", 8, "C", 20515646 );
1166+
public static readonly Module Int_Hyperdrive_Overcharge_Size8_Class4 = new Module( "Int_Hyperdrive_Overcharge_Size8_Class4", "FrameShiftDrive_SCO", 8, "B", 20515646 );
1167+
public static readonly Module Int_Hyperdrive_Overcharge_Size8_Class5 = new Module( "Int_Hyperdrive_Overcharge_Size8_Class5", "FrameShiftDrive_SCO", 8, "A", 61546936 );
1168+
public static readonly Module Int_Engine_Size7_Class5_GravityOptimised_MkII = new Module( "Int_Engine_Size7_Class5_GravityOptimised_MkII", "GravityOptimizedThrusters", 7, "A", 68368389 );
1169+
public static readonly Module Explorer_NX_Armour_Grade1_Default = new Module( "Explorer_NX_Armour_Grade1_Default", "LightweightAlloy", 1, "C", 0 );
1170+
public static readonly Module Explorer_NX_Armour_Grade1 = new Module( "Explorer_NX_Armour_Grade1", "LightweightAlloy_Ablative_MkII", 1, "C", 9743066 );
1171+
public static readonly Module Explorer_NX_Armour_Grade2 = new Module( "Explorer_NX_Armour_Grade2", "ReinforcedAlloy_Ablative_MkII", 1, "B", 77944517 );
1172+
public static readonly Module Explorer_NX_Armour_Grade3 = new Module( "Explorer_NX_Armour_Grade3", "MilitaryGradeComposite_Ablative_MkII", 1, "A", 175375161 );
1173+
public static readonly Module Explorer_NX_Armour_Mirrored = new Module( "Explorer_NX_Armour_Mirrored", "MirroredSurfaceComposite_Ablative_MkII", 1, "A", 414469960 );
1174+
public static readonly Module Explorer_NX_Armour_Reactive = new Module( "Explorer_NX_Armour_Reactive", "ReactiveSurfaceComposite_Ablative_MkII", 1, "A", 459288060 );
1175+
11621176

11631177
// Various free modules that show up in SRVs, fighters and training; not used anywhere but note them here so that they do not throw errors when encountered
11641178
public static readonly Module Hpt_PulseLaser_Fixed_SmallFree = new Module( "Hpt_PulseLaser_Fixed_SmallFree", "PulseLaser", 1, "F", 0, ModuleMount.Fixed);
@@ -1231,6 +1245,7 @@ static Module ()
12311245
public static readonly Module Int_Colonisation = new Module( "Int_Colonisation", "ColonisationSuite", 1, "I", 0 );
12321246
public static readonly Module Panther_Clipper_MkII_Cockpit = new Module( "PantherMkII_Cockpit", "CockpitCanopy", 1, "I", 0);
12331247
public static readonly Module LakonMiner_Cockpit = new Module( "LakonMiner_Cockpit", "CockpitCanopy", 1, "I", 0);
1248+
public static readonly Module Explorer_NX_Cockpit = new Module( "explorer_nx_cockpit", "CockpitCanopy", 1, "I", 0);
12341249

12351250
// Fighter modules
12361251
public static readonly Module Empire_Fighter_Cockpit = new Module( "Empire_Fighter_Cockpit", "CockpitCanopy", 1, "I", 0);

DataDefinitions/Properties/Modules.Designer.cs

Lines changed: 64 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)