From 5707bd4bec017b273b32551187d259f39cc0c45d Mon Sep 17 00:00:00 2001 From: RedRafe <93430988+RedRafe@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:41:14 +0100 Subject: [PATCH] Fix custom effects on technology effects reset (#1446) --- .../maps/danger_ores/modules/robot_cargo_capacity.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/map_gen/maps/danger_ores/modules/robot_cargo_capacity.lua b/map_gen/maps/danger_ores/modules/robot_cargo_capacity.lua index 0f680d6c..672f996d 100644 --- a/map_gen/maps/danger_ores/modules/robot_cargo_capacity.lua +++ b/map_gen/maps/danger_ores/modules/robot_cargo_capacity.lua @@ -27,3 +27,12 @@ Event.add(defines.events.on_research_finished, function(event) '[color=green][font=var]+'..force.worker_robots_storage_bonus..'[/font][/color]' }, '\t\t')) end) + +Event.add(defines.events.on_technology_effects_reset, function(event) + local force = event.force + if not (force and force.valid) then + return + end + force.worker_robots_storage_bonus = force.worker_robots_storage_bonus + math.floor(force.mining_drill_productivity_bonus / 0.1) + force.mining_drill_productivity_bonus = 0 +end)