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:
parent
102318aaaf
commit
5d78593876
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user