Compatible with Factorio 0.18
This commit is contained in:
parent
bd54f82739
commit
7c30f129f9
|
@ -0,0 +1 @@
|
||||||
|
*.zip
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Dark Night
|
||||||
|
|
||||||
|
Make night completely dark.
|
||||||
|
|
||||||
|
![Alt text](/before-after.png?raw=true)
|
Binary file not shown.
After Width: | Height: | Size: 870 KiB |
|
@ -0,0 +1,5 @@
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.1.0
|
||||||
|
Date: 01.04.2020
|
||||||
|
Features:
|
||||||
|
- Initial release
|
|
@ -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
|
Binary file not shown.
After Width: | Height: | Size: 92 B |
Binary file not shown.
After Width: | Height: | Size: 92 B |
|
@ -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"
|
||||||
|
]
|
||||||
|
}
|
|
@ -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))
|
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Loading…
Reference in New Issue