Turret = Turret or {}
Turret.ContainerAccess = {}

function Turret.ContainerAccess.TopCon(vehicle, part, chr)
    if chr:getVehicle() then
        return false
    end
    local AmmoBox = vehicle:getPartById("AmmoCan")
    if AmmoBox and AmmoBox:getInventoryItem() then
        if not vehicle:isInArea(part:getArea(), chr) then
            return false
        end
        local modData = vehicle:getModData()
        if not modData.User then
            modData.User = {}
            modData.User[chr:getUsername()] = true
            return true
        else

            if not modData.User[chr:getUsername()] then
                return false
            end
        end
        return true
    else
        return false
    end
end
