@@ -35,11 +35,11 @@ public async Task<NavWaypointCollection> GetGalaxyRouteAsync (string currentSyst
3535
3636 GetShipJumpDetails ( ship , out double fuel_power , out double fuel_multiplier , out double optimal_mass ,
3737 out decimal base_mass , out decimal tank_size , out decimal internal_tank_size ,
38- out decimal max_fuel_per_jump , out double range_boost ) ;
38+ out decimal max_fuel_per_jump , out double range_boost , out int supercharge_multiplier ) ;
3939
4040 try
4141 {
42- var requestUri = GalaxyRouteRequest ( currentSystem , targetSystem , cargoCarriedTons , fuel_power , fuel_multiplier , optimal_mass , base_mass , tank_size , internal_tank_size , max_fuel_per_jump , range_boost , is_supercharged , use_supercharge , use_injections , exclude_secondary ) ;
42+ var requestUri = GalaxyRouteRequest ( currentSystem , targetSystem , cargoCarriedTons , fuel_power , fuel_multiplier , optimal_mass , base_mass , tank_size , internal_tank_size , max_fuel_per_jump , range_boost , supercharge_multiplier , is_supercharged , use_supercharge , use_injections , exclude_secondary ) ;
4343 var initialResponse = await spanshHttpClient . GetAsync ( requestUri , CancellationToken . None ) . ConfigureAwait ( false ) ;
4444 initialResponse . EnsureSuccessStatusCode ( ) ;
4545 var responseJson = await initialResponse . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
@@ -70,7 +70,7 @@ public async Task<NavWaypointCollection> GetGalaxyRouteAsync (string currentSyst
7070 return null ;
7171 }
7272
73- private void GetShipJumpDetails ( Ship ship , out double fuel_power , out double fuel_multiplier , out double optimal_mass , out decimal base_mass , out decimal tank_size , out decimal internal_tank_size , out decimal max_fuel_per_jump , out double range_boost )
73+ private void GetShipJumpDetails ( Ship ship , out double fuel_power , out double fuel_multiplier , out double optimal_mass , out decimal base_mass , out decimal tank_size , out decimal internal_tank_size , out decimal max_fuel_per_jump , out double range_boost , out int supercharge_multiplier )
7474 {
7575 // Optimal mass
7676 optimal_mass = ship . frameshiftdrive . GetFsdOptimalMass ( ) ;
@@ -96,9 +96,18 @@ private void GetShipJumpDetails(Ship ship, out double fuel_power, out double fue
9696
9797 // Fuel reservoir capacity
9898 internal_tank_size = ship . activeFuelReservoirCapacity ;
99+
100+ // Neutron boost multiplier (4x for standard supercharge, 6x for Caspian Explorer Overcharge Booster Frame Shift Drive Mk II
101+ supercharge_multiplier =
102+ ship . frameshiftdrive . edname . Contains ( "OverchargeBooster_Mkii" , StringComparison . OrdinalIgnoreCase )
103+ ? 6
104+ : 4 ;
99105 }
100106
101- private string GalaxyRouteRequest ( string currentSystem , string targetSystem , int ? cargoCarriedTons , double fuel_power , double fuel_multiplier , double optimal_mass , decimal base_mass , decimal tank_size , decimal internal_tank_size , decimal max_fuel_per_jump , double range_boost , bool is_supercharged , bool use_supercharge , bool use_injections , bool exclude_secondary )
107+ private string GalaxyRouteRequest ( string currentSystem , string targetSystem , int ? cargoCarriedTons ,
108+ double fuel_power , double fuel_multiplier , double optimal_mass , decimal base_mass , decimal tank_size ,
109+ decimal internal_tank_size , decimal max_fuel_per_jump , double range_boost , int supercharge_multiplier ,
110+ bool is_supercharged , bool use_supercharge , bool use_injections , bool exclude_secondary )
102111 {
103112 var relativePath = "generic/route" ;
104113 var queryParams = new List < string >
@@ -116,7 +125,8 @@ private string GalaxyRouteRequest(string currentSystem, string targetSystem, int
116125 $ "tank_size={ tank_size . ToInvariantString ( ) } ",
117126 $ "internal_tank_size={ internal_tank_size . ToInvariantString ( ) } ",
118127 $ "max_fuel_per_jump={ max_fuel_per_jump . ToInvariantString ( ) } ",
119- $ "range_boost={ range_boost } "
128+ $ "range_boost={ range_boost } ",
129+ $ "supercharge_multiplier={ supercharge_multiplier } "
120130 } ;
121131
122132 if ( cargoCarriedTons . HasValue )
0 commit comments