⚙️Configuration

⚙️ Configuration

Config = {
    Debug = true,
    Framework = {
        name = "esx" -- esx, qbcore or qbox
    },
    AppStore = {
        name = 'MarinaEats',
        description = 'Connect with your business partners',
        defaultApp = true, -- OPTIONAL if set to true, app should be added without having to download it,
    },
    Categories = {
        {
            name = 'restaurant',
            label = 'Restaurant',
            icon = 'restaurant',
        },
        {
            name = 'business',
            label = 'Business',
            icon = 'business',
        },
        {
            name = 'bar',
            label = 'Bar',
            icon = 'bar',
        },
        {
            name = 'club',
            label = 'Club',
            icon = 'club',
        }
    },
    Language = {
        appTitle = 'MarinaEats.',
    }
}

⚙️ Framework Configuration

Framework = {}

function getMockedRestaurants()
    return {
        {
            store = 'burgershot',
            label = 'Burgershot',
            category = 'restaurant',
            posX = -1172.0322,
            posY = -882.6902,
            status = 'open',
        },
        {
            store = 'pearl',
            label = 'Pearl',
            category = 'restaurant',
            posX = -1039.0,
            posY = -2731.0,
            status = 'open',
        },
        {
            store = 'byk',
            label = 'Bey Kebab',
            category = 'restaurant',
            posX = -1039.0,
            posY = -2731.0,
            status = 'closed',
        },
        {
            store = 'club',
            label = 'Club',
            category = 'club',
            posX = -1039.0,
            posY = -2731.0,
            status = 'open',
        }
    }
end

---@class Restaurant
---@field id number
---@field name string
---@field label string
---@field category string
---@field posX number
---@field posY number
---@field opened boolean

if IsDuplicityVersion() then
    ---@return Restaurant[]
    Framework.getAllRestaurants = function()
        -- local restaurants = exports['fd_restaurants']:getBusinesses() --- this method is defined in the restaurant resource of fusiondev
        local restaurants = getMockedRestaurants()

        ---@type Restaurant[]
        local formattedRestaurants = {}
        for _, restaurant in ipairs(restaurants) do
            formattedRestaurants[#formattedRestaurants + 1] = {
                id = #formattedRestaurants + 1,
                name = restaurant.store,
                label = restaurant.label,
                category = restaurant.category,
                posX = restaurant.posX,
                posY = restaurant.posY,
                opened = restaurant.status == 'open'
            }
        end

        return formattedRestaurants;
    end
end

If you have any configuration questions or errors, feel free to open a ticket on our Discord!

Last updated