diff --git a/.gitignore b/.gitignore index b25c15b..42362fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,48 @@ -*~ +# Temporary files +.#* + +# Compiled Lua sources +luac.out + +# luarocks build files +*.src.rock +*.zip +*.tar.gz + +# Object files +*.o +*.os +*.ko +*.obj +*.elf + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo +*.def +*.exp + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +-.DS_Store +-.vscode +-.modportal +-.assets diff --git a/CHANGELOG.txt b/changelog.txt similarity index 63% rename from CHANGELOG.txt rename to changelog.txt index 1bcdb24..36f44dc 100644 --- a/CHANGELOG.txt +++ b/changelog.txt @@ -1,3 +1,15 @@ +--------------------------------------------------------------------------------------------------- +Version: 1.2.3 +Date: 2025-03-26 + Changes: + - added `inf-lab-speed` mod to exclusion list as this mod does the same +--------------------------------------------------------------------------------------------------- +Version: 1.2.2 +Date: 2025-02-17 + Features: + - Bumped Factorio version to 2.0 + - Research now depends on Space Science Pack + --------------------------------------------------------------------------------------------------- Version: 1.2.1 Date: 2021-02-01 diff --git a/data.lua b/data.lua index 7b0f07c..443fdfb 100644 --- a/data.lua +++ b/data.lua @@ -1,35 +1,34 @@ -data:extend( -{ - { - type = "technology", - name = "research-speed-7", - icon_size = 256, - icon = "__base__/graphics/technology/research-speed.png", - effects = - { - { - type = "laboratory-speed", - modifier = 0.6 - } - }, - prerequisites = {"research-speed-6"}, - unit = - { - count_formula = "8000*(L-6)", - ingredients = - { - {"automation-science-pack", 1}, - {"logistic-science-pack", 1}, - {"chemical-science-pack", 1}, - {"production-science-pack", 1}, - {"utility-science-pack", 1}, - {"space-science-pack", 1} - }, - time = 30 - }, - upgrade = true, - max_level = "infinite", - order = "c-m-d" - }, -} -) +data:extend( +{ + { + type = "technology", + name = "research-speed-7", + icon_size = 256, + icon = "__base__/graphics/technology/research-speed.png", + effects = + { + { + type = "laboratory-speed", + modifier = 0.6 + } + }, + prerequisites = {"research-speed-6", "space-science-pack"}, + unit = + { + count_formula = "8000*(L-6)", + ingredients = + { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1}, + {"utility-science-pack", 1}, + {"space-science-pack", 1} + }, + time = 30 + }, + upgrade = true, + max_level = "infinite", + order = "c-m-d" + }, +}) diff --git a/info.json b/info.json index 45dfdf6..39aefe1 100644 --- a/info.json +++ b/info.json @@ -1,11 +1,14 @@ -{ - "name": "InfiniteLaboratorySpeed", - "version": "1.2.1", - "title": "InfiniteLaboratorySpeed", - "author": "Mongokatten", - "contact": "https://github.com/Mongokatten/InfiniteResearchSpeed/issues/", - "homepage": "https://github.com/Mongokatten/InfiniteResearchSpeed/", - "factorio_version" : "1.1", - "description": "It is now possible to research laboratory speed infinitely", - "dependencies": ["base >= 1.1.0"] -} +{ + "name": "InfiniteLaboratorySpeedUpdated", + "version": "1.2.2", + "title": "Infinite Laboratory Speed 2.0", + "author": "roland77, Mongokatten", + "contact": "https://github.com/AngledLuffa/InfiniteResearchSpeed/issues/", + "homepage": "https://github.com/AngledLuffa/InfiniteResearchSpeed/", + "factorio_version" : "2.0", + "description": "It is now possible to research laboratory speed infinitely", + "dependencies": [ + "base >= 2.0", + "!inf-lab-speed" + ] +} diff --git a/scripts/build_package.py b/scripts/build_package.py new file mode 100755 index 0000000..f1bbd1f --- /dev/null +++ b/scripts/build_package.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +import json +import os +import re +import zipfile + +zip_suffix = 'zip' + +if __name__ == '__main__': + with open("info.json") as fin: + info_json = json.load(fin) + version = info_json['version'] + zip_prefix = info_json['name'] + + version_name = zip_prefix + "_" + version + zipname = version_name + '.' + zip_suffix + print("Building %s" % zipname) + with zipfile.ZipFile(zipname, 'w', zipfile.ZIP_DEFLATED) as zout: + for root, dirs, files in os.walk('.'): + if '.git' in dirs: + dirs.remove('.git') + for f in files: + if re.match(zip_prefix + '.*' + zip_suffix, f): + continue + if f.endswith("~"): + continue + fullname = os.path.join(root, f) + newname = os.path.normpath(os.path.join(version_name, root, f)) + print("%s -> %s" % (fullname, newname)) + zout.write(fullname, arcname=newname) + diff --git a/scripts/install_local.py b/scripts/install_local.py new file mode 100755 index 0000000..f475eb7 --- /dev/null +++ b/scripts/install_local.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 + +import glob +import json +import os +import shutil +import sys + +if __name__ == '__main__': + with open("info.json") as fin: + info_json = json.load(fin) + version = info_json['version'] + zip_prefix = info_json['name'] + + expected_ending = version + ".zip" + + new_versions = glob.glob(zip_prefix + "*") + new_versions.sort(key=os.path.getmtime) + if len(new_versions) == 0: + raise FileNotFoundError("Cannot find a version of " + zip_prefix + " to install") + + latest_version = new_versions[-1] + if not latest_version.endswith(expected_ending): + raise ValueError("Expected version " + version + " but found " + latest_version) + print("Installing " + latest_version) + + dest = "../../../AppData/Roaming/Factorio/mods" + + existing = glob.glob(os.path.join(dest, zip_prefix + "*")) + if len(existing) > 0: + print("Removing existing versions: " + " ".join(existing)) + for i in existing: + os.unlink(i) + + shutil.copy(latest_version, os.path.join(dest, latest_version)) diff --git a/thumbnail.png b/thumbnail.png new file mode 100644 index 0000000..a73b6c6 Binary files /dev/null and b/thumbnail.png differ