Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion exp_legacy/module/config/research.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,19 @@ return {
rate = 5,
limit = 20,
},
file_name = "log/research.log",
file = {
name = "log/research.log",
final_res = {
["base"] = {
["name"] = "mining-productivity-4",
["level"] = 4
},
["space-age"] = {
["name"] = "mining-productivity-3",
["level"] = 3
}
}
},
milestone = {
["base"] = {
["automation"] = 600,
Expand Down
4 changes: 2 additions & 2 deletions exp_scenario/module/gui/research_milestones.lua
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ function Elements.container.append_log_line(force)
result_data[name] = force_data[research_index]
end

write_file(config.file_name, table_to_json(result_data) .. "\n", true, 0)
write_file(config.file.name, table_to_json(result_data) .. "\n", true, 0)
end

--- Add the element to the left flow with a toolbar button
Expand All @@ -351,7 +351,7 @@ local function on_research_finished(event)

-- Check if the log should be updated and print a message to chat
if config.inf_res[config.mod_set][research_name] then
local log_requirement = config.bonus_inventory.log[config.mod_set]
local log_requirement = config.file.final_res[config.mod_set]
if research_name == log_requirement.name and research_level == log_requirement.level + 1 then
Elements.container.append_log_line(force)
end
Expand Down
Loading