bad start

This commit is contained in:
Fabian Montero 2025-02-13 19:09:55 -06:00
parent 8a006de576
commit 2d0a7a5d2d
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
3 changed files with 0 additions and 34 deletions

View file

@ -1 +0,0 @@
require("scripts/replace_sprites")

View file

@ -1,11 +0,0 @@
{
"name": "high-contrast",
"version": "0.0.1",
"title": "High contrast graphics",
"author": "Fabian Montero, Alejandro Soto",
"contact": "fabian@posixlycorrect.com",
"homepage": "https://git.posixlycorrect.com/deepState/factorio_high_contrast_mod",
"description": "Flat, high contrast graphics for Factorio.",
"factorio_version": "1.1",
"dependencies": [""]
}

View file

@ -1,22 +0,0 @@
local function replace_sprite_filenames(t)
if type(t) == "table" then
for key, value in pairs(t) do
if key == "filename" and type(value) == "string" then
-- Extract the base filename (assumes the original filenames are in some folder)
local base_filename = value:match("([^/\\]+)$")
-- Construct your new path using the new mod name
t[key] = "__factorio_high_contrast_mod__/graphics/" .. base_filename
else
replace_sprite_filenames(value)
end
end
end
end
-- Iterate over all prototypes in data.raw
for type_name, prototypes in pairs(data.raw) do
for _, prototype in pairs(prototypes) do
replace_sprite_filenames(prototype)
end
end