Compatible with Factorio 0.18

This commit is contained in:
David Skrundz 2020-03-23 19:48:46 -06:00
parent 78bbc12536
commit 87d61d9aff
No known key found for this signature in database
GPG Key ID: 9A0FA0614CE9422E
8 changed files with 50 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.zip

5
README.md Normal file
View File

@ -0,0 +1,5 @@
# Clean Floor
Remove all decorations when placing floor tiles.
![Alt text](/before-after.png?raw=true)

BIN
before-after.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

5
changelog.txt Normal file
View File

@ -0,0 +1,5 @@
---------------------------------------------------------------------------------------------------
Version: 0.1.0
Date: 23.03.2020
Features:
- Initial release

5
data-updates.lua Normal file
View File

@ -0,0 +1,5 @@
for _, v in pairs(data.raw.tile) do
if (v.decorative_removal_probability or 0) > 0 then
v.decorative_removal_probability = 1
end
end

13
info.json Normal file
View File

@ -0,0 +1,13 @@
{
"name":"CleanFloor",
"version":"0.1.0",
"title":"Clean Floor",
"description":"Remove all decorations when placing floor tiles.",
"author":"David Skrundz",
"contact": "david@skrundz.ca",
"homepage": "https://github.com/DavidSkrundz/CleanFloor",
"factorio_version": "0.18",
"dependencies": [
"base >= 0.18.0"
]
}

21
package.py Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env python3
import json
from zipfile import ZipFile
modFiles = [
"info.json",
"changelog.txt",
"thumbnail.png",
"data-updates.lua",
]
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))

BIN
thumbnail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB