mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
.
This commit is contained in:
@@ -311,10 +311,12 @@ end)
|
|||||||
|
|
||||||
Event.add(defines.events.on_research_started, function(event)
|
Event.add(defines.events.on_research_started, function(event)
|
||||||
local r = event.research
|
local r = event.research
|
||||||
local rn = config.limit_res[r.name]
|
local rq = r.force.research_queue
|
||||||
|
|
||||||
if rn and r.level > rn then
|
for i = #rq, 1, -1 do
|
||||||
r.force.cancel_current_research()
|
if config.limit_res[rq[i]] and rq[i].level > config.limit_res[rq[i]] then
|
||||||
|
r.force.cancel_current_research()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user