diff --git a/config/file_loader.lua b/config/file_loader.lua index caa0a1a8..3cbd4fac 100644 --- a/config/file_loader.lua +++ b/config/file_loader.lua @@ -22,7 +22,7 @@ return { 'modules.addons.advanced-starting-items', 'modules.addons.spawn-area', 'modules.addons.compilatron', - 'modules.addons.worn-paths', + 'modules.addons.scorched-earth', -- Config Files 'config.command_auth_admin', -- commands tagged with admin_only are blocked for non admins 'config.command_auth_roles', -- commands must be allowed via the role config diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg index 01a6e691..54e3a84a 100644 --- a/locale/en/commands.cfg +++ b/locale/en/commands.cfg @@ -9,5 +9,6 @@ chelp-format=/__1__ __2__ - __3__ __4__ chelp-alias=Alias: __1__ chelp-out-of-range=__1__ is an invalid page number. roles-higher-role=The role you tried to assign is higher than your highest. -roles-list=All roles are: +roles-list=All roles are: [color=__1__]__2__ +roles-list-player=[color=__1__]__2__ has: [color=__3__]__4__ roles-list-element=__1__, [color=__2__]__3__ \ No newline at end of file diff --git a/modules/commands/roles.lua b/modules/commands/roles.lua index 278f6c10..9ae0d0b8 100644 --- a/modules/commands/roles.lua +++ b/modules/commands/roles.lua @@ -32,18 +32,27 @@ end) Commands.new_command('list-roles','Lists all roles in they correct order') :add_param('player',true,'player') -:add_alias('lroles','roles') +:add_alias('lsroles','roles') :register(function(player,action_player,raw) local roles = Roles.config.order - if action_player then + local message = {'exp-commands.roles-list'} + if action_player ~= '' then roles = Roles.get_player_roles(action_player) end - local message = {'exp-commands.roles-list'} - for _,role_name in pairs(roles) do - local role = Roles.get_role_by_name(role_name) + for index,role in pairs(roles) do + role = Roles.get_role_from_any(role) local colour = role.custom_color or Colours.white colour = string.format('%d,%d,%d',colour.r,colour.g,colour.b) - message = {'exp-commands.roles-list-element',message,colour,role_name} + if index == 1 then + message = {'exp-commands.roles-list',colour,role.name} + if action_player ~= '' then + local player_colour = action_player.color + player_colour = string.format('%d,%d,%d',player_colour.r*255,player_colour.g*255,player_colour.b*255) + message = {'exp-commands.roles-list-player',player_colour,action_player.name,colour,role.name} + end + else + message = {'exp-commands.roles-list-element',message,colour,role.name} + end end return Commands.success(message) end) \ No newline at end of file