From 1042897d0ffbd7a0d274f0d24c0052d6497ba90c Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Fri, 3 Jan 2025 23:32:34 +0000 Subject: [PATCH] Fix comparator for all role types --- exp_scenario/module/commands/_types.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/exp_scenario/module/commands/_types.lua b/exp_scenario/module/commands/_types.lua index d2ade8fa..94f3e950 100644 --- a/exp_scenario/module/commands/_types.lua +++ b/exp_scenario/module/commands/_types.lua @@ -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)