2019-02-10 06:16:01 +02:00
|
|
|
-- backpack research -- researching mining efficiency increases your backpack capacity (inventory slots)
|
|
|
|
|
2021-03-24 21:14:55 +02:00
|
|
|
local Event = require 'utils.event'
|
2019-02-10 06:16:01 +02:00
|
|
|
|
|
|
|
local function on_research_finished(event)
|
2022-08-08 00:08:04 +02:00
|
|
|
local force = event.research.force
|
|
|
|
local toolbelt_bonus = (force.technologies['toolbelt'].researched and 10) or 0
|
|
|
|
local prod_bonus = force.mining_drill_productivity_bonus * 100
|
|
|
|
force.character_inventory_slots_bonus = prod_bonus + toolbelt_bonus
|
2019-02-10 06:16:01 +02:00
|
|
|
end
|
2020-05-06 22:07:00 +02:00
|
|
|
|
2021-03-24 21:14:55 +02:00
|
|
|
Event.add(defines.events.on_research_finished, on_research_finished)
|