Adaptive Pollution Ageing (#277)

* Update research.lua

* Update research.lua

* Update research.lua

* Update research.lua
This commit is contained in:
2024-02-04 00:12:30 +09:00
committed by GitHub
parent 9746ba111a
commit cd87bbb701
2 changed files with 8 additions and 3 deletions

View File

@@ -3,6 +3,7 @@
return {
enabled = true,
pollution_ageing_by_research = false,
queue_amount = 3,
bonus = {
enabled = false,

View File

@@ -43,9 +43,13 @@ local function research_notification(event)
end
if is_inf_res then
if event.research.name == 'mining-productivity-4' and event.research.level > 4 then
if config.bonus.enabled then
if event.research.name == 'mining-productivity-4' and event.research.force.technologies['mining-productivity-4'].level > 4 then
event.research.force[config.bonus.name] = base_rate + event.research.force.technologies['mining-productivity-4'].level * config.bonus.rate
event.research.force[config.bonus.name] = base_rate + event.research.level * config.bonus.rate
end
if config.pollution_ageing_by_research then
game.map_settings.pollution.ageing = math.min(10, event.research.level / 5)
end
end