Merge branch 'explosivegaming:main' into aperx

This commit is contained in:
2025-01-04 13:10:26 +09:00
committed by GitHub

View File

@@ -1,6 +1,7 @@
--[[-- Command Types - Roles
The data types that are used with exp_roles
A lower role index indicates it is more privileged
Adds parsers for:
role
@@ -30,7 +31,7 @@ types.lower_role =
--- @cast result any TODO role is not a defined type
local player_highest = highest_role(player)
if player_highest.index < result.index then
if player_highest.index >= result.index then
return invalid{ "exp-commands-parse_role.lower-role" }
else
return valid(result)
@@ -46,7 +47,7 @@ types.lower_role_player =
local other_highest = highest_role(result)
local player_highest = highest_role(player)
if player_highest.index < other_highest.index then
if player_highest.index >= other_highest.index then
return invalid{ "exp-commands-parse_role.lower-role-player" }
else
return valid(result)
@@ -62,7 +63,7 @@ types.lower_role_player_online =
local other_highest = highest_role(result)
local player_highest = highest_role(player)
if player_highest.index < other_highest.index then
if player_highest.index >= other_highest.index then
return invalid{ "exp-commands-parse_role.lower-role-player" }
else
return valid(result)
@@ -78,7 +79,7 @@ types.lower_role_player_alive =
local other_highest = highest_role(result)
local player_highest = highest_role(player)
if player_highest.index < other_highest.index then
if player_highest.index >= other_highest.index then
return invalid{ "exp-commands-parse_role.lower-role-player" }
else
return valid(result)