1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

Rename functions to be homogeneous

This commit is contained in:
plague006 2019-02-02 16:15:36 -05:00 committed by Matthew Heguy
parent cfc0d585d9
commit eb67fa1831
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -266,7 +266,7 @@ end
--- Sets a player's rank
-- @param player_name <string>
-- @param rank <number>
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 <string>
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