Files
dockipelago/worlds/voltorb_flip/version.py
Jonathan Tinney 7971961166
Some checks failed
Analyze modified files / flake8 (push) Failing after 2m28s
Build / build-win (push) Has been cancelled
Build / build-ubuntu2204 (push) Has been cancelled
ctest / Test C++ ubuntu-latest (push) Has been cancelled
ctest / Test C++ windows-latest (push) Has been cancelled
Analyze modified files / mypy (push) Has been cancelled
Build and Publish Docker Images / Push Docker image to Docker Hub (push) Successful in 5m4s
Native Code Static Analysis / scan-build (push) Failing after 5m2s
type check / pyright (push) Successful in 1m7s
unittests / Test Python 3.11.2 ubuntu-latest (push) Failing after 16m23s
unittests / Test Python 3.12 ubuntu-latest (push) Failing after 28m19s
unittests / Test Python 3.13 ubuntu-latest (push) Failing after 14m49s
unittests / Test hosting with 3.13 on ubuntu-latest (push) Successful in 5m0s
unittests / Test Python 3.13 macos-latest (push) Has been cancelled
unittests / Test Python 3.11 windows-latest (push) Has been cancelled
unittests / Test Python 3.13 windows-latest (push) Has been cancelled
add schedule I, sonic 1/frontiers/heroes, spirit island
2026-04-02 23:46:36 -07:00

45 lines
1.4 KiB
Python

from typing import NamedTuple
class VersionCompatibility(NamedTuple):
ap_minimum: tuple[int, int, int]
# DO NOT put any number higher than 255
version: tuple[int, int, int] = (1, 1, 0)
compatibility: dict[tuple[int, int, int], VersionCompatibility] = {
(1, 1, 0): VersionCompatibility((0, 6, 3)),
(1, 0, 0): VersionCompatibility((0, 6, 3)),
(0, 1, 0): VersionCompatibility((0, 6, 3)),
}
def ap_minimum() -> tuple[int, int, int]:
return compatibility[version].ap_minimum
if __name__ == "__main__":
import orjson, os, zipfile
apworld = "voltorb_flip"
dev_dir = "D:/Games/Archipelago/custom_worlds/dev/"
with (zipfile.ZipFile(dev_dir + apworld + ".apworld", 'w', zipfile.ZIP_DEFLATED, True, 9) as zipf2):
metadata = {
"game": "Voltorb Flip",
"minimum_ap_version": ".".join(str(i) for i in ap_minimum()),
"authors": ["BlastSlimey"],
"world_version": ".".join(str(i) for i in version)
}
zipf2.writestr(os.path.join(apworld, "archipelago.json"), orjson.dumps(metadata))
for root, dirs, files in os.walk("."):
if "__pycache__" in root:
continue
for file in files:
print(f"{root} {file}")
zipf2.write(os.path.join(root, file),
os.path.relpath(os.path.join(root, file),
"../"))