CollectIntelligence

Collect intelligence data

Usage: Used in 8 task(s)

Lua Implementation

-- Collect Intelligence
function execute(params)
    local intelType = params.intel_type
    local target = params.target_area

    local intelData = {
        type = intelType,
        location = target,
        collector = this:getObjectId(),
        timestamp = vrf.getSimulationTime(),
        data = {}
    }

    -- Collect based on type
    if intelType == "SIGINT" then
        intelData.data = this:getSystem("ESM"):collectSignals()
    elseif intelType == "IMINT" then
        intelData.data = this:getSystem("Camera"):captureImagery(target)
    elseif intelType == "ELINT" then
        intelData.data = this:getSystem("ESM"):collectEmissions()
    end

    this:setStateProperty("CollectedIntel", intelData)
    return true
end