|
|
@ -473,8 +473,13 @@ class Server: |
|
|
return True |
|
|
return True |
|
|
|
|
|
|
|
|
def clear_maps(self, exclude = "itemtest.bsp"): |
|
|
def clear_maps(self, exclude = "itemtest.bsp"): |
|
|
|
|
|
import os |
|
|
|
|
|
map_sizes = 0 |
|
|
map_list = glob(f"{self.root}/maps/*.bsp") |
|
|
map_list = glob(f"{self.root}/maps/*.bsp") |
|
|
self.o.info(f"Delete {len(map_list) - 1} maps?") |
|
|
for map_file in map_list: |
|
|
|
|
|
map_sizes += os.path.getsize(map_file) |
|
|
|
|
|
|
|
|
|
|
|
self.o.info(f"Delete {len(map_list) - 1} maps? Size ~ : {round(map_sizes/1024/1024)} MB") |
|
|
if self.wait_input(): |
|
|
if self.wait_input(): |
|
|
for map_path in map_list: |
|
|
for map_path in map_list: |
|
|
if exclude in map_path: |
|
|
if exclude in map_path: |
|
|
|