mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-11-06 09:09:26 +02:00
implemented enabled_player_list
This commit is contained in:
@@ -17,6 +17,10 @@ local simplex_noise = require 'map_gen.shared.simplex_noise'
|
|||||||
local Event = require 'utils.event'
|
local Event = require 'utils.event'
|
||||||
local market_items = require "cave_miner_market_items"
|
local market_items = require "cave_miner_market_items"
|
||||||
|
|
||||||
|
if global.scenario and global.config and global.config.player_list then
|
||||||
|
global.scenario.config.player_list.enable_coin_col = nil
|
||||||
|
end
|
||||||
|
|
||||||
local function create_cave_miner_button(player)
|
local function create_cave_miner_button(player)
|
||||||
local button = player.gui.top.add({ type = "sprite-button", name = "caver_miner_stats_toggle_button", sprite = "item/iron-axe" })
|
local button = player.gui.top.add({ type = "sprite-button", name = "caver_miner_stats_toggle_button", sprite = "item/iron-axe" })
|
||||||
button.style.minimal_height = 38
|
button.style.minimal_height = 38
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ global.scenario.variables.player_positions = {}
|
|||||||
global.player_walk_distances = {}
|
global.player_walk_distances = {}
|
||||||
global.scenario.variables.player_deaths = {}
|
global.scenario.variables.player_deaths = {}
|
||||||
global.scenario.config = {}
|
global.scenario.config = {}
|
||||||
|
global.scenario.config.player_list = {}
|
||||||
|
global.scenario.config.player_list.enable_coin_col = true
|
||||||
global.scenario.custom_functions = {}
|
global.scenario.custom_functions = {}
|
||||||
global.scenario.config.nuke_min_time_hours = 3 --how long a player must be on the server to be allowed to use the nuke
|
global.scenario.config.nuke_min_time_hours = 3 --how long a player must be on the server to be allowed to use the nuke
|
||||||
global.newline = '\n'
|
global.newline = '\n'
|
||||||
|
|||||||
@@ -437,18 +437,23 @@ local column_builders = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function get_default_player_settings()
|
local function get_default_player_settings()
|
||||||
return {
|
columns = {
|
||||||
columns = {
|
|
||||||
sprite_heading_name,
|
sprite_heading_name,
|
||||||
player_name_heading_name,
|
player_name_heading_name,
|
||||||
time_heading_name,
|
time_heading_name,
|
||||||
rank_heading_name,
|
rank_heading_name,
|
||||||
distance_heading_name,
|
distance_heading_name
|
||||||
--coin_heading_name,
|
}
|
||||||
deaths_heading_name,
|
local offset = 6
|
||||||
poke_name_heading_name,
|
if global.scenario.config.player_list.enable_coin_col then
|
||||||
report_heading_name
|
columns[6] = coin_heading_name
|
||||||
},
|
offset = 7
|
||||||
|
end
|
||||||
|
columns[offset] = deaths_heading_name,
|
||||||
|
columns[offset + 1] = poke_name_heading_name,
|
||||||
|
columns[offset + 2] = report_heading_name
|
||||||
|
return {
|
||||||
|
columns = columns,
|
||||||
sort = -3
|
sort = -3
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user