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:
parent
cfc0d585d9
commit
eb67fa1831
@ -89,7 +89,7 @@ local function regular(args)
|
|||||||
Game.player_print(format('%s is already a regular.', remove_target), Color.red)
|
Game.player_print(format('%s is already a regular.', remove_target), Color.red)
|
||||||
end
|
end
|
||||||
else
|
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)
|
game.print(format('%s promoted %s to regular.', Utils.get_actor(), remove_target), Color.yellow)
|
||||||
else
|
else
|
||||||
Game.player_print(format('%s is already a regular.', remove_target), Color.red)
|
Game.player_print(format('%s is already a regular.', remove_target), Color.red)
|
||||||
@ -109,14 +109,14 @@ local function probation(args)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if remove_target and add_target == 'remove' then
|
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)
|
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)
|
target_player.print('Your probation status has been removed. You may now perform functions as usual', Color.yellow)
|
||||||
else
|
else
|
||||||
Game.player_print(format('%s is not on probation.', remove_target), Color.red)
|
Game.player_print(format('%s is not on probation.', remove_target), Color.red)
|
||||||
end
|
end
|
||||||
else
|
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)
|
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)
|
target_player.print('You have been placed on probation. You have limited access to normal functions.', Color.yellow)
|
||||||
else
|
else
|
||||||
|
@ -266,7 +266,7 @@ end
|
|||||||
--- Sets a player's rank
|
--- Sets a player's rank
|
||||||
-- @param player_name <string>
|
-- @param player_name <string>
|
||||||
-- @param rank <number>
|
-- @param rank <number>
|
||||||
function Public.set_rank(player_name, rank)
|
function Public.set_player_rank(player_name, rank)
|
||||||
local actor = Utils.get_actor()
|
local actor = Utils.get_actor()
|
||||||
|
|
||||||
if Public.equal(player_name, rank) then
|
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)
|
--- Resets a player's rank to the lowest rank based on playtime (guest or auto_trust)
|
||||||
-- @param player_name <string>
|
-- @param player_name <string>
|
||||||
function Public.reset_rank(player_name)
|
function Public.reset_player_rank(player_name)
|
||||||
local actor = Utils.get_actor()
|
local actor = Utils.get_actor()
|
||||||
local guest_rank = Ranks.guest
|
local guest_rank = Ranks.guest
|
||||||
local auto_trusted = Ranks.auto_trusted
|
local auto_trusted = Ranks.auto_trusted
|
||||||
|
Loading…
Reference in New Issue
Block a user