This commit is contained in:
ApfelTeeSaft
2026-05-29 23:41:27 +02:00
parent e998d5e0f3
commit 9bf95853bc
3 changed files with 10 additions and 1 deletions
+1
View File
@@ -58,6 +58,7 @@ build/*
/assets/**/*.bin /assets/**/*.bin
/sound/**/*.m64 /sound/**/*.m64
/sound/**/*.aiff /sound/**/*.aiff
!/sound/samples/sfx_mario_peach/07_mario_its_a_me_mario.aiff
!/levels/**/*custom*.png !/levels/**/*custom*.png
!/levels/**/*custom*/**/*.png !/levels/**/*custom*/**/*.png
!/actors/**/*custom*.png !/actors/**/*custom*.png
+9 -1
View File
@@ -3,10 +3,16 @@ import sys
import os import os
import json import json
PROTECTED_ASSETS = {
"sound/samples/sfx_mario_peach/07_mario_its_a_me_mario.aiff",
}
def read_asset_map(): def read_asset_map():
with open("assets.json") as f: with open("assets.json") as f:
ret = json.load(f) ret = json.load(f)
for asset in PROTECTED_ASSETS:
ret.pop(asset, None)
return ret return ret
@@ -50,7 +56,7 @@ def clean_assets(local_asset_file):
assets = set(read_asset_map().keys()) assets = set(read_asset_map().keys())
assets.update(read_local_asset_list(local_asset_file)) assets.update(read_local_asset_list(local_asset_file))
for fname in list(assets) + [".assets-local.txt"]: for fname in list(assets) + [".assets-local.txt"]:
if fname.startswith("@"): if fname.startswith("@") or fname in PROTECTED_ASSETS:
continue continue
try: try:
remove_file(fname) remove_file(fname)
@@ -268,6 +274,8 @@ def main():
# Remove old assets # Remove old assets
for asset in previous_assets: for asset in previous_assets:
if asset in PROTECTED_ASSETS:
continue
if asset not in new_assets: if asset not in new_assets:
try: try:
remove_file(asset) remove_file(asset)