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

is_donator_perk function name changed to player_has_donator_perk

This commit is contained in:
grilledham 2018-09-11 00:20:12 +01:00
parent 102318aaaf
commit 5d78593876
3 changed files with 4 additions and 4 deletions

View File

@ -93,7 +93,7 @@ local function get_rank_level(player)
end
local name = player.name
if UserGroups.is_donator_perk(name, rank_perk_flag) then
if UserGroups.player_has_donator_perk(name, rank_perk_flag) then
return 3
elseif UserGroups.is_regular(name) then
return 2

View File

@ -66,7 +66,7 @@ local function on_pre_death(event)
local player_name = player.name
if UserGroups.is_donator_perk(player_name, train_perk_flag) then
if UserGroups.player_has_donator_perk(player_name, train_perk_flag) then
saved_players[player_index] = game_tick
save_player(player)

View File

@ -72,13 +72,13 @@ function Module.is_donator(player_name)
return global.donators[player_name]
end
function Module.is_donator_perk(player_name, perk)
function Module.player_has_donator_perk(player_name, perk_flag)
local d = global.donators[player_name]
if not d then
return false
end
return bit32.band(d, perk) == perk
return bit32.band(d, perk_flag) == perk_flag
end
Event.add(