mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-12 20:26:10 +01:00
terrain coeffs
This commit is contained in:
1 parent
62da186a25
commit
9a66fb5115
6 files changed
+113
-8
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
type Characteristic,
|
||||
type CharacteristicContext,
|
||||
} from "../types/characteristics";
|
||||
import { rawTerrainCoefficient } from "../tankopedia/rawTerrainCoefficient";
|
||||
|
||||
function intraClipCoefficient({
|
||||
script,
|
||||
@@ -621,7 +622,66 @@ export const characteristics = {
|
||||
},
|
||||
|
||||
// brake_force: unavailable,
|
||||
// terrain_coefficient: unavailable,
|
||||
|
||||
hard_terrain_coefficient_raw: {
|
||||
type: CharacteristicType.Number,
|
||||
compute({ track, degressive, script }) {
|
||||
return rawTerrainCoefficient(
|
||||
track.resistance_hard,
|
||||
"firmGroundPassabilityIncrease",
|
||||
degressive("driver"),
|
||||
script,
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
hard_terrain_coefficient: {
|
||||
type: CharacteristicType.Number,
|
||||
compute({ characteristic }) {
|
||||
const raw = characteristic("hard_terrain_coefficient_raw") as number;
|
||||
return 100 / raw;
|
||||
},
|
||||
},
|
||||
|
||||
medium_terrain_coefficient_raw: {
|
||||
type: CharacteristicType.Number,
|
||||
compute({ track, degressive, script }) {
|
||||
return rawTerrainCoefficient(
|
||||
track.resistance_medium,
|
||||
"mediumGroundPassabilityIncrease",
|
||||
degressive("driver"),
|
||||
script,
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
medium_terrain_coefficient: {
|
||||
type: CharacteristicType.Number,
|
||||
compute({ characteristic }) {
|
||||
const raw = characteristic("medium_terrain_coefficient_raw") as number;
|
||||
return 100 / raw;
|
||||
},
|
||||
},
|
||||
|
||||
soft_terrain_coefficient_raw: {
|
||||
type: CharacteristicType.Number,
|
||||
compute({ track, degressive, script }) {
|
||||
return rawTerrainCoefficient(
|
||||
track.resistance_soft,
|
||||
"softGroundPassabilityIncrease",
|
||||
degressive("driver"),
|
||||
script,
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
soft_terrain_coefficient: {
|
||||
type: CharacteristicType.Number,
|
||||
compute({ characteristic }) {
|
||||
const raw = characteristic("soft_terrain_coefficient_raw") as number;
|
||||
return 100 / raw;
|
||||
},
|
||||
},
|
||||
|
||||
hull_traverse_speed: {
|
||||
type: CharacteristicType.Number,
|
||||
|
||||
@@ -163,7 +163,12 @@ export const characteristicsGroups: CharacteristicsGroup[] = [
|
||||
{ name: "power_to_weight", decimals: 1, units: "bhp_t" },
|
||||
{ name: "brake_force", decimals: 1, units: "kN" },
|
||||
|
||||
{ name: "terrain_coefficient", decimals: 2 },
|
||||
{ name: "hard_terrain_coefficient", decimals: 0 },
|
||||
{ name: "medium_terrain_coefficient", decimals: 0 },
|
||||
{ name: "soft_terrain_coefficient", decimals: 0 },
|
||||
{ name: "hard_terrain_coefficient_raw", decimals: 2 },
|
||||
{ name: "medium_terrain_coefficient_raw", decimals: 2 },
|
||||
{ name: "soft_terrain_coefficient_raw", decimals: 2 },
|
||||
|
||||
{ name: "hull_traverse_speed", units: "deg_s" },
|
||||
{ name: "turret_traverse_speed", units: "deg_s" },
|
||||
|
||||
Reference in new issue
Block a user