mirror of
https://github.com/Wyrrrd/bbr-fix.git
synced 2026-07-06 13:13:04 +02:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 69bf3cac33 | |||
| 5936a9acc7 | |||
| 86b98f8bc9 | |||
| db9a5ccdb3 | |||
| 13b8f9ef5c | |||
| 0b96ea702e | |||
| ae709490ac | |||
| 787b3c7bb5 | |||
| e82c01e9cb | |||
| 60a95eafc2 | |||
| aca63d0a43 | |||
| 2ef6fb04d0 | |||
| 034e43e75c | |||
| 0736ba8a78 | |||
| 14d8aa513a | |||
| e568e7fa69 |
@@ -1 +1,2 @@
|
||||
*.zip
|
||||
.vscode/*
|
||||
|
||||
Vendored
+29
@@ -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",
|
||||
"factorioVersion": "D:/Modding/Factorio/bin/x64/factorio.exe"
|
||||
},
|
||||
{
|
||||
"type": "factoriomod",
|
||||
"request": "launch",
|
||||
"name": "Factorio Mod Debug (Settings & Data)",
|
||||
"factorioPath": "D:/Factorio/latest/bin/x64/factorio.exe",
|
||||
"hookSettings": true,
|
||||
"hookData": true
|
||||
},
|
||||
{
|
||||
"type": "factoriomod",
|
||||
"request": "launch",
|
||||
"name": "Factorio Mod Debug (Profile)",
|
||||
"factorioPath": "D:/Factorio/latest/bin/x64/factorio.exe",
|
||||
"hookMode": "profile"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"factorio.versions": [
|
||||
{
|
||||
"name": "Main",
|
||||
"factorioPath": "d:\\Modding\\Factorio\\bin\\x64\\factorio.exe",
|
||||
"active": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,21 +1,24 @@
|
||||
MIT License
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Copyright (c) 2020 Wyrrrd
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
For more information, please refer to <http://unlicense.org>
|
||||
@@ -2,7 +2,13 @@
|
||||
<img src="https://raw.githubusercontent.com/Wyrrrd/bbr-fix/master/thumbnail.png" width="128" height="128">
|
||||
|
||||
### 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 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.
|
||||
Thanks to [kapaer](https://mods.factorio.com/user/kapaer) for the [mod](https://mods.factorio.com/mod/beautiful_bridge_railway) this depends on.
|
||||
Thanks to [Eldrinn-Elantey](https://github.com/Eldrinn-Elantey) for the Russian translation.7
|
||||
@@ -1,4 +1,49 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.3
|
||||
Date: 2023-03-22
|
||||
Changes:
|
||||
- Complete rewrite to enable copying rail recipe result amount, and for performance
|
||||
Features:
|
||||
- Added "gravel" from IR3 to overwritten materials
|
||||
---------------------------------------------------------------------------------------------------
|
||||
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:
|
||||
- Added russian locale (thanks to EldrinnElantey on Github)
|
||||
Bugfixes:
|
||||
- Fixed mod name in locales
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.0
|
||||
Date: 2020-12-02
|
||||
Changes:
|
||||
- Version bump for base game 1.1
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.4
|
||||
Date: 2020-05-25
|
||||
Changes:
|
||||
- Changed license to the Unlicense
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.3
|
||||
Date: 2020-03-25
|
||||
Changes:
|
||||
- Updated thumbnail
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.2
|
||||
Date: 2020-03-20
|
||||
Changes:
|
||||
- Replaced rail ingredient with dynamic recipe ingredients of rail recipe
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.1
|
||||
Date: 2020-03-19
|
||||
Changes:
|
||||
- Fixed rail count
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.0
|
||||
Date: 2020-03-19
|
||||
Features:
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
-- setup id helper maps
|
||||
ingredients_id_map = {old = false}
|
||||
for id, item in pairs(data.raw["recipe"]["rail"].ingredients) do
|
||||
ingredients_id_map[item[1] or item["name"]] = id
|
||||
if item[1] then
|
||||
ingredients_id_map["old"] = true
|
||||
end
|
||||
end
|
||||
|
||||
if data.raw["recipe"]["rail"].products then
|
||||
products_id_map = {}
|
||||
print(tprint(data.raw["recipe"]["rail"]))
|
||||
for id, item in pairs(data.raw["recipe"]["rail"].products) do products_id_map[item[1] or item["name"]] = id end
|
||||
end
|
||||
|
||||
|
||||
-- mod integrations
|
||||
if mods["IndustrialRevolution3"] then
|
||||
replace_item = "gravel"
|
||||
else
|
||||
replace_item = "stone"
|
||||
end
|
||||
|
||||
|
||||
-- get multiplier
|
||||
multiplier = settings.startup["bbr-fix-cost"].value
|
||||
|
||||
|
||||
-- setup bridge material list
|
||||
bridges = {
|
||||
{name = "wood", item = "wood"},
|
||||
{name = "iron", item = "iron-plate"},
|
||||
{name = "brick", item = "stone-brick"}
|
||||
}
|
||||
|
||||
for _, bridge in pairs(bridges) do
|
||||
-- copy rail recipe to bridge
|
||||
data.raw["recipe"]["bbr-rail-"..bridge.name] = table.deepcopy(data.raw["recipe"]["rail"])
|
||||
|
||||
-- fix recipe name
|
||||
data.raw["recipe"]["bbr-rail-"..bridge.name].name = "bbr-rail-"..bridge.name
|
||||
|
||||
-- replace stone with multiplied bridge material
|
||||
if ingredients_id_map.old then
|
||||
data.raw["recipe"]["bbr-rail-"..bridge.name].ingredients[ingredients_id_map[replace_item]][1] = bridge.item
|
||||
|
||||
-- apply multiplier
|
||||
if multiplier > 1 then
|
||||
data.raw["recipe"]["bbr-rail-"..bridge.name].ingredients[ingredients_id_map[replace_item]][2] = multiplier * data.raw["recipe"]["bbr-rail-"..bridge.name].ingredients[ingredients_id_map[replace_item]][2]
|
||||
end
|
||||
else
|
||||
data.raw["recipe"]["bbr-rail-"..bridge.name].ingredients[ingredients_id_map[replace_item]].name = bridge.item
|
||||
|
||||
-- apply multiplier
|
||||
if multiplier > 1 then
|
||||
data.raw["recipe"]["bbr-rail-"..bridge.name].ingredients[ingredients_id_map[replace_item]].amount = multiplier * data.raw["recipe"]["bbr-rail-"..bridge.name].ingredients[ingredients_id_map[replace_item]].amount
|
||||
end
|
||||
end
|
||||
|
||||
-- replace rails with bridges
|
||||
if products_id_map then
|
||||
data.raw["recipe"]["bbr-rail-"..bridge.name].products[products_id_map["rail"]].name = "bbr-rail-"..bridge.name
|
||||
else
|
||||
data.raw["recipe"]["bbr-rail-"..bridge.name].result = "bbr-rail-"..bridge.name
|
||||
end
|
||||
end
|
||||
@@ -1,9 +0,0 @@
|
||||
if settings.startup["bbr_fix_expensive"].value then
|
||||
data.raw["recipe"]["bbr-rail-wood"].ingredients = {{"rail",1},{"wood",5}}
|
||||
data.raw["recipe"]["bbr-rail-iron"].ingredients = {{"rail",1},{"iron-plate",5}}
|
||||
data.raw["recipe"]["bbr-rail-brick"].ingredients = {{"rail",1},{"stone-brick",5}}
|
||||
else
|
||||
data.raw["recipe"]["bbr-rail-wood"].ingredients = {{"rail",1},{"wood",1}}
|
||||
data.raw["recipe"]["bbr-rail-iron"].ingredients = {{"rail",1},{"iron-plate",1}}
|
||||
data.raw["recipe"]["bbr-rail-brick"].ingredients = {{"rail",1},{"stone-brick",1}}
|
||||
end
|
||||
@@ -1,12 +1,13 @@
|
||||
{
|
||||
"name": "bbr-fix",
|
||||
"version": "0.18.0",
|
||||
"version": "1.1.3",
|
||||
"title": "Beautiful Bridge Railway - Recipe Fix",
|
||||
"author": "Wyrrrd",
|
||||
"factorio_version": "0.18",
|
||||
"factorio_version": "1.1",
|
||||
"dependencies": [
|
||||
"base >= 0.18",
|
||||
"beautiful_bridge_railway >= 0.18.1"
|
||||
"base >= 1.1.0",
|
||||
"beautiful_bridge_railway >= 1.1.1",
|
||||
"(?) IndustrialRevolution3 >= 3.0.1"
|
||||
],
|
||||
"description": "Adds rails to recipes."
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
[mod-description]
|
||||
Autofilter=Fügt Schienen zu Rezepten hinzu.
|
||||
bbr-fix=Fügt Schienen zu Rezepten hinzu.
|
||||
|
||||
[mod-setting-name]
|
||||
bbr_fix_expensive=Teure Rezepte
|
||||
bbr-fix-cost=Kostenmultiplikator
|
||||
@@ -1,5 +1,5 @@
|
||||
[mod-description]
|
||||
Autofilter=Adds rails to recipes.
|
||||
bbr-fix=Adds rails to recipes.
|
||||
|
||||
[mod-setting-name]
|
||||
bbr_fix_expensive=Expensive recipes
|
||||
bbr-fix-cost=Cost multiplier
|
||||
@@ -0,0 +1,5 @@
|
||||
[mod-description]
|
||||
bbr-fix=Добавляет рельсы в рецепты.
|
||||
|
||||
[mod-setting-name]
|
||||
bbr-fix-cost=Умножитель стоимости
|
||||
+3
-3
@@ -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",
|
||||
},
|
||||
})
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 28 KiB |
Reference in New Issue
Block a user