Shared configuration

Config = {}          -- DO NOT EDIT THIS

Config.Debug = false -- boolean | true: Shows additional server and client logs, false: Normal production mode (recommended for live servers)

Config.Settings = {
  rentCollectionDay = 1,     -- number | Day of the week when rent is automatically collected (1 = Monday, 7 = Sunday).
  rentCollectionHour = 20,   -- number | Server time (24h) when rent processing starts.
  gracePeriodDays = 1,       -- number | How many days players have after a missed payment before eviction.
  warningIntervalDays = 1,   -- number | How often players receive rent warning notifications.
  sellbackPercentage = 0.75, -- number | Percentage refunded when a player sells a warehouse or box (0.75 = 75%).
  formatting = {
    currency = {
      locale = "en-US",    -- string | Locale used for currency formatting (e.g. "en-US").
      code = "USD",        -- string | ISO currency code for Intl formatting.
      symbol = "$",        -- string | Currency symbol displayed alongside values.
      position = "prefix", -- 'prefix'|'suffix' | Controls symbol placement relative to the number.
      space = false,       -- boolean | Inserts a non-breaking space between amount and symbol when true.
      precision = 0,       -- number | Default number of decimal places for formatted amounts.
      useGrouping = true   -- boolean | Enables thousands separator when true.
    },
    weight = {
      locale = "en-US",           -- string | Locale applied when formatting weight values.
      unit = "kg",                -- string | Unit label appended to the formatted weight.
      gramsPerUnit = 1000,        -- number | Conversion factor from stored grams to display unit.
      precision = 1,              -- number | Decimal places for values below the threshold.
      largeNumberThreshold = 100, -- number | Switch to large number precision at or above this value.
      largeNumberPrecision = 0,   -- number | Decimal places used when the threshold is exceeded.
      space = false,              -- boolean | Adds a non-breaking space between amount and unit when true.
      showUnit = true             -- boolean | When false, hides the unit suffix entirely.
    }
  }
}

Config.maxPlayerOwnedWarehouseBoxesGlobal = 6 -- number | Maximum number of boxes a single player can own across all warehouses (0 disables the limit)

Config.WarehouseBoxes = {
  ["small"] = {
    label = "Small box",   -- string | Display name of the box type
    slots = 25,            -- number | Number of inventory slots
    maxWeightKg = 50,      -- number | Maximum weight capacity in kilograms
    purchasePrice = 50000, -- number | One-time purchase price
    rentPrice = 3000,      -- number | Weekly rent price
    deposit = 9000         -- number | Security deposit for rentals
  },
  ["medium"] = {
    label = "Medium box",
    slots = 75,
    maxWeightKg = 150,
    purchasePrice = 125000,
    rentPrice = 6500,
    deposit = 19500
  },
  ["large"] = {
    label = "Large box",
    slots = 150,
    maxWeightKg = 300,
    purchasePrice = 250000,
    rentPrice = 12000,
    deposit = 36000
  }
}

--- @type table<string, WarehouseData>
Config.Warehouses = {
  ["east"] = {                                                -- string | Unique warehouse identifier
    id = 1,                                                   -- number | Unique numeric ID for the warehouse
    label = "Warehouse East",                                 -- string | Display name for the warehouse
    location = vector3(1190.7629, -1261.6384, 35.1485),       -- vector3 | Blip coordinates of the warehouse
    targetLocation = vector3(1190.7629, -1261.6384, 35.1485), -- vector3 | Interaction target coordinates
    maxOwnedWarehouses = 250,                                 -- number | Maximum number of boxes all players can own for this warehouse type
    maxPlayerOwnedWarehouseBoxes = 2,                         -- number | Maximum number of boxes a single player can own for this warehouse type (0 disables the limit)
    availableBoxTypes = { "small", "medium", "large" },       -- string[] | Available box types for this warehouse
    pricing = {
      purchasePrice = 50000,                                  -- number | One-time purchase price
      rentPrice = 3000,                                       -- number | Weekly rent price
      deposit = 9000,                                         -- number | Security deposit for rentals
    },
    blip = {
      enabled = true,           -- boolean | Whether the blip is enabled
      label = "Warehouse East", -- string | Blip name
      sprite = 478,             -- number | Blip sprite ID
      display = 4,              -- number | Blip display type
      scale = 0.85,             -- number | Blip scale
      color = 2,                -- number | Blip color
      shortRange = true         -- boolean | Whether the blip is short range
    },
    search = {
      allowedJobs = {
        ["police"] = 3, -- number | Minimum job grade required to search warehouses
      },
    }
  }
}

-- DO NOT TOUCH THIS!
for _, box in pairs(Config.WarehouseBoxes) do
  if box.maxWeightKg then
    box.maxWeight = math.floor(box.maxWeightKg * 1000)
  elseif box.maxWeight and box.maxWeight < 1000 then
    box.maxWeight = math.floor(box.maxWeight * 1000)
  end
end

return Config

Last updated