Airbase#

Airbase represents airdromes, helipads, and ships with flight decks or landing pads. It extends CoalitionObject (and, transitively, Object).

class Airbase#

Inherits all member functions of CoalitionObject and Object.

Static functions#

static getByName(name)#

Returns the Airbase with the given name, or nil if it does not exist.

Parameters:

name (string) – Airbase name.

Returns:

The matching airbase, or nil.

Return type:

Airbase

static getDescByName(typeName)#

Returns a description table for an airbase type.

Parameters:

typeName (string) – Airbase type name.

Returns:

Description table.

Return type:

table

Member functions#

getCallsign()#

Returns the airbase’s callsign.

Returns:

Callsign.

Return type:

string

getUnit(unitNumber)#

For ship/carrier airbases, returns the underlying Unit at the given unit number.

Parameters:

unitNumber (number) – Unit number.

Returns:

The underlying unit.

Return type:

Unit

getID()#

Returns the airbase’s numeric ID.

Returns:

Airbase ID.

Return type:

number

getCategoryEx()#

Returns the airbase’s more specific category (see Airbase.Category). Equivalent to airbase:getDesc().category.

Returns:

Airbase category.

Return type:

number

getParking(available)#

Returns a table of parking spots at the airbase, optionally filtered to only currently-available spots.

Parameters:

available (boolean) – Optional; if true, only return free parking spots.

Returns:

Parking spot descriptor tables.

Return type:

table

getRunways()#

Returns a table describing the airbase’s runways.

Returns:

Runway descriptor tables.

Return type:

table

getTechObjectPos(objectType, index)#

Returns the position of a named technical object (e.g. a specific building) at the airbase.

Parameters:
  • objectType (string) – Technical object type name.

  • index (number) – Index, if multiple objects of that type exist.

Returns:

Position of the technical object.

Return type:

table

getDispatcherTowerPos()#

Returns the position of the airbase’s control tower.

Returns:

Tower position.

Return type:

table

getRadioSilentMode()#

Returns whether the airbase’s ATC is currently in radio-silent mode.

Returns:

Whether radio silence is active.

Return type:

boolean

setRadioSilentMode(silent)#

Enables or disables radio-silent mode for the airbase’s ATC.

Parameters:

silent (boolean) – Whether radio silence should be active.

autoCapture(enabled)#

Enables or disables automatic coalition capture of the airbase (based on nearby ground forces).

Parameters:

enabled (boolean) – Whether auto-capture should be enabled.

autoCaptureIsOn()#

Returns whether auto-capture is currently enabled for the airbase.

Returns:

Whether auto-capture is enabled.

Return type:

boolean

setCoalition(coalitionId)#

Forcibly sets the airbase’s owning coalition, bypassing normal capture logic.

Parameters:

coalitionId (number) – New owning coalition (see coalition.side).

getWarehouse()#

Returns the Warehouse associated with this airbase.

Returns:

The airbase’s warehouse.

Return type:

Warehouse

Enumerators#

Airbase.Category identifies the specific airbase category (via airbase:getDesc().categorynot airbase:getCategory(), which always returns Object.Category.BASE):

Value

Meaning

Airbase.Category.AIRDROME

Land airdrome (0)

Airbase.Category.HELIPAD

Helipad/FARP (1)

Airbase.Category.SHIP

Ship with flight deck (2)

Footnotes#