diff --git a/changelog.txt b/changelog.txt index e7546c9..08380d7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ --------------------------------------------------------------------------------------------------- -Version: 0.0.1 +Version: 1.0.1 +Date: 18.09.2024 + Bugfixes: + - Recompute max_mining_drill_radius if the mod configuration changes +--------------------------------------------------------------------------------------------------- +Version: 1.0.0 Date: 15.09.2024 Features: - Initial release diff --git a/control.lua b/control.lua index 68331a5..ad58130 100644 --- a/control.lua +++ b/control.lua @@ -14,8 +14,6 @@ script.on_init(function() global.active.mining_drills = {} -- [Tick:Entity] global.passive = {} global.passive.mining_drills = {} -- [Entity:true] - - recompute_max_mining_drill_radius() end) script.on_load(function() @@ -27,4 +25,8 @@ script.on_load(function() end end) +script.on_configuration_changed(function(data) + recompute_max_mining_drill_radius() +end) + script.on_event(defines.events.on_resource_depleted, on_resource_depleted) diff --git a/info.json b/info.json index 2a0a715..2fc1a2e 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "Teardown", - "version": "1.0.0", + "version": "1.0.1", "title": "Teardown", "description": "Automate the removal of depleted miners", "author": "David Skrundz",