fixing things

This commit is contained in:
VerstreuteSeele
2023-01-10 00:23:50 +01:00
parent 250b463b30
commit 1a23515ebd
17 changed files with 21 additions and 678 deletions
+16 -6
View File
@@ -298,7 +298,11 @@ class DolphinManifest:
if len(newname) < 2:
newname = name.split("/")
newname = str(newname[1])
try: # Flipper Zero moment. loading all assets in one script, lol.
newname = str(newname[1]) # external shit we modified
except:
newname = str(newname[0]) # everything else... smh
animation.load(os.path.join(loc, newname))
# Add to array
@@ -369,11 +373,17 @@ class Dolphin:
self.logger = logging.getLogger("Dolphin")
def load(self, valid_dirs: list):
for loc in valid_dirs:
assert os.path.isdir(loc)
# Load Manifest
self.logger.info(f"Loading directory {loc}")
self.manifest.load(loc)
if not "external" in str(valid_dirs):
assert os.path.isdir(valid_dirs)
# Load Manifest
self.logger.info(f"Loading directory {valid_dirs}")
self.manifest.load(valid_dirs)
else:
for loc in valid_dirs:
assert os.path.isdir(loc)
# Load Manifest
self.logger.info(f"Loading directory {loc}")
self.manifest.load(loc)
def pack(self, output_directory: str, symbol_name: str = None):
self.manifest.save(output_directory, symbol_name)