mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-16 21:46:03 +01:00
fix(groups): group data & client getting
This commit is contained in:
@@ -15,7 +15,7 @@ Config = {
|
|||||||
randomUnlockedVehicleChance = GetConvarInt("core:randomUnlockedVehicleChance", 30),
|
randomUnlockedVehicleChance = GetConvarInt("core:randomUnlockedVehicleChance", 30),
|
||||||
requireKeys = GetConvarInt("core:requireKeys", 1) == 1,
|
requireKeys = GetConvarInt("core:requireKeys", 1) == 1,
|
||||||
useInventoryForKeys = GetConvarInt("core:useInventoryForKeys", 1) == 1,
|
useInventoryForKeys = GetConvarInt("core:useInventoryForKeys", 1) == 1,
|
||||||
groups = {},
|
groups = json.decode(GetConvar("core:groups", "[]")),
|
||||||
compatibility = json.decode(GetConvar("core:compatibility", "[]")),
|
compatibility = json.decode(GetConvar("core:compatibility", "[]")),
|
||||||
lockpickTries = GetConvarInt("core:lockpickTries", 3)
|
lockpickTries = GetConvarInt("core:lockpickTries", 3)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -405,16 +405,18 @@ local function createCharacterTable(info)
|
|||||||
function self.addGroup(name, rank, customGroup, isJob)
|
function self.addGroup(name, rank, customGroup, isJob)
|
||||||
local groupRank = tonumber(rank) or 1
|
local groupRank = tonumber(rank) or 1
|
||||||
local groupInfo = Config.groups?[name] or {}
|
local groupInfo = Config.groups?[name] or {}
|
||||||
local rankData = groupInfo?.ranks?[groupRank]
|
local rankData = groupInfo?.ranksData?[groupRank]
|
||||||
|
|
||||||
local groupLabel = groupInfo?.label or name
|
local groupLabel = groupInfo?.label or name
|
||||||
local rankName = rankData?.label or groupRank
|
local rankName = rankData?.label or groupRank
|
||||||
local isBoss = rankData?.isBoss or false
|
local isBoss = rankData?.isBoss or false
|
||||||
|
local metadata = groupInfo?.metadata or {}
|
||||||
|
|
||||||
if customGroup then
|
if customGroup then
|
||||||
if customGroup.label then groupLabel = customGroup.label end
|
if customGroup.label then groupLabel = customGroup.label end
|
||||||
if customGroup.rankName then rankName = customGroup.rankName end
|
if customGroup.rankName then rankName = customGroup.rankName end
|
||||||
if customGroup.isBoss ~= nil then isBoss = customGroup.isBoss end
|
if customGroup.isBoss ~= nil then isBoss = customGroup.isBoss end
|
||||||
|
if customGroup.metadata then metadata = customGroup.metadata end
|
||||||
end
|
end
|
||||||
|
|
||||||
if isJob then
|
if isJob then
|
||||||
@@ -429,7 +431,8 @@ local function createCharacterTable(info)
|
|||||||
rankName = rankName,
|
rankName = rankName,
|
||||||
rank = groupRank,
|
rank = groupRank,
|
||||||
isJob = isJob,
|
isJob = isJob,
|
||||||
isBoss = isBoss
|
isBoss = isBoss,
|
||||||
|
metadata = metadata
|
||||||
}
|
}
|
||||||
|
|
||||||
if not isJob then
|
if not isJob then
|
||||||
|
|||||||
Reference in New Issue
Block a user