diff --git a/Bundle Packs/index.json b/Bundle Packs/index.json index 18048e3..db4ca90 100644 --- a/Bundle Packs/index.json +++ b/Bundle Packs/index.json @@ -529,7 +529,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/greek_mythology.mcsave?checksum=184741d1889f2a348caacc8963ed635d" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/greek_mythology.mcsave?checksum=f865d1fae2187f79cfa0cf7e373d564a" } ] }, @@ -566,7 +566,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/chinese_mythology.mcsave?checksum=3d0f069e94574b18413bd2fded48f8c5" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/chinese_mythology.mcsave?checksum=64382d0c595870d977209b2c497dcb2e" } ] } @@ -598,7 +598,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/festive.mcsave?checksum=57a5cd0cc2be85c8dedeb5b125d11b5b" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/festive.mcsave?checksum=9b2d120155413669a2f2f2b68e8933a9" } ], "bundlePacks": [ @@ -652,7 +652,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/halloween.mcsave?checksum=e943c5dd44ff16a8d3fa9819534ff2bd" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/halloween.mcsave?checksum=cc540b15aa52e14a9eb02167b4dc69ce" } ], "bundlePacks": [ diff --git a/mashup_packs/index.json b/mashup_packs/index.json index 7bb512c..17c7564 100644 --- a/mashup_packs/index.json +++ b/mashup_packs/index.json @@ -12,7 +12,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/pirates_of_the_caribbean.mcsave?checksum=ca976c1efcc50b2cce4d852ac2db9e2f" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/pirates_of_the_caribbean.mcsave?checksum=59889701117c9b7481f33123d0e576ac" } ], "bundlePacks": [ @@ -43,7 +43,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/egyptian_mythology.mcsave?checksum=dcc3ac8075742e43aca29970a3f4a7cb" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/egyptian_mythology.mcsave?checksum=2d551fd170095908c40d5b5285854171" } ], "bundlePacks": [ @@ -74,7 +74,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/norse_mythology.mcsave?checksum=ddfe0a2669ecf056493668cf547b4320" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/norse_mythology.mcsave?checksum=c87536dd770a1860719e0ff33508cc52" } ], "bundlePacks": [ @@ -105,7 +105,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/festive.mcsave?checksum=57a5cd0cc2be85c8dedeb5b125d11b5b" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/festive.mcsave?checksum=9b2d120155413669a2f2f2b68e8933a9" } ], "bundlePacks": [ @@ -136,7 +136,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/chinese_mythology.mcsave?checksum=3d0f069e94574b18413bd2fded48f8c5" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/chinese_mythology.mcsave?checksum=64382d0c595870d977209b2c497dcb2e" } ], "bundlePacks": [ @@ -167,7 +167,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/greek_mythology.mcsave?checksum=184741d1889f2a348caacc8963ed635d" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/greek_mythology.mcsave?checksum=f865d1fae2187f79cfa0cf7e373d564a" } ], "bundlePacks": [ @@ -191,7 +191,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/fallout.mcsave?checksum=7d9b0ff2483086dcbebc7256afcc40bd" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/fallout.mcsave?checksum=ccc2623a36912cf2ba62b3112b820747" } ], "bundlePacks": [ @@ -215,7 +215,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/mass_effect.mcsave?checksum=a1d7f9148df30d16e826ceff3e89d2ea" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/mass_effect.mcsave?checksum=af228b71a741c9305d3611dbb5f88bd1" } ], "bundlePacks": [ @@ -235,6 +235,13 @@ "imageUrl": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/mashup_packs/preview_images/lbp_preview.png?checksum=123ec1874432e218c6307a57e08cac85", "worldTemplateDownloadURI": "https://github.com/BrandonItaly/LCE-Resources/raw/50525107964bd8589f7534c9470f4a1b21ea9087/world_templates/littlebigplanet.mcsave?checksum=03e9e06ff9792cc971cb44cdbbdab9a7", "worldTemplateFolderName": "LittleBigPlanet Mash-up", + "worldTemplateVariants": [ + { + "id": "26_1_2", + "minVersion": "26.1.2", + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/littlebigplanet.mcsave?checksum=c45a5914a8f635d889bf3c0ca2ebf2a8" + } + ], "bundlePacks": [ { "categoryId": "skinpacks", @@ -263,7 +270,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/halloween.mcsave?checksum=e943c5dd44ff16a8d3fa9819534ff2bd" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/halloween.mcsave?checksum=cc540b15aa52e14a9eb02167b4dc69ce" } ], "bundlePacks": [ @@ -294,7 +301,7 @@ { "id": "26_1_2", "minVersion": "26.1.2", - "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26_1_2/super_mario.mcsave?checksum=b4602f1848343ef902ed6a6959d733e3" + "downloadURI": "https://raw.githubusercontent.com/creeper2eletricboogaloo/L4JDownloadableContent/main/world_templates/26%2B/super_mario.mcsave?checksum=2758bca53ad1d84acfe514cbb9d3b18b" } ], "bundlePacks": [ diff --git a/scripts/make_bundle_preview.py b/scripts/make_bundle_preview.py index ee42fca..8a3d7b8 100644 --- a/scripts/make_bundle_preview.py +++ b/scripts/make_bundle_preview.py @@ -156,7 +156,7 @@ def second_row_names(bundle_dir: Path) -> list[str] | None: def main() -> int: parser = argparse.ArgumentParser() parser.add_argument("--base", default="cropped_bundle_clean.png") - parser.add_argument("--header", default="header.png") + parser.add_argument("--header", default="../preview logos/header.png") parser.add_argument("--bundle-dir") parser.add_argument("--output-name", default="preview.png") parser.add_argument("--no-header", action="store_true") diff --git a/scripts/update_links.py b/scripts/update_links.py index f02745e..7fa0c6b 100644 --- a/scripts/update_links.py +++ b/scripts/update_links.py @@ -413,6 +413,23 @@ def build_changes(root: Path, refs: list[UrlRef], config: dict) -> tuple[list[Ch return changes, sorted(set(additions), key=lambda item: (item.rel_file, item.path, item.order, item.variant_id)), config_additions, sorted(set(warnings)) +def build_local_changes(root: Path, refs: list[UrlRef]) -> tuple[list[Change], list[str]]: + changes: list[Change] = [] + warnings: list[str] = [] + for ref in refs: + rel_parts = parse_same_repo_raw(ref.value) + if rel_parts is None: + continue + local_path = root.joinpath(*rel_parts) + if not local_path.exists(): + warnings.append(f"Missing local file for {ref.rel_file} {ref.path}: {'/'.join(rel_parts)}") + continue + new_url = raw_url_for(rel_parts, md5_file(local_path)) + if new_url != ref.value: + changes.append(Change("local", ref.rel_file, ref.path, ref.value, new_url)) + return changes, sorted(set(warnings)) + + def replacement_token(value: str) -> str: return json.dumps(value, ensure_ascii=False) @@ -792,18 +809,24 @@ def main() -> int: mode = parser.add_mutually_exclusive_group(required=True) mode.add_argument("--check", action="store_true") mode.add_argument("--write", action="store_true") + parser.add_argument("--local-only", action="store_true", help="Only update same-repository raw GitHub checksum URLs.") args = parser.parse_args() root = repo_root() - config = load_config(root) texts, _, refs = load_json_files(root) - changes, additions, config_additions, warnings = build_changes(root, refs, config) + if args.local_only: + changes, warnings = build_local_changes(root, refs) + additions: list[VariantAddition] = [] + config_additions: list[ConfigTrackAddition] = [] + else: + config = load_config(root) + changes, additions, config_additions, warnings = build_changes(root, refs, config) if args.write and (changes or additions or config_additions): errors = write_changes(root, texts, changes, additions) if errors: for error in errors: print(error, file=sys.stderr) return 2 - if config_additions: + if not args.local_only and config_additions: write_config_tracks(root, config, config_additions) print_report(changes, additions, config_additions, warnings, args.write and bool(changes or additions or config_additions)) return 0 diff --git a/world_templates/1.20+/adventure_time.mcsave b/world_templates/1.20+/adventure_time.mcsave new file mode 100644 index 0000000..7555d3b Binary files /dev/null and b/world_templates/1.20+/adventure_time.mcsave differ diff --git a/world_templates/1.20+/chinese_mythology.mcsave b/world_templates/1.20+/chinese_mythology.mcsave new file mode 100644 index 0000000..dbabd44 Binary files /dev/null and b/world_templates/1.20+/chinese_mythology.mcsave differ diff --git a/world_templates/1.20+/egyptian_mythology.mcsave b/world_templates/1.20+/egyptian_mythology.mcsave new file mode 100644 index 0000000..a225966 Binary files /dev/null and b/world_templates/1.20+/egyptian_mythology.mcsave differ diff --git a/world_templates/1.20+/fallout.mcsave b/world_templates/1.20+/fallout.mcsave new file mode 100644 index 0000000..1e3d467 Binary files /dev/null and b/world_templates/1.20+/fallout.mcsave differ diff --git a/world_templates/1.20+/festive.mcsave b/world_templates/1.20+/festive.mcsave new file mode 100644 index 0000000..91b8ee7 Binary files /dev/null and b/world_templates/1.20+/festive.mcsave differ diff --git a/world_templates/1.20+/greek_mythology.mcsave b/world_templates/1.20+/greek_mythology.mcsave new file mode 100644 index 0000000..5dddef0 Binary files /dev/null and b/world_templates/1.20+/greek_mythology.mcsave differ diff --git a/world_templates/1.20+/halloween.mcsave b/world_templates/1.20+/halloween.mcsave new file mode 100644 index 0000000..40e6b92 Binary files /dev/null and b/world_templates/1.20+/halloween.mcsave differ diff --git a/world_templates/1.20+/halo.mcsave b/world_templates/1.20+/halo.mcsave new file mode 100644 index 0000000..6d246ef Binary files /dev/null and b/world_templates/1.20+/halo.mcsave differ diff --git a/world_templates/1.20+/littlebigplanet.mcsave b/world_templates/1.20+/littlebigplanet.mcsave new file mode 100644 index 0000000..5c84564 Binary files /dev/null and b/world_templates/1.20+/littlebigplanet.mcsave differ diff --git a/world_templates/1.20+/mass_effect.mcsave b/world_templates/1.20+/mass_effect.mcsave new file mode 100644 index 0000000..2497438 Binary files /dev/null and b/world_templates/1.20+/mass_effect.mcsave differ diff --git a/world_templates/1.20+/norse_mythology.mcsave b/world_templates/1.20+/norse_mythology.mcsave new file mode 100644 index 0000000..53370a4 Binary files /dev/null and b/world_templates/1.20+/norse_mythology.mcsave differ diff --git a/world_templates/1.20+/pirates_of_the_caribbean.mcsave b/world_templates/1.20+/pirates_of_the_caribbean.mcsave new file mode 100644 index 0000000..506f3f0 Binary files /dev/null and b/world_templates/1.20+/pirates_of_the_caribbean.mcsave differ diff --git a/world_templates/1.20+/skyrim.mcsave b/world_templates/1.20+/skyrim.mcsave new file mode 100644 index 0000000..685dd9b Binary files /dev/null and b/world_templates/1.20+/skyrim.mcsave differ diff --git a/world_templates/1.20+/steven_universe.mcsave b/world_templates/1.20+/steven_universe.mcsave new file mode 100644 index 0000000..9c4684a Binary files /dev/null and b/world_templates/1.20+/steven_universe.mcsave differ diff --git a/world_templates/1.20+/super_mario.mcsave b/world_templates/1.20+/super_mario.mcsave new file mode 100644 index 0000000..1875ba5 Binary files /dev/null and b/world_templates/1.20+/super_mario.mcsave differ diff --git a/world_templates/1.20+/the_nightmare_before_christmas.mcsave b/world_templates/1.20+/the_nightmare_before_christmas.mcsave new file mode 100644 index 0000000..41e46f7 Binary files /dev/null and b/world_templates/1.20+/the_nightmare_before_christmas.mcsave differ diff --git a/world_templates/1.20+/toy_story.mcsave b/world_templates/1.20+/toy_story.mcsave new file mode 100644 index 0000000..c932d6c Binary files /dev/null and b/world_templates/1.20+/toy_story.mcsave differ diff --git a/world_templates/26+/adventure_time.mcsave b/world_templates/26+/adventure_time.mcsave new file mode 100644 index 0000000..82169a2 Binary files /dev/null and b/world_templates/26+/adventure_time.mcsave differ diff --git a/world_templates/26+/chinese_mythology.mcsave b/world_templates/26+/chinese_mythology.mcsave new file mode 100644 index 0000000..83fe9ac Binary files /dev/null and b/world_templates/26+/chinese_mythology.mcsave differ diff --git a/world_templates/26+/egyptian_mythology.mcsave b/world_templates/26+/egyptian_mythology.mcsave new file mode 100644 index 0000000..35fc9cd Binary files /dev/null and b/world_templates/26+/egyptian_mythology.mcsave differ diff --git a/world_templates/26+/fallout.mcsave b/world_templates/26+/fallout.mcsave new file mode 100644 index 0000000..9e370ab Binary files /dev/null and b/world_templates/26+/fallout.mcsave differ diff --git a/world_templates/26+/festive.mcsave b/world_templates/26+/festive.mcsave new file mode 100644 index 0000000..74e4ee6 Binary files /dev/null and b/world_templates/26+/festive.mcsave differ diff --git a/world_templates/26+/greek_mythology.mcsave b/world_templates/26+/greek_mythology.mcsave new file mode 100644 index 0000000..7892bc3 Binary files /dev/null and b/world_templates/26+/greek_mythology.mcsave differ diff --git a/world_templates/26+/halloween.mcsave b/world_templates/26+/halloween.mcsave new file mode 100644 index 0000000..ad9e176 Binary files /dev/null and b/world_templates/26+/halloween.mcsave differ diff --git a/world_templates/26+/halo.mcsave b/world_templates/26+/halo.mcsave new file mode 100644 index 0000000..ddb59ac Binary files /dev/null and b/world_templates/26+/halo.mcsave differ diff --git a/world_templates/26+/littlebigplanet.mcsave b/world_templates/26+/littlebigplanet.mcsave new file mode 100644 index 0000000..a3c262c Binary files /dev/null and b/world_templates/26+/littlebigplanet.mcsave differ diff --git a/world_templates/26+/mass_effect.mcsave b/world_templates/26+/mass_effect.mcsave new file mode 100644 index 0000000..2652c61 Binary files /dev/null and b/world_templates/26+/mass_effect.mcsave differ diff --git a/world_templates/26+/norse_mythology.mcsave b/world_templates/26+/norse_mythology.mcsave new file mode 100644 index 0000000..1f9bb7c Binary files /dev/null and b/world_templates/26+/norse_mythology.mcsave differ diff --git a/world_templates/26+/pirates_of_the_caribbean.mcsave b/world_templates/26+/pirates_of_the_caribbean.mcsave new file mode 100644 index 0000000..bbe4cd9 Binary files /dev/null and b/world_templates/26+/pirates_of_the_caribbean.mcsave differ diff --git a/world_templates/26+/skyrim.mcsave b/world_templates/26+/skyrim.mcsave new file mode 100644 index 0000000..4ff5614 Binary files /dev/null and b/world_templates/26+/skyrim.mcsave differ diff --git a/world_templates/26+/steven_universe.mcsave b/world_templates/26+/steven_universe.mcsave new file mode 100644 index 0000000..dbd10be Binary files /dev/null and b/world_templates/26+/steven_universe.mcsave differ diff --git a/world_templates/26+/super_mario.mcsave b/world_templates/26+/super_mario.mcsave new file mode 100644 index 0000000..d42a7d8 Binary files /dev/null and b/world_templates/26+/super_mario.mcsave differ diff --git a/world_templates/26_1_2/super_mario.mcsave b/world_templates/26+/the_nightmare_before_christmas.mcsave similarity index 59% rename from world_templates/26_1_2/super_mario.mcsave rename to world_templates/26+/the_nightmare_before_christmas.mcsave index 9a9f85a..f5fe295 100644 Binary files a/world_templates/26_1_2/super_mario.mcsave and b/world_templates/26+/the_nightmare_before_christmas.mcsave differ diff --git a/world_templates/26+/toy_story.mcsave b/world_templates/26+/toy_story.mcsave new file mode 100644 index 0000000..c87c40d Binary files /dev/null and b/world_templates/26+/toy_story.mcsave differ diff --git a/world_templates/26_1_2/chinese_mythology.mcsave b/world_templates/26_1_2/chinese_mythology.mcsave deleted file mode 100644 index a0094c1..0000000 Binary files a/world_templates/26_1_2/chinese_mythology.mcsave and /dev/null differ diff --git a/world_templates/26_1_2/egyptian_mythology.mcsave b/world_templates/26_1_2/egyptian_mythology.mcsave deleted file mode 100644 index d2e4b41..0000000 Binary files a/world_templates/26_1_2/egyptian_mythology.mcsave and /dev/null differ diff --git a/world_templates/26_1_2/fallout.mcsave b/world_templates/26_1_2/fallout.mcsave deleted file mode 100644 index d09f3db..0000000 Binary files a/world_templates/26_1_2/fallout.mcsave and /dev/null differ diff --git a/world_templates/26_1_2/festive.mcsave b/world_templates/26_1_2/festive.mcsave deleted file mode 100644 index faac58c..0000000 Binary files a/world_templates/26_1_2/festive.mcsave and /dev/null differ diff --git a/world_templates/26_1_2/greek_mythology.mcsave b/world_templates/26_1_2/greek_mythology.mcsave deleted file mode 100644 index 4bb1daa..0000000 Binary files a/world_templates/26_1_2/greek_mythology.mcsave and /dev/null differ diff --git a/world_templates/26_1_2/halloween.mcsave b/world_templates/26_1_2/halloween.mcsave deleted file mode 100644 index 9035be8..0000000 Binary files a/world_templates/26_1_2/halloween.mcsave and /dev/null differ diff --git a/world_templates/26_1_2/mass_effect.mcsave b/world_templates/26_1_2/mass_effect.mcsave deleted file mode 100644 index ee6a4c5..0000000 Binary files a/world_templates/26_1_2/mass_effect.mcsave and /dev/null differ diff --git a/world_templates/26_1_2/norse_mythology.mcsave b/world_templates/26_1_2/norse_mythology.mcsave deleted file mode 100644 index 5cc4323..0000000 Binary files a/world_templates/26_1_2/norse_mythology.mcsave and /dev/null differ diff --git a/world_templates/26_1_2/pirates_of_the_caribbean.mcsave b/world_templates/26_1_2/pirates_of_the_caribbean.mcsave deleted file mode 100644 index 30c8065..0000000 Binary files a/world_templates/26_1_2/pirates_of_the_caribbean.mcsave and /dev/null differ