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

Fix outpost_builder, fix redmew_qol.

Add functions to donator and rank system to get full player tables.
This commit is contained in:
plague006 2019-02-08 16:54:23 -05:00 committed by Matthew Heguy
parent 4c2a2eafa0
commit a5fd1bce2e
4 changed files with 11 additions and 3 deletions

View File

@ -59,7 +59,7 @@ end
--- Returns the table of donators
-- @return <table>
function Public.get_donators()
function Public.get_donators_table()
return donators
end

View File

@ -148,6 +148,12 @@ end
-- Exposed functions
--- Returns the table of players in the ranking system
-- @return <table>
function Public.get_player_table()
return player_ranks
end
--- Returns the player's rank as a name.
-- @param player_name <string>
-- @return <string>

View File

@ -11,6 +11,7 @@ local Event = require 'utils.event'
local Utils = require 'utils.core'
local Global = require 'utils.global'
local table = require 'utils.table'
local Rank = require 'features.rank_system'
local config = global.config.redmew_qol
@ -75,7 +76,7 @@ local function pick_name()
return
end
local regulars = global.regulars
local regulars = Rank.get_player_table()
local reg
if table.size(regulars) == 0 then
reg = nil

View File

@ -5,6 +5,7 @@ local Event = require 'utils.event'
local Task = require 'utils.task'
local Retailer = require 'features.retailer'
local PlayerStats = require 'features.player_stats'
local Donator = require 'features.donator'
local RS = require 'map_gen.shared.redmew_surface'
local Server = require 'features.server'
local CrashSiteToast = require 'map_gen.maps.crash_site.crash_site_toast'
@ -1043,7 +1044,7 @@ local function do_capture_outpost(outpost_data)
return
end
local donators = global.donators
local donators = Donator.get_donators_table()
if next(donators) then
local donator = table.get_random_dictionary_entry(donators, true)
if donator then