1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-18 03:21:47 +02:00

Remove redundant check

This commit is contained in:
Matthew Heguy 2019-02-20 15:13:19 -05:00
parent 808c64a8e0
commit 6523efd040

View File

@ -260,12 +260,8 @@ function Public.increase_player_rank(player_name)
end
local new_rank_name = rank_name_lookup[new_rank]
if new_rank_name then
set_player_rank(player_name, new_rank)
return new_rank_name
else
return nil
end
set_player_rank(player_name, new_rank)
return new_rank_name
end
--- Take a player and attempts to increase their rank to the rank provided
@ -293,12 +289,8 @@ function Public.decrease_player_rank(player_name)
end
local new_rank_name = rank_name_lookup[new_rank]
if new_rank_name then
set_player_rank(player_name, new_rank)
return new_rank_name
else
return nil
end
set_player_rank(player_name, new_rank)
return new_rank_name
end
--- Take a player and attempts to decrease their rank to the rank provided