diff options
| author | mat <github@matdoes.dev> | 2022-05-25 20:30:34 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-25 20:30:34 -0500 |
| commit | 03c50bf22b731dd0d6ab92b789a63a4c80d163bb (patch) | |
| tree | 0221f569813f64a90b3f0ba74de194c50d3ba46c /codegen | |
| parent | 35511e83c3fc0d655686790ad662593f0406630a (diff) | |
| download | azalea-drasl-03c50bf22b731dd0d6ab92b789a63a4c80d163bb.tar.xz | |
delete files of removed packets
Diffstat (limited to 'codegen')
| -rw-r--r-- | codegen/lib/code/packet.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py index 427a2f3e..5d073d2b 100644 --- a/codegen/lib/code/packet.py +++ b/codegen/lib/code/packet.py @@ -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) |
