Finish AirDef catalog, route, stock and observation fixes
build / mod (push) Successful in 30m46s

Refs #91, #114, #118, #135. Show the latest recorded unit decision in the native card (#153).
This commit is contained in:
2026-12-02 18:22:22 +03:00
parent 9e0cec13f2
commit 7612d15963
38 changed files with 942 additions and 737 deletions
+68
View File
@@ -20,6 +20,36 @@ const HANDOVER: f64 = 10.0;
const TRUCK_LOAD: u32 = 2;
const STOCK_LIMIT: u32 = 1000000;
#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)]
pub enum DroneKind {
Shahed,
Geran3,
Lancet,
Gerbera,
Kh101,
Kalibr,
Kh22,
Zircon,
Iskander,
Kinzhal,
Oreshnik,
OreshnikBlock,
OreshnikSub,
}
#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)]
pub enum MissileKind {
Pac3,
M57e6,
M48n6,
M77n6,
IrisT,
Amraam,
M9m317,
M9m338,
P1sun,
}
const DRONE_SPEC_SHAHED: DroneSpec = DroneSpec {
name: "Шахед-136",
key: "shahed",
@@ -30,6 +60,7 @@ const DRONE_SPEC_SHAHED: DroneSpec = DroneSpec {
clearance: 18.0,
dive: 32.0,
warhead: 3,
accuracy: (1.2, 0.03),
scale: 1.3,
engine: Engine::Prop(1.34, 1.0),
decoy: false,
@@ -51,6 +82,7 @@ const DRONE_SPEC_GERAN3: DroneSpec = DroneSpec {
clearance: 18.0,
dive: 50.0,
warhead: 2,
accuracy: (1.0, 0.03),
scale: 1.15,
engine: Engine::Jet(0.34, 1.55, 1.0),
decoy: false,
@@ -72,6 +104,7 @@ const DRONE_SPEC_LANCET: DroneSpec = DroneSpec {
clearance: 10.0,
dive: 38.0,
warhead: 1,
accuracy: (0.8, 0.02),
scale: 0.9,
engine: Engine::Prop(0.93, 0.55),
decoy: false,
@@ -93,6 +126,7 @@ const DRONE_SPEC_GERBERA: DroneSpec = DroneSpec {
clearance: 15.0,
dive: 30.0,
warhead: 0,
accuracy: (1.5, 0.04),
scale: 1.1,
engine: Engine::Prop(1.03, 0.9),
decoy: true,
@@ -114,6 +148,7 @@ const DRONE_SPEC_KH101: DroneSpec = DroneSpec {
clearance: 12.0,
dive: 26.0,
warhead: 6,
accuracy: (1.3, 0.05),
scale: 1.6,
engine: Engine::Jet(-0.27, 1.4, 0.6),
decoy: false,
@@ -135,6 +170,7 @@ const DRONE_SPEC_KALIBR: DroneSpec = DroneSpec {
clearance: 15.0,
dive: 26.0,
warhead: 5,
accuracy: (1.3, 0.05),
scale: 1.5,
engine: Engine::Jet(-0.2, 1.5, 0.6),
decoy: false,
@@ -156,6 +192,7 @@ const DRONE_SPEC_KH22: DroneSpec = DroneSpec {
clearance: 40.0,
dive: 150.0,
warhead: 7,
accuracy: (1.6, 0.06),
scale: 1.8,
engine: Engine::Rocket(1.5, 1.3),
decoy: false,
@@ -177,6 +214,7 @@ const DRONE_SPEC_ZIRCON: DroneSpec = DroneSpec {
clearance: 30.0,
dive: 110.0,
warhead: 6,
accuracy: (1.5, 0.06),
scale: 1.4,
engine: Engine::Rocket(1.5, 1.1),
decoy: false,
@@ -198,6 +236,7 @@ const DRONE_SPEC_ISKANDER: DroneSpec = DroneSpec {
clearance: 0.0,
dive: 0.0,
warhead: 8,
accuracy: (1.4, 0.06),
scale: 1.8,
engine: Engine::Rocket(1.5, 1.6),
decoy: false,
@@ -219,6 +258,7 @@ const DRONE_SPEC_KINZHAL: DroneSpec = DroneSpec {
clearance: 0.0,
dive: 0.0,
warhead: 8,
accuracy: (1.5, 0.06),
scale: 1.7,
engine: Engine::Rocket(1.5, 1.5),
decoy: false,
@@ -240,6 +280,7 @@ const DRONE_SPEC_ORESHNIK: DroneSpec = DroneSpec {
clearance: 0.0,
dive: 0.0,
warhead: 0,
accuracy: (1.6, 0.08),
scale: 2.6,
engine: Engine::Rocket(1.5, 2.4),
decoy: false,
@@ -261,6 +302,7 @@ const DRONE_SPEC_ORESHNIKBLOCK: DroneSpec = DroneSpec {
clearance: 0.0,
dive: 0.0,
warhead: 4,
accuracy: (1.6, 0.08),
scale: 1.6,
engine: Engine::Rocket(1.0, 1.0),
decoy: false,
@@ -282,6 +324,7 @@ const DRONE_SPEC_ORESHNIKSUB: DroneSpec = DroneSpec {
clearance: 0.0,
dive: 0.0,
warhead: 3,
accuracy: (1.6, 0.08),
scale: 1.1,
engine: Engine::Rocket(1.0, 1.0),
decoy: false,
@@ -295,6 +338,7 @@ const DRONE_SPEC_ORESHNIKSUB: DroneSpec = DroneSpec {
const MISSILE_SPEC_PAC3: MissileSpec = MissileSpec {
model: "airdef:pac3",
launcher_blast: 0.8,
speed: 5.5,
accel: 0.35,
turn: 0.3,
@@ -315,6 +359,7 @@ const MISSILE_SPEC_PAC3: MissileSpec = MissileSpec {
const MISSILE_SPEC_M57E6: MissileSpec = MissileSpec {
model: "airdef:m57e6",
launcher_blast: 0.45,
speed: 5.0,
accel: 0.5,
turn: 0.32,
@@ -335,6 +380,7 @@ const MISSILE_SPEC_M57E6: MissileSpec = MissileSpec {
const MISSILE_SPEC_M48N6: MissileSpec = MissileSpec {
model: "airdef:m48n6",
launcher_blast: 1.8,
speed: 7.0,
accel: 0.5,
turn: 0.22,
@@ -355,6 +401,7 @@ const MISSILE_SPEC_M48N6: MissileSpec = MissileSpec {
const MISSILE_SPEC_M77N6: MissileSpec = MissileSpec {
model: "airdef:m77n6",
launcher_blast: 2.2,
speed: 9.0,
accel: 0.6,
turn: 0.22,
@@ -375,6 +422,7 @@ const MISSILE_SPEC_M77N6: MissileSpec = MissileSpec {
const MISSILE_SPEC_IRIST: MissileSpec = MissileSpec {
model: "airdef:irist_missile",
launcher_blast: 0.6,
speed: 7.0,
accel: 0.5,
turn: 0.35,
@@ -395,6 +443,7 @@ const MISSILE_SPEC_IRIST: MissileSpec = MissileSpec {
const MISSILE_SPEC_AMRAAM: MissileSpec = MissileSpec {
model: "airdef:amraam_missile",
launcher_blast: 0.5,
speed: 6.0,
accel: 0.45,
turn: 0.3,
@@ -415,6 +464,7 @@ const MISSILE_SPEC_AMRAAM: MissileSpec = MissileSpec {
const MISSILE_SPEC_M9M317: MissileSpec = MissileSpec {
model: "airdef:m48n6",
launcher_blast: 1.2,
speed: 6.5,
accel: 0.5,
turn: 0.25,
@@ -435,6 +485,7 @@ const MISSILE_SPEC_M9M317: MissileSpec = MissileSpec {
const MISSILE_SPEC_M9M338: MissileSpec = MissileSpec {
model: "airdef:m57e6",
launcher_blast: 0.4,
speed: 5.5,
accel: 0.6,
turn: 0.4,
@@ -455,6 +506,7 @@ const MISSILE_SPEC_M9M338: MissileSpec = MissileSpec {
const MISSILE_SPEC_P1SUN: MissileSpec = MissileSpec {
model: "airdef:p1sun",
launcher_blast: 0.1,
speed: 2.8,
accel: 0.12,
turn: 0.3,
@@ -474,6 +526,22 @@ const MISSILE_SPEC_P1SUN: MissileSpec = MissileSpec {
};
impl DroneKind {
pub const ALL: [DroneKind; 13] = [
DroneKind::Shahed,
DroneKind::Geran3,
DroneKind::Lancet,
DroneKind::Gerbera,
DroneKind::Kh101,
DroneKind::Kalibr,
DroneKind::Kh22,
DroneKind::Zircon,
DroneKind::Iskander,
DroneKind::Kinzhal,
DroneKind::Oreshnik,
DroneKind::OreshnikBlock,
DroneKind::OreshnikSub,
];
/// Its row of numbers from `catalog/specs.json`.
pub fn spec(self) -> &'static DroneSpec {
match self {