mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
.
This commit is contained in:
@@ -114,6 +114,11 @@ local function research_notification(event)
|
|||||||
event.research.force[config.bonus_inventory.name] = event.research.level * config.bonus_inventory.rate
|
event.research.force[config.bonus_inventory.name] = event.research.level * config.bonus_inventory.rate
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if config.limit_res[event.research.name] and event.research.level > config.limit_res[event.research.name] then
|
||||||
|
event.research.enabled = false
|
||||||
|
event.research.visible_when_disabled = false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function research_gui_update()
|
local function research_gui_update()
|
||||||
@@ -273,17 +278,6 @@ Event.add(defines.events.on_research_finished, function(event)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Event.add(defines.events.on_research_started, function(event)
|
|
||||||
local r = event.research
|
|
||||||
local rq = r.force.research_queue
|
|
||||||
|
|
||||||
for i = #rq, 1, -1 do
|
|
||||||
if config.limit_res[rq[i]] and rq[i].level > config.limit_res[rq[i]] then
|
|
||||||
event.research.force.research_queue[i] = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
Event.on_nth_tick(60, function()
|
Event.on_nth_tick(60, function()
|
||||||
local current_time = research_time_format(game.tick)
|
local current_time = research_time_format(game.tick)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user