From eb67fa18312024959c4fd7a5b9efa9f766412357 Mon Sep 17 00:00:00 2001 From: plague006 Date: Sat, 2 Feb 2019 16:15:36 -0500 Subject: [PATCH] Rename functions to be homogeneous --- features/admin_commands.lua | 6 +++--- features/rank_system.lua | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/features/admin_commands.lua b/features/admin_commands.lua index 130a89d4..ea7817bd 100644 --- a/features/admin_commands.lua +++ b/features/admin_commands.lua @@ -89,7 +89,7 @@ local function regular(args) Game.player_print(format('%s is already a regular.', remove_target), Color.red) end else - if Rank.set_rank(add_target, Ranks.regular) then + if Rank.set_player_rank(add_target, Ranks.regular) then game.print(format('%s promoted %s to regular.', Utils.get_actor(), remove_target), Color.yellow) else Game.player_print(format('%s is already a regular.', remove_target), Color.red) @@ -109,14 +109,14 @@ local function probation(args) end if remove_target and add_target == 'remove' then - if Rank.reset_rank(remove_target) then + if Rank.reset_player_rank(remove_target) then game.print(format('%s took %s off of probation.', Utils.get_actor(), remove_target), Color.yellow) target_player.print('Your probation status has been removed. You may now perform functions as usual', Color.yellow) else Game.player_print(format('%s is not on probation.', remove_target), Color.red) end else - if Rank.set_rank(add_target, Ranks.probation) then + if Rank.set_player_rank(add_target, Ranks.probation) then game.print(format('%s put %s on probation.', Utils.get_actor(), remove_target), Color.yellow) target_player.print('You have been placed on probation. You have limited access to normal functions.', Color.yellow) else diff --git a/features/rank_system.lua b/features/rank_system.lua index 4d0d4ae4..b7585b16 100644 --- a/features/rank_system.lua +++ b/features/rank_system.lua @@ -266,7 +266,7 @@ end --- Sets a player's rank -- @param player_name -- @param rank -function Public.set_rank(player_name, rank) +function Public.set_player_rank(player_name, rank) local actor = Utils.get_actor() if Public.equal(player_name, rank) then @@ -280,7 +280,7 @@ end --- Resets a player's rank to the lowest rank based on playtime (guest or auto_trust) -- @param player_name -function Public.reset_rank(player_name) +function Public.reset_player_rank(player_name) local actor = Utils.get_actor() local guest_rank = Ranks.guest local auto_trusted = Ranks.auto_trusted