HasFunction(func:Str, [mode:Int]):Bool

Check whether the ship has the given hull function.

Supported values for func are:

  • CloakedBays
  • Commander
  • DoubleBeamCharge
  • DoubleTorpedoCharge
  • Elusive
  • FullWeaponry
  • PlanetImmunity
  • ShieldGenerator
  • Squadron
  • TripleBeamKill

For values outside this set, returns EMPTY (future compatibility).

With mode=0 (default), returns the effective presence of the function. With mode=1, check the default/implied presence, e.g. HasFunction("Commander",1) will return True if the ship's hull has the Commander ability.

Since: PCC2 2.1

See also: Simulation Participant Properties