From 0c88cd3ac97bd39f3c20bb39f093ee63b3505a3a Mon Sep 17 00:00:00 2001 From: Brevven Date: Sun, 24 Jan 2021 04:26:07 -0800 Subject: [PATCH] lead colors --- changelog.txt | 5 +++++ data-final-fixes.lua | 1 + info.json | 2 +- lead-recipe-colors.lua | 22 ++++++++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 lead-recipe-colors.lua diff --git a/changelog.txt b/changelog.txt index fa82ace..6eb3a2f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.1.5 +Date: 2021-01-24 + Changes: + - Lead used to make colored items for some mods. +--------------------------------------------------------------------------------------------------- Version: 0.1.4 Date: 2021-01-22 Fixes: diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 9c18419..8e2a024 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -1,5 +1,6 @@ require("lead-recipe-final-stacking") require("lead-recipe-modules") +require("lead-recipe-colors") ---- diff --git a/info.json b/info.json index 32d4101..6fa5247 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzlead", - "version": "0.1.4", + "version": "0.1.5", "factorio_version": "1.1", "title": "Lead", "author": "Brevven", diff --git a/lead-recipe-colors.lua b/lead-recipe-colors.lua new file mode 100644 index 0000000..5dad156 --- /dev/null +++ b/lead-recipe-colors.lua @@ -0,0 +1,22 @@ +local util = require("__bzlead__.util"); + + + +local items = {"concrete", "refined-concrete", "stone-brick", "stone-wall"} + +local colors = { + "acid", "black", "blue", "brown", "cyan", "green", + "orange", "pink", "purple", "red", "white", "yellow" +} + + +for i, item in pairs(items) do + for j, color in pairs(colors) do + if data.raw.recipe[item.."-"..color] then + util.add_ingredient(item.."-"..color, "lead-plate", 1) + end + if data.raw.recipe[color.."-"..item] then + util.add_ingredient(color.."-"..item, "lead-plate", 1) + end + end +end