1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-10 00:43:27 +02:00
ComfyFactorio/modules/backpack_research.lua

13 lines
521 B
Lua
Raw Normal View History

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)
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
2021-03-24 21:14:55 +02:00
Event.add(defines.events.on_research_finished, on_research_finished)