mirror of
https://github.com/ApfelTeeSaft/sm64-star-rando-hack.git
synced 2026-08-26 19:33:38 +00:00
funny
This commit is contained in:
@@ -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
@@ -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)
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user