Devices config

config/devices.lua
return {
    offsets = {
        rotation = {
            ["prop_cctv_cam_01a"] = vec3(-30, 0, 215),
            ["prop_cctv_cam_01b"] = vec3(-30, 0, 145),
            ["prop_cctv_cam_02a"] = vec3(-20, 0, 210),
            ["prop_cctv_cam_03a"] = vec3(0, 0, 135),
            ["prop_cctv_cam_04a"] = vec3(0, 0, 180),
            ["prop_cctv_cam_04b"] = vec3(0, 0, 180),
            ["prop_cctv_cam_04c"] = vec3(-20, 0, 180),
            ["prop_cctv_cam_05a"] = vec3(-20, 0, 180),
            ["prop_cctv_cam_06a"] = vec3(-20, 0, 180),
            ["prop_cctv_cam_07a"] = vec3(0, 0, 180),
            ["ba_prop_battle_cctv_cam_01a"] = vec3(-45, 0, -90),
            ["ba_prop_battle_cctv_cam_01b"] = vec3(-45, 0, 90),
            ["hei_prop_bank_cctv_01"] = vec3(-20, 0, 180),
        },
        position = {
            ["prop_cctv_cam_01a"] = vec3(0, -0.7, 0.2),
            ["prop_cctv_cam_01b"] = vec3(0, -0.7, 0.2),
            ["prop_cctv_cam_02a"] = vec3(0.15, -0.3, 0),
            ["prop_cctv_cam_03a"] = vec3(-0.4, -0.4, 0.35),
            ["prop_cctv_cam_04a"] = vec3(0, -0.75, 0.65),
            ["prop_cctv_cam_04b"] = vec3(0, -0.6, 0.5),
            ["prop_cctv_cam_04c"] = vec3(0, -0.25, -0.35),
            ["prop_cctv_cam_05a"] = vec3(0, -0.2, -0.4),
            ["prop_cctv_cam_06a"] = vec3(0, -0.1, 0.4),
            ["prop_cctv_cam_07a"] = vec3(0, 0, -0.2),
            ["ba_prop_battle_cctv_cam_01a"] = vec3(0.35, -0.35, 0),
            ["ba_prop_battle_cctv_cam_01b"] = vec3(-0.35, -0.35, 0),
            ["hei_prop_bank_cctv_01"] = vec3(0, 0, 0.4),
        }
    },

    ---@type string
    fallbackModel = 'prop_cctv_cam_06a',

    defaultFeaturesByType = {
        ['cctv'] = {},
        ['sensor'] = {
            range = 10.0,
            cooldown = 2 * 1000
        }
    },

    ---@type {time: number}
    placing = {
        time = 5000
    },

    ---@type {enabled: boolean, startingBattery: number, drainRate: number, drainInterval: number, lowBatteryThreshold: number, criticalBatteryThreshold: number}
    battery = {
        enabled = false,
        startingBattery = 100,
        drainRate = 1,
        drainInterval = 60 * 60 * 1000,
        lowBatteryThreshold = 20,
        criticalBatteryThreshold = 5,
        -- drainRateOffline = 0,

        rechargeTime = 5000,
        requiredItems = {
            {
                item = 'mountme_battery',
                amount = 1,
                removeOnRecharge = true
            }
        }
    },

    ---@type {enabled: boolean, installTime: number, requiredItems: table}
    solarPanel = {
        enabled = true,
        installTime = 10000,
        requiredItems = {
            {
                item = 'mountme_solar_panel',
                amount = 1,
                removeOnInstall = true
            }
        }
    },

    ---@type {time: number, type: 'cash' | 'item', price: number | string}
    repair = {
        time = 5000,
        type = 'cash',
        price = 100,
        -- requiredItems = {
        --     {
        --         item = 'mountme_repairkit',
        --         amount = 1,
        --         removeOnRepair = true
        --     }
        -- }
    },

    ---@type {time: number}
    destroy = {
        time = 5000,
        -- requiredItems = {
        --     {
        --         item = 'WEAPON_CROWBAR',
        --         amount = 1,
        --         removeOnDestroy = true
        --     }
        -- }
    },

    items = {
        ['cctv'] = {
            type = 'cctv',
            model = 'prop_cctv_cam_06a',
            limits = {
                fov = {
                    default = 60,
                    min = 20,
                    max = 60
                },
                rotation = {
                    maxAngle = 60
                }
            },
            battery = {
                capacity = 100,
                drainRate = 1,
                drainRateOffline = 0,
                rechargeItems = {
                    {
                        item = 'mountme_battery',
                        amount = 1,
                        removeOnRecharge = true
                    }
                },
                allowSolarPanel = true
            }
        },
        ['cctv1'] = {
            type = 'cctv',
            model = 'prop_cctv_cam_07a',
            limits = {
                fov = {
                    default = 60,
                    min = 20,
                    max = 60
                },
                rotation = {
                    maxAngle = 180
                }
            },
            battery = {
                capacity = 100,
                drainRate = 1.5,
                drainRateOffline = 0,
                rechargeItems = {
                    {
                        item = 'mountme_battery',
                        amount = 2,
                        removeOnRecharge = true
                    }
                },
                allowSolarPanel = true
            }
        },
        ['cctv2'] = {
            type = "cctv",
            model = "prop_cctv_cam_04c",
            limits = {
                fov = {
                    default = 60,
                    min = 20,
                    max = 60
                },
                rotation = {
                    maxAngle = 180
                }
            },
            battery = {
                capacity = 100,
                drainRate = 1,
                drainRateOffline = 0,
                allowSolarPanel = true
            }
        },
        ['spycam'] = {
            type = "cctv",
            model = "prop_spycam1",
            limits = {
                fov = {
                    default = 60,
                    min = 20,
                    max = 60
                },
                rotation = {
                    maxAngle = 10
                },
                initialRotationAddition = 180
            },
            battery = {
                capacity = 50,
                drainRate = 2,
                drainRateOffline = 0.5,
                rechargeItems = {
                    {
                        item = 'mountme_battery',
                        amount = 1,
                        removeOnRecharge = true
                    }
                },
                allowSolarPanel = true
            }
        },
        ['motion_sensor'] = {
            type = 'sensor',
            model = "prop_motionsens2",
            battery = {
                capacity = 100,
                drainRate = 0.5,
                drainRateOffline = 0,
                allowSolarPanel = true
            }
        }
    }
}