Files
WT-Offline/patches/gui/battle/lock-single-slot-lineup/replace-mask.nut
T
N0VAN0M4LY 7ba66340b6 fix(battle): enforce single-sortie Air Realistic rules
Carry the queued aircraft and crew index into LocalMP, apply the native single-spawn limits to players and aircraft bots, and disable spares for single-slot modes.

Verified with root and launcher type checks, check-patches and check-gui for 2.61.0.37 and 2.61.0.43, and an isolated launch-payload check.
2026-12-01 12:05:42 +08:00

12 lines
388 B
Plaintext

function getWtoSelectedSlot() {
return require("nestdb").ndbTryRead(["wto", "activeBattle"])?.selectedSlot
}
function getDisabledSlotsMask() {
let mask = getNativeDisabledSlotsMask()
let selected = getWtoSelectedSlot()
return selected == null ? mask : mask | ~(1 << selected.idInCountry)
}
let isSpareAircraftInSlot = @(idInCountry) is_bit_set(getSpareSlotsMask(), idInCountry)