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
Date: 24. 11. 2020
Changes:

View file

@ -1,59 +1,69 @@
local unset = {} -- Marker to set attribute to nil
local items = {
local meld = require("meld")
local science_packs = {
["automation-science-pack"] = {
icon_size = 128,
icon = "__cb-science__/graphics/red.png",
icons = unset,
icon_mipmaps = unset,
{ model = "cone_normal", variant = "liquid_red" },
{ variant = "liquid_red" },
},
["logistic-science-pack"] = {
icon_size = 128,
icon = "__cb-science__/graphics/green.png",
icons = unset,
icon_mipmaps = unset,
{ model = "cube", variant = "liquid_green" },
{ variant = "liquid_green" },
},
["military-science-pack"] = {
icon_size = 128,
icon = "__cb-science__/graphics/black.png",
icons = unset,
icon_mipmaps = unset,
{ model = "sphere_spiked", variant = "liquid_black" },
{ variant = "liquid_black" },
},
["chemical-science-pack"] = {
icon_size = 128,
icon = "__cb-science__/graphics/cyan.png",
icons = unset,
icon_mipmaps = unset,
{ model = "sphere_tiny", variant = "liquid_cyan" },
{ variant = "liquid_cyan" },
},
["production-science-pack"] = {
icon_size = 128,
icon = "__cb-science__/graphics/purple.png",
icons = unset,
icon_mipmaps = unset,
{ model = "sphere_double", variant = "liquid_purple" },
{ variant = "liquid_purple" },
},
["utility-science-pack"] = {
icon_size = 128,
icon = "__cb-science__/graphics/yellow.png",
icons = unset,
icon_mipmaps = unset,
{ model = "pentagon", variant = "liquid_yellow" },
{ variant = "liquid_yellow" },
},
["space-science-pack"] = {
icon_size = 128,
icon = "__cb-science__/graphics/white.png",
icons = unset,
icon_mipmaps = unset,
{ model = "cone_inverted", variant = "liquid_white" },
{ variant = "liquid_white" },
},
["metallurgic-science-pack"] = {
{ model = "sphere_normal", variant = "liquid_orange" },
{ variant = "liquid_orange" },
},
["electromagnetic-science-pack"] = {
{ model = "sphere_hemi", variant = "liquid_pink" },
{ variant = "liquid_pink" },
},
["agricultural-science-pack"] = {
{ model = "torus", variant = "liquid_lime" },
{ variant = "liquid_lime" },
},
["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 property, value in pairs(definition) do
if value == unset then
value = nil
end
if data.raw.technology[name] then
data.raw.technology[name][property] = value
end
if data.raw.tool[name] then
data.raw.tool[name][property] = value
for name, requests in pairs(science_packs) do
local variant = quality_glassware.request_flask(name, requests)
if data.raw["technology"][name] then
meld(
data.raw["technology"][name],
quality_glassware.technology_graphics_for(variant, meld)
)
end
if data.raw["tool"][name] then
meld(
data.raw["tool"][name],
quality_glassware.item_graphics_for(variant, meld)
)
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",
"version": "0.4.0",
"version": "1.0.0",
"title": "Colour Blind Friendly Science Packs",
"author": "Hornwitser",
"contact": "Hornwitser#6431 on Discord",
"contact": "hornwitser on Discord",
"description": "Alternative icons for science packs",
"factorio_version": "1.1",
"factorio_version": "2.0",
"dependencies": [
"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.