Fix convert_constants.py on Python 3.12

This commit is contained in:
Agent X 2024-05-11 17:55:38 -04:00
parent e6880a5fee
commit 96018588cd
4 changed files with 6 additions and 1 deletions

View File

@ -169,7 +169,7 @@ def process_define(filename, line):
if p.startswith('0x'):
continue
p = re.sub(r'0x[a-fA-F0-9]+', '', p)
if re.search('[a-z]', p) != None and "VERSION_TEXT" not in line and "SM64COOPDX_VERSION" not in line:
if re.search(r'[a-z]', p) != None and "VERSION_TEXT" not in line and "SM64COOPDX_VERSION" not in line:
if 'gCurrentObject' not in line and verbose:
print('UNRECOGNIZED DEFINE: ' + line)
return None

View File

@ -5765,6 +5765,9 @@ PLAYER_INTERACTIONS_SOLID = 1
--- @type PlayerInteractions
PLAYER_INTERACTIONS_PVP = 2
--- @type integer
MAX_DESCRIPTION_STRING = 20
--- @type integer
MAX_RX_SEQ_IDS = 256

View File

@ -2072,6 +2072,7 @@
<br />
## [network_player.h](#network_player.h)
- MAX_DESCRIPTION_STRING
- MAX_RX_SEQ_IDS
- NETWORK_PLAYER_PING_TIMEOUT
- NETWORK_PLAYER_TIMEOUT

View File

@ -2135,6 +2135,7 @@ char gSmluaConstants[] = ""
"NETWORK_PLAYER_PING_TIMEOUT = 3\n"
"MAX_RX_SEQ_IDS = 256\n"
"USE_REAL_PALETTE_VAR = 0xFF\n"
"MAX_DESCRIPTION_STRING = 20\n"
"NPT_UNKNOWN = 0\n"
"NPT_LOCAL = 1\n"
"NPT_SERVER = 2\n"