diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c4c4ffc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.zip diff --git a/README.md b/README.md new file mode 100644 index 0000000..4df4b7d --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Dark Night + +Make night completely dark. + +![Alt text](/before-after.png?raw=true) diff --git a/before-after.png b/before-after.png new file mode 100644 index 0000000..563e793 Binary files /dev/null and b/before-after.png differ diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..3733396 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,5 @@ +--------------------------------------------------------------------------------------------------- +Version: 0.1.0 +Date: 01.04.2020 + Features: + - Initial release diff --git a/data-updates.lua b/data-updates.lua new file mode 100644 index 0000000..a37c444 --- /dev/null +++ b/data-updates.lua @@ -0,0 +1,11 @@ +local function convertPath(path) + return path:gsub("__core__", "__DarkNight__") -- Mod change +end + +for _, table in pairs(data.raw["utility-constants"]["default"].daytime_color_lookup) do + table[2] = convertPath(table[2]) +end + +for _, table in pairs(data.raw["utility-constants"]["default"].zoom_to_world_daytime_color_lookup) do + table[2] = convertPath(table[2]) +end diff --git a/graphics/color_luts/lut-night.png b/graphics/color_luts/lut-night.png new file mode 100644 index 0000000..0fbc368 Binary files /dev/null and b/graphics/color_luts/lut-night.png differ diff --git a/graphics/color_luts/night.png b/graphics/color_luts/night.png new file mode 100644 index 0000000..0fbc368 Binary files /dev/null and b/graphics/color_luts/night.png differ diff --git a/info.json b/info.json new file mode 100644 index 0000000..6104dd2 --- /dev/null +++ b/info.json @@ -0,0 +1,13 @@ +{ + "name":"DarkNight", + "version":"0.1.0", + "title":"Dark Night", + "description":"Make night completely dark.", + "author":"David Skrundz", + "contact": "david@skrundz.ca", + "homepage": "https://github.com/DavidSkrundz/DarkNight", + "factorio_version": "0.18", + "dependencies": [ + "base >= 0.18.0" + ] +} diff --git a/package.py b/package.py new file mode 100644 index 0000000..5a1c05d --- /dev/null +++ b/package.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 + +import json +import os +from zipfile import ZipFile + +modFiles = [ + "info.json", + "changelog.txt", + "thumbnail.png", + + "data-updates.lua", +] +modFolders = [ + "graphics", +] + +with open("info.json") as file: + modInfo = json.load(file) + +zipName = "{}_{}".format(modInfo["name"], modInfo["version"]) + +with ZipFile("{}.zip".format(zipName), 'w') as modZip: + for file in modFiles: + modZip.write(file, arcname="{}/{}".format(zipName, file)) + for folder in modFolders: + for root, dirs, files in os.walk(folder): + for file in files: + filePath = os.path.join(root, file) + archivePath = os.path.relpath(filePath, os.path.join(folder, '..')) + modZip.write(filePath, arcname="{}/{}".format(zipName, archivePath)) diff --git a/thumbnail.png b/thumbnail.png new file mode 100644 index 0000000..87d9617 Binary files /dev/null and b/thumbnail.png differ