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.
12 lines
388 B
Plaintext
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)
|