diff options
| author | 2026-06-02 22:27:51 -0400 | |
|---|---|---|
| committer | 2026-06-02 22:27:51 -0400 | |
| commit | 36871052773638da16a8795c657b03064138f388 (patch) | |
| tree | 588a4b1b134d4fd24fe7ddfc734395170b8faf39 /ModSlots/ModSlots.py | |
| parent | d40ec05f3e61b51be0b6a7797fc11e0b626d238b (diff) | |
| download | NewCamera-36871052773638da16a8795c657b03064138f388.tar.gz NewCamera-36871052773638da16a8795c657b03064138f388.tar.bz2 NewCamera-36871052773638da16a8795c657b03064138f388.zip | |
ModSlots and Scripts cleanup
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'ModSlots/ModSlots.py')
| -rwxr-xr-x | ModSlots/ModSlots.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ModSlots/ModSlots.py b/ModSlots/ModSlots.py index 6460f4c..48b5ca5 100755 --- a/ModSlots/ModSlots.py +++ b/ModSlots/ModSlots.py @@ -79,13 +79,14 @@ def Error(msg): print(msg + '\n' + '^'*len(msg)) Warning_Index = 1 -def Warn(msg): +def Warn(msg, inline=True): global Error_Messages global Warning_Index msg = f'W(#{Warning_Index}): {msg}' Error_Messages.append(msg) Warning_Index += 1 - print(msg + '\n' + '^'*len(msg)) + if inline: + print(msg + '\n' + '^'*len(msg)) class ArchiveType(Enum): ZIP = 0 @@ -286,7 +287,7 @@ class Mod(): os.remove(target) elif os.path.isfile(target) or os.path.isdir(target): if not copy: - Warn(f'Not replacing/removing non-symlink file: {target}') + Warn(f'Not replacing non-symlink file: {target}', False) continue file = os.path.join(output, self.raw_map[key]) if copy: @@ -303,7 +304,7 @@ class Mod(): if os.path.islink(target): os.remove(target) elif os.path.isfile(target) or os.path.isdir(target): - Warn(f'Not deleting non-symlink file: {target}') + Warn(f'Not deleting non-symlink file: {target}', False) def is_armor_override(line): sp = line.split('/') @@ -446,10 +447,12 @@ if Mode == 'write': l.write(hex(struct.unpack('!Q', struct.pack('!d', Seed))[0])[2:] + '\n') for mod in Mods: mod.write(old_list, l) + if len(old_list) > 0: + print('------------Removed------------') for old in old_list: old_target = os.path.join(Game_Directory, old) if os.path.islink(old_target): - print(f'Removing old link: {old_target}') + print(f'{old_target}') os.remove(old_target) if Mode == 'verify': |