aboutsummaryrefslogtreecommitdiff
path: root/codegen/migrate.py
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/migrate.py')
-rw-r--r--codegen/migrate.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/codegen/migrate.py b/codegen/migrate.py
index 7cd46058..edcf85a7 100644
--- a/codegen/migrate.py
+++ b/codegen/migrate.py
@@ -1,3 +1,4 @@
+from lib.code.packet import fix_state
from lib.utils import PacketIdentifier, group_packets
import lib.code.utils
import lib.code.version
@@ -24,12 +25,12 @@ for packet in old_packet_list:
assert packet['class'].endswith('.class')
packet_name = old_mappings.get_class(packet['class'][:-6])
old_packets[PacketIdentifier(
- packet['id'], packet['direction'].lower(), packet['state'].lower())] = packet_name
+ packet['id'], packet['direction'].lower(), fix_state(packet['state']))] = packet_name
for packet in new_packet_list:
assert packet['class'].endswith('.class')
packet_name = new_mappings.get_class(packet['class'][:-6])
new_packets[PacketIdentifier(
- packet['id'], packet['direction'].lower(), packet['state'].lower())] = packet_name
+ packet['id'], packet['direction'].lower(), fix_state(packet['state']))] = packet_name
# find removed packets
removed_packets: list[PacketIdentifier] = []