feat: change future to assign roles to table

This commit is contained in:
oof2win2
2022-11-12 22:31:36 +01:00
committed by Cooldude2606
parent ceca8fbf00
commit 2d9cfd8e11
2 changed files with 13 additions and 12 deletions

View File

@@ -374,7 +374,9 @@ function Roles.assign_player(player, roles, by_player_name, skip_checks, silent)
if Roles.player_has_role(player, "Jail") then
local to_assign = JailOldRole.old_roles[valid_player.name] or {}
for _, role in ipairs(roles) do
table.insert(to_assign, role)
if not to_assign[role] then
to_assign[role] = 1
end
end
JailOldRole.old_roles[valid_player.name] = to_assign
return