diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..fdffc29 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,29 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "factoriomod", + "request": "launch", + "name": "Factorio Mod Debug", + "factorioPath": "D:/Modding/Factorio/bin/x64/factorio.exe" + }, + { + "type": "factoriomod", + "request": "launch", + "name": "Factorio Mod Debug (Settings & Data)", + "factorioPath": "D:/Modding/Factorio/bin/x64/factorio.exe", + "hookSettings": true, + "hookData": true + }, + { + "type": "factoriomod", + "request": "launch", + "name": "Factorio Mod Debug (Profile)", + "factorioPath": "D:/Modding/Factorio/bin/x64/factorio.exe", + "hookMode": "profile" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index ef77b5a..463e0fa 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ ### Features -Changes the recipes of BBR to depend on rails to be more in line with modded rail recipes. You can also enable more expensive recipes via mod settings. +Changes the recipes of BBR to depend on rails to be more in line with modded rail recipes. You can also make the recipes more expensive via mod settings. ### Examples The stone in the rail recipe gets replaced by the bridge material (wood, iron plate or stone brick). -So if your modded rail costs 1x stone, 1x steel and 1x turret (don't ask why), with expensive recipes **disabled**, wooden bridge rail will cost **1x** wood, 1x steel and 1x turret. With expensive recipes **enabled**, wooden bridge rail will cost **5x** wood, 1x steel and 1x turret. +So if your modded rail costs 1x stone, 1x steel and 1x turret (don't ask why), with a cost multiplier of **1**, wooden bridge rail will cost **1x** wood, 1x steel and 1x turret. With a cost multiplier of **5**, wooden bridge rail will cost **5x** wood, 1x steel and 1x turret. ### Credits Thanks to [kapaer](https://mods.factorio.com/user/kapaer) for the [mod](https://mods.factorio.com/mod/beautiful_bridge_railway) this depends on. \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 7bd1b31..62f1af6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,10 @@ --------------------------------------------------------------------------------------------------- +Version: 1.1.2 +Date: 2021-09-06 + Changes: + - opened up configurability, now the expensiveness can be set freely (don't overdo it) + - if you used expensive mode, you have to set the cost multiplier to 5 before loading your map +--------------------------------------------------------------------------------------------------- Version: 1.1.1 Date: 2020-12-29 Features: diff --git a/data-final-fixes.lua b/data-final-fixes.lua index e956bba..3b533d8 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -12,10 +12,12 @@ data.raw["recipe"]["bbr-rail-wood"].ingredients = table.deepcopy(base_recipe) data.raw["recipe"]["bbr-rail-iron"].ingredients = table.deepcopy(base_recipe) data.raw["recipe"]["bbr-rail-brick"].ingredients = table.deepcopy(base_recipe) -if settings.startup["bbr_fix_expensive"].value then - table.insert(data.raw["recipe"]["bbr-rail-wood"].ingredients,{"wood",5}) - table.insert(data.raw["recipe"]["bbr-rail-iron"].ingredients,{"iron-plate",5}) - table.insert(data.raw["recipe"]["bbr-rail-brick"].ingredients,{"stone-brick",5}) +multiplier = settings.startup["bbr-fix-cost"].value + +if multiplier>0 then + table.insert(data.raw["recipe"]["bbr-rail-wood"].ingredients,{"wood",multiplier}) + table.insert(data.raw["recipe"]["bbr-rail-iron"].ingredients,{"iron-plate",multiplier}) + table.insert(data.raw["recipe"]["bbr-rail-brick"].ingredients,{"stone-brick",multiplier}) else table.insert(data.raw["recipe"]["bbr-rail-wood"].ingredients,{"wood",1}) table.insert(data.raw["recipe"]["bbr-rail-iron"].ingredients,{"iron-plate",1}) diff --git a/info.json b/info.json index 242a3c0..ed77187 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bbr-fix", - "version": "1.1.1", + "version": "1.1.2", "title": "Beautiful Bridge Railway - Recipe Fix", "author": "Wyrrrd", "factorio_version": "1.1", diff --git a/locale/de/strings.cfg b/locale/de/strings.cfg index 62c8d65..badeef2 100644 --- a/locale/de/strings.cfg +++ b/locale/de/strings.cfg @@ -2,4 +2,4 @@ bbr-fix=Fügt Schienen zu Rezepten hinzu. [mod-setting-name] -bbr_fix_expensive=Teure Rezepte \ No newline at end of file +bbr-fix-cost=Kostenmultiplikator \ No newline at end of file diff --git a/locale/en/strings.cfg b/locale/en/strings.cfg index 7cd70a3..e86feab 100644 --- a/locale/en/strings.cfg +++ b/locale/en/strings.cfg @@ -2,4 +2,4 @@ bbr-fix=Adds rails to recipes. [mod-setting-name] -bbr_fix_expensive=Expensive recipes \ No newline at end of file +bbr-fix-cost=Cost multiplier \ No newline at end of file diff --git a/locale/ru/strings.cfg b/locale/ru/strings.cfg index e0592ae..5332368 100644 --- a/locale/ru/strings.cfg +++ b/locale/ru/strings.cfg @@ -2,4 +2,4 @@ bbr-fix=Добавляет рельсы в рецепты. [mod-setting-name] -bbr_fix_expensive=Дорогие рецепты \ No newline at end of file +bbr-fix-cost=Умножитель стоимости \ No newline at end of file diff --git a/settings.lua b/settings.lua index 1ec3ec6..af97fcc 100644 --- a/settings.lua +++ b/settings.lua @@ -1,8 +1,8 @@ data:extend({ { - type = "bool-setting", - name = "bbr_fix_expensive", - default_value = "false", + type = "int-setting", + name = "bbr-fix-cost", + default_value = 1, setting_type = "startup", }, }) \ No newline at end of file