mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-02-15 13:53:13 +02:00
Stats fixes
This commit is contained in:
parent
49eb97e473
commit
a52eee7f49
@ -5,6 +5,7 @@ local Restart = require 'features.restart_command'
|
||||
local ShareGlobals = require 'map_gen.maps.april_fools.scenario.shared_globals'
|
||||
local ScoreTracker = require 'utils.score_tracker'
|
||||
local PlayerStats = require 'features.player_stats'
|
||||
local RS = require 'map_gen.shared.redmew_surface'
|
||||
local format_number = require 'util'.format_number
|
||||
|
||||
return function(config)
|
||||
@ -143,7 +144,7 @@ return function(config)
|
||||
local total_ore = 0
|
||||
local ore_totals_message = '('
|
||||
for ore_name in pairs(ore_products) do
|
||||
local count = game.forces["player"].get_item_production_statistics.get_input_count(ore_name)
|
||||
local count = game.forces["player"].get_item_production_statistics(RS.get_surface_name()).get_input_count(ore_name)
|
||||
total_ore = total_ore + count
|
||||
ore_totals_message = ore_totals_message..ore_name:gsub( "-ore", "")..": "..format_number(count, true)..", "
|
||||
end
|
||||
|
@ -7,6 +7,7 @@ local MapPoll = require 'map_gen.maps.danger_ores.modules.map_poll'
|
||||
local ShareGlobals = require 'map_gen.maps.danger_ores.modules.shared_globals'
|
||||
local ScoreTracker = require 'utils.score_tracker'
|
||||
local PlayerStats = require 'features.player_stats'
|
||||
local RS = require 'map_gen.shared.redmew_surface'
|
||||
local format_number = require 'util'.format_number
|
||||
|
||||
return function(config)
|
||||
@ -145,7 +146,7 @@ return function(config)
|
||||
local total_ore = 0
|
||||
local ore_totals_message = '('
|
||||
for ore_name in pairs(ore_products) do
|
||||
local count = game.forces["player"].get_item_production_statistics.get_input_count(ore_name)
|
||||
local count = game.forces["player"].get_item_production_statistics(RS.get_surface_name()).get_input_count(ore_name)
|
||||
total_ore = total_ore + count
|
||||
ore_totals_message = ore_totals_message..ore_name:gsub( "-ore", "")..": "..format_number(count, true)..", "
|
||||
end
|
||||
|
@ -553,7 +553,7 @@ function Restart.print_endgame_statistics()
|
||||
local total_ore = 0
|
||||
local ore_totals_message = '('
|
||||
for ore_name in pairs(ore_products) do
|
||||
local count = game.forces.player.get_item_production_statistics.get_input_count(ore_name)
|
||||
local count = game.forces.player.get_item_production_statistics(Public.surface().name).get_input_count(ore_name)
|
||||
total_ore = total_ore + count
|
||||
ore_totals_message = ore_totals_message..ore_name:gsub( '-ore', '')..': '..format_number(count, true)..', '
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user