1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00

delete files of removed packets

This commit is contained in:
mat 2022-05-25 20:30:34 -05:00
parent 35511e83c3
commit 03c50bf22b

View file

@ -1,6 +1,7 @@
from .utils import burger_type_to_rust_type, write_packet_file
from ..utils import padded_hex, to_snake_case, to_camel_case
from ..mappings import Mappings
import os
def make_packet_mod_rs_line(packet_id: int, packet_class_name: str):
@ -222,5 +223,7 @@ def remove_packet_ids(removing_packet_ids: list[int], direction: str, state: str
if packet_id not in removing_packet_ids:
new_packet_ids.append(packet_id)
new_packet_class_names.append(packet_class_name)
os.remove(
f'../azalea-protocol/src/packets/{state}/{packet_class_name}.rs')
set_packets(new_packet_ids, new_packet_class_names, direction, state)