feat(battle): add Nuclear Escalation tactical and strategic nuclear carriers
Connect stage-unlocked nuclear carriers to Air Realistic sub-mode 103 (Nuclear Escalation) and expose a player toggle for stage-3 megaton strategic bombers: - Dataset & profile grants: extract tactical killstreak nuclear carriers (5 kt / 30 kt Nuclear Escalation presets) and megaton strategic bombers (nt_b_52h / nt_tu_95m) from wpcost.blk in battle-spawn-rules (v4), and grant their required weapon/modification records in support-plane-modifications.ts. - Server slot selection & tuning: add nuclearEscalationStrategicBombers (default true) in tuning/battle.jsonc, battle-tuning.ts, and launcher-tuning.ts; add one nation-matched tactical carrier per session rank bracket (with allowedWeapons limited to its Nuclear Escalation presets) and, when enabled, one stage-3 strategic bomber to extraBattleSlots; include modeTag in battle launch notifications. - GUI patch & launcher UI: add battle/filter-extra-slot-weapons on scripts/weaponry/weaponryinfo.nut to filter extra-slot presets by allowedWeapons (hiding Ground RB zero-yield presets at stage 0) and to fall back to LocalMP launch metadata for GameModeRestrictions; expose the strategic bomber toggle in the launcher Battle tuning section. Verified with root and launcher typechecks, launcher build, full check-gui on 2.61.0.37 and 2.61.0.58 (49 patches across 37 .nut files), and slot selection check across all 10 nations on 2.61.0.58 stock data; pending in-game verification.
This commit is contained in:
1 parent
f1ec034994
commit
d0e4797fe7
19 files changed
+247
-15
No files matched your search
@@ -31,7 +31,10 @@ export interface SupportUnitEquipmentGrants {
|
||||
}
|
||||
|
||||
export function supportPlaneModifications(
|
||||
rules: Pick<BattleSpawnRulesData, 'supportPlanes' | 'strikeUcavs'>,
|
||||
rules: Pick<
|
||||
BattleSpawnRulesData,
|
||||
'supportPlanes' | 'strikeUcavs' | 'nuclearEscalationTacticalCarriers' | 'nuclearEscalationStrategicBombers'
|
||||
>,
|
||||
catalogue: EquipmentCatalogue,
|
||||
): SupportUnitEquipmentGrants {
|
||||
const seenMods = new Set<string>();
|
||||
@@ -53,21 +56,34 @@ export function supportPlaneModifications(
|
||||
weapons.push({ vehicle, weapon, count: Math.max(1, count) });
|
||||
};
|
||||
|
||||
const grantWeaponPreset = (unitName: string, weapon: string): void => {
|
||||
const facts = catalogue.weapon(unitName, weapon);
|
||||
addWeapon(unitName, weapon, facts?.maxCount ?? 1);
|
||||
for (const modification of facts?.requires ?? []) addMod(unitName, modification);
|
||||
for (const container of facts?.sumWeapons ?? []) {
|
||||
const containerFacts = catalogue.weapon(unitName, container);
|
||||
addWeapon(unitName, container, containerFacts?.maxCount ?? 1);
|
||||
for (const modification of containerFacts?.requires ?? []) addMod(unitName, modification);
|
||||
}
|
||||
};
|
||||
|
||||
for (const presets of Object.values(rules.supportPlanes)) {
|
||||
for (const preset of presets) {
|
||||
for (const { unitName, weapon } of Object.values(preset.units)) {
|
||||
const facts = catalogue.weapon(unitName, weapon);
|
||||
addWeapon(unitName, weapon, facts?.maxCount ?? 1);
|
||||
for (const modification of facts?.requires ?? []) addMod(unitName, modification);
|
||||
for (const container of facts?.sumWeapons ?? []) {
|
||||
const containerFacts = catalogue.weapon(unitName, container);
|
||||
addWeapon(unitName, container, containerFacts?.maxCount ?? 1);
|
||||
for (const modification of containerFacts?.requires ?? []) addMod(unitName, modification);
|
||||
}
|
||||
grantWeaponPreset(unitName, weapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const carrier of [
|
||||
...rules.nuclearEscalationTacticalCarriers,
|
||||
...rules.nuclearEscalationStrategicBombers,
|
||||
]) {
|
||||
for (const weapon of carrier.weapons) {
|
||||
grantWeaponPreset(carrier.unitName, weapon.name);
|
||||
}
|
||||
}
|
||||
|
||||
for (const ucav of rules.strikeUcavs) {
|
||||
const vehicle = catalogue.vehicle(ucav.unitName);
|
||||
if (!vehicle) continue;
|
||||
|
||||
Reference in new issue
Block a user