mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Adaptive Pollution Ageing (#277)
* Update research.lua * Update research.lua * Update research.lua * Update research.lua
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
pollution_ageing_by_research = false,
|
||||||
queue_amount = 3,
|
queue_amount = 3,
|
||||||
bonus = {
|
bonus = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
|
|||||||
@@ -43,9 +43,13 @@ local function research_notification(event)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if is_inf_res then
|
if is_inf_res then
|
||||||
|
if event.research.name == 'mining-productivity-4' and event.research.level > 4 then
|
||||||
if config.bonus.enabled 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.level * config.bonus.rate
|
||||||
event.research.force[config.bonus.name] = base_rate + event.research.force.technologies['mining-productivity-4'].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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user