mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-09-21 17:04:00 +00:00
Address review on the role lookups
- player_has_any_permission and player_has_all_permission, matching the account checks the web ui has. - Roles are no longer sorted on the way out of every lookup. get_ordered_roles and the public sort_roles cover the two guis and the command which present roles in order, and the highest role is found with a single scan. - get_held_role_ids returns the list and the set it already built, rather than a second function rebuilding the set from the list. - get_player_names collects into a set before listing, so a player holding the role in both the synced and the local list is counted once. - The role metatable is registered directly under the plugin name, dropping the storage import. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
bea8d46c82
commit
8a15745cf8
@@ -214,7 +214,7 @@ define_tab(
|
||||
container.add{ type = "flow" }.style.height = 4
|
||||
|
||||
local role_names = {}
|
||||
for i, role in ipairs(Roles.get_player_roles(player)) do
|
||||
for i, role in ipairs(Roles.sort_roles(Roles.get_player_roles(player))) do
|
||||
role_names[i] = role.name
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user