Update to 2.0 with quality_glassware

Update to support Factorio 2.0 with assets taken from quality_glassware.
This commit is contained in:
Hornwitser 2024-10-23 23:52:47 +02:00
parent efd67252c9
commit 6436a0364f
15 changed files with 81 additions and 74 deletions

BIN
screenshots/belts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
screenshots/tech-tree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

View file

@ -1,4 +1,10 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 1.0.0
Date: 23. 10. 2024
Changes:
- Added support for Factorio 2.0 and Space Age.
- Replaced graphics with flasks from Quality Glassware
---------------------------------------------------------------------------------------------------
Version: 0.4.0 Version: 0.4.0
Date: 24. 11. 2020 Date: 24. 11. 2020
Changes: Changes:

View file

@ -1,59 +1,69 @@
local unset = {} -- Marker to set attribute to nil local meld = require("meld")
local items = {
["automation-science-pack"] = { local science_packs = {
icon_size = 128, ["automation-science-pack"] = {
icon = "__cb-science__/graphics/red.png", { model = "cone_normal", variant = "liquid_red" },
icons = unset, { variant = "liquid_red" },
icon_mipmaps = unset, },
}, ["logistic-science-pack"] = {
["logistic-science-pack"] = { { model = "cube", variant = "liquid_green" },
icon_size = 128, { variant = "liquid_green" },
icon = "__cb-science__/graphics/green.png", },
icons = unset, ["military-science-pack"] = {
icon_mipmaps = unset, { model = "sphere_spiked", variant = "liquid_black" },
}, { variant = "liquid_black" },
["military-science-pack"] = { },
icon_size = 128, ["chemical-science-pack"] = {
icon = "__cb-science__/graphics/black.png", { model = "sphere_tiny", variant = "liquid_cyan" },
icons = unset, { variant = "liquid_cyan" },
icon_mipmaps = unset, },
}, ["production-science-pack"] = {
["chemical-science-pack"] = { { model = "sphere_double", variant = "liquid_purple" },
icon_size = 128, { variant = "liquid_purple" },
icon = "__cb-science__/graphics/cyan.png", },
icons = unset, ["utility-science-pack"] = {
icon_mipmaps = unset, { model = "pentagon", variant = "liquid_yellow" },
}, { variant = "liquid_yellow" },
["production-science-pack"] = { },
icon_size = 128, ["space-science-pack"] = {
icon = "__cb-science__/graphics/purple.png", { model = "cone_inverted", variant = "liquid_white" },
icons = unset, { variant = "liquid_white" },
icon_mipmaps = unset, },
}, ["metallurgic-science-pack"] = {
["utility-science-pack"] = { { model = "sphere_normal", variant = "liquid_orange" },
icon_size = 128, { variant = "liquid_orange" },
icon = "__cb-science__/graphics/yellow.png", },
icons = unset, ["electromagnetic-science-pack"] = {
icon_mipmaps = unset, { model = "sphere_hemi", variant = "liquid_pink" },
}, { variant = "liquid_pink" },
["space-science-pack"] = { },
icon_size = 128, ["agricultural-science-pack"] = {
icon = "__cb-science__/graphics/white.png", { model = "torus", variant = "liquid_lime" },
icons = unset, { variant = "liquid_lime" },
icon_mipmaps = unset, },
}, ["cryogenic-science-pack"] = {
{ model = "cone_normal", variant = "frozen_blue" },
{ variant = "frozen_blue" },
{ variant = "liquid_blue" },
},
["promethium-science-pack"] = {
{ model = "klein", variant = "liquid_blue" },
{ variant = "liquid_blue" },
},
} }
for name, definition in pairs(items) do for name, requests in pairs(science_packs) do
for property, value in pairs(definition) do local variant = quality_glassware.request_flask(name, requests)
if value == unset then if data.raw["technology"][name] then
value = nil meld(
end data.raw["technology"][name],
if data.raw.technology[name] then quality_glassware.technology_graphics_for(variant, meld)
data.raw.technology[name][property] = value )
end end
if data.raw.tool[name] then if data.raw["tool"][name] then
data.raw.tool[name][property] = value meld(
end data.raw["tool"][name],
end quality_glassware.item_graphics_for(variant, meld)
end )
end
end

View file

@ -1,9 +0,0 @@
if DiscoScience and DiscoScience.iconColors then
DiscoScience.iconColors["__cb-science__/graphics/red.png"] = {r = 1.0, g = 0.1, b = 0.1}
DiscoScience.iconColors["__cb-science__/graphics/green.png"] = {r = 0.1, g = 1.0, b = 0.1}
DiscoScience.iconColors["__cb-science__/graphics/black.png"] = {r = 1.0, g = 0.5, b = 0.0}
DiscoScience.iconColors["__cb-science__/graphics/cyan.png"] = {r = 0.2, g = 0.2, b = 1.0}
DiscoScience.iconColors["__cb-science__/graphics/purple.png"] = {r = 0.8, g = 0.1, b = 0.8}
DiscoScience.iconColors["__cb-science__/graphics/yellow.png"] = {r = 1.0, g = 0.9, b = 0.1}
DiscoScience.iconColors["__cb-science__/graphics/white.png"] = {r = 0.8, g = 0.8, b = 0.8}
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View file

@ -1,13 +1,13 @@
{ {
"name": "cb-science", "name": "cb-science",
"version": "0.4.0", "version": "1.0.0",
"title": "Colour Blind Friendly Science Packs", "title": "Colour Blind Friendly Science Packs",
"author": "Hornwitser", "author": "Hornwitser",
"contact": "Hornwitser#6431 on Discord", "contact": "hornwitser on Discord",
"description": "Alternative icons for science packs", "description": "Alternative icons for science packs",
"factorio_version": "1.1", "factorio_version": "2.0",
"dependencies": [ "dependencies": [
"base", "base",
"(?) ScienceCostTweakerM" "quality_glassware"
] ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 241 KiB

Before After
Before After

BIN
thumbnail.xcf Normal file

Binary file not shown.