mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Add asserts to auto research queue (#385)
* Update research.lua * Use asserts rather than ignore errors --------- Co-authored-by: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com>
This commit is contained in:
@@ -71,7 +71,9 @@ local function on_research_finished(event)
|
||||
if not research.res_queue_enable then return end
|
||||
|
||||
local force = event.research.force
|
||||
if force.technologies[config.bonus_inventory.res[config.mod_set].name].level > config.bonus_inventory.res[config.mod_set].level then
|
||||
local research = assert(config.bonus_inventory.res[config.mod_set], "Unknown mod set: " .. tostring(config.mod_set))
|
||||
local technology = assert(force.technologies[research.name], "Unknown technology: " .. tostring(research.name))
|
||||
if technology.level > research.level then
|
||||
module.res_queue(force, event.by_script)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user