From: Someone Date: Wed, 18 Dec 2024 23:25:42 +0000 (+0100) Subject: RELEASE 2.0.3 - Allow changing settings of normal e-drills too X-Git-Url: https://git.somenet.org/factorio/some-big-mining-drill.git/commitdiff_plain RELEASE 2.0.3 - Allow changing settings of normal e-drills too --- diff --git a/changelog.txt b/changelog.txt index 9aaa8bc..d9e40d6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,9 +1,16 @@ +--------------------------------------------------------------------------------------------------- +Version: 2.0.3 +Date: 2024-12-19 + + Changed: + - Allow changing settings of normal e-drills too. + --------------------------------------------------------------------------------------------------- Version: 2.0.2 Date: 2024-11-02 Changed: - - Correctly named language data correctly. + - Correctly named language data. --------------------------------------------------------------------------------------------------- Version: 2.0.1 diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 5d39ad3..513edf1 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -1,9 +1,11 @@ --- if big-mining-drill exists, modify it. +if data.raw.item["electric-mining-drill"] then + data.raw["mining-drill"]["electric-mining-drill"].resource_searching_radius = 0.49 + settings.startup["some-electric-mining-drill-size"].value + data.raw["mining-drill"]["electric-mining-drill"].mining_speed = settings.startup["some-electric-mining-drill-speed"].value +end +-- if big-mining-drill exists, modify it. if data.raw.item["big-mining-drill"] then - data.raw["mining-drill"]["big-mining-drill"].resource_searching_radius = 0.49 + settings.startup["some-big-mining-drill-size"].value data.raw["mining-drill"]["big-mining-drill"].mining_speed = settings.startup["some-big-mining-drill-speed"].value - end diff --git a/info.json b/info.json index 380ab08..79b489d 100644 --- a/info.json +++ b/info.json @@ -1,10 +1,10 @@ { "name": "some-big-mining-drill", - "version": "2.0.2", - "title": "Someone's big mining-drill [Space Age]", + "version": "2.0.3", + "title": "Some mining-drill settings", "author": "someone1337", "homepage": "https://git.somenet.org/factorio/some-big-mining-drill.git", - "description": "[Space Age] Expose size and speed settings of big mining drill as startup options. Allows you to change range and speed of big mining drills. Existing drills may need to be marked for deconstruction and immediately unmarked for deconstruction to correctly apply the mining range changes.", + "description": "Expose size and speed settings of big mining drill and electric mining drill as startup options. Allows you to change range and speed of mining drills. Existing drills may need to be marked for deconstruction and immediately unmarked for deconstruction to correctly apply the mining range changes.", "factorio_version": "2.0", "dependencies": [ "base>=2.0.0" diff --git a/locale/en/en.cfg b/locale/en/en.cfg index bb21259..79dabab 100644 --- a/locale/en/en.cfg +++ b/locale/en/en.cfg @@ -1,4 +1,6 @@ [mod-setting-name] -some-big-mining-drill-size=Resource radius -some-big-mining-drill-speed=Mining speed +some-electric-mining-drill-size=Electric miner resource radius +some-electric-mining-drill-speed=Electric miner mining speed +some-big-mining-drill-size=Big miner resource radius +some-big-mining-drill-speed=Big miner mining speed diff --git a/settings.lua b/settings.lua index ecc8490..664bec9 100644 --- a/settings.lua +++ b/settings.lua @@ -1,18 +1,34 @@ -data:extend({ - { - type = "int-setting", - name = "some-big-mining-drill-size", - setting_type = "startup", - default_value = 6, - minimum_value = 3, - maximum_value = 200, - }, - { - type = "double-setting", - name = "some-big-mining-drill-speed", - setting_type = "startup", - default_value = 2.5, - minimum_value = 1, - maximum_value = 100, - } -}) +data:extend({ + { + type = "int-setting", + name = "some-electric-mining-drill-size", + setting_type = "startup", + default_value = 2, + minimum_value = 1, + maximum_value = 200, + }, + { + type = "double-setting", + name = "some-electric-mining-drill-speed", + setting_type = "startup", + default_value = 0.5, + minimum_value = 0.25, + maximum_value = 100, + }, + { + type = "int-setting", + name = "some-big-mining-drill-size", + setting_type = "startup", + default_value = 6, + minimum_value = 3, + maximum_value = 200, + }, + { + type = "double-setting", + name = "some-big-mining-drill-speed", + setting_type = "startup", + default_value = 2.5, + minimum_value = 1, + maximum_value = 100, + } +})