MrxSupportDesignatorBeacon
Module: mrxsupportdesignatorbeacon.lua
Overview
MrxSupportDesignatorBeacon is the thrown-beacon designator subtype. It’s the simplest of the five — just a Create that stamps the beacon-specific fields plus a GetType. A beacon is a persistent object the strike can track (falling ordnance re-reads its live position — see MrxArtillery.TriggerFallingMissile), and the base GetTarget returns its uGuid so callers can remove it after the strike. Used by MrxArtillery, MrxCruiseMissile, MrxStrategicMissile, and MrxHARMStrike.
Inheritance
- Inherits from:
MrxSupportDesignator - Imports:
none
Instance pattern
Same class-factory pattern as MrxSupportDesignator, not per-uGuid — Create(self, oNewDesignator) builds a new table via setmetatable/__index, exactly like its parent. No OnActivate/Awake, no tInstance registry. It tracks the following key fields:
uOwner: The owner of the designator.bDesignateOnDeath: Indicates whether designation should occur on death.bDesignationComplete: Indicates whether the designation process is complete.sDesignationType: The type of designator, set to “Beacon Designator”.fValidationFunction: The validation function for the designator, set to nil.tCallbackList: A list of callbacks associated with the designator.sAATestLevel: The AA test level, set to “jammer”.nX,nY,nZ: Coordinates of the designator in the world.uGuid: The unique GUID of the designator.
Functions
Create(self, oNewDesignator)
Stamps the beacon fields onto a fresh (or passed-in) table, then setmetatables it to this module. Beacon-specific settings vs. the base: sDesignationType = "Beacon Designator", sAATestLevel = "jammer", bDesignateOnDeath = false, fValidationFunction = nil. Everything else (owner, coords, uGuid) is copied through from the prototype.
GetType(self)
Returns "beacon".
Events
None — this module subscribes to no engine events and schedules no timers. All lifecycle is driven by the base class’s callback list.
Module constants & tunables
Set inside Create (there are no module-level locals):
sDesignationType = "Beacon Designator"— the itemAirstrike.EquipDesignatorhands the player.sAATestLevel = "jammer"— a beacon strike is only denied by a jammer, not by ordinary AA (the strongest “always allowed unless jammed” setting among the five subtypes).bDesignateOnDeath = false— designation does not auto-complete if the beacon object is destroyed.
Notes for modders
- The
"jammer"AA level is the beacon’s defining trait: beacon-based strikes (artillery, cruise, strategic, HARM) ignore basic/medium/advanced AA and are only blocked by a jammer. ChangesAATestLevelinCreateto make them AA-blockable. fValidationFunctionis deliberatelynilhere — a beacon can be dropped anywhere. Assign one of the baseValidateGroundDropZone/ValidateWaterDropZonefunctions if you want placement restrictions.