Integrate mission-owned chat administration and menu

This commit is contained in:
2026-09-19 23:49:54 +02:00
parent 27989b85a3
commit 5e742691ad
154 changed files with 19498 additions and 134 deletions
+32
View File
@@ -0,0 +1,32 @@
"""Strict reviewed addon project grammar shared by source and packed validation.
The optional Core menu configuration preserves vanilla and adds one owned resource.
This is deliberately not a general Enfusion project parser: unreviewed settings,
other platforms, resource substitutions and omissions from the exact list fail.
Identity and exact dependency closure remain the caller's responsibility.
"""
import re
CORE_MENU_CONFIGURATION = r"""
Configurations\s*\{\s*
GameProjectConfig\s+PC\s*\{\s*
MenuManagerSettings\s+MenuManagerSettings\s+"\{50C890C996B0A6FC\}"\s*\{\s*
MenuConfigs\s*\{\s*
"\{C747AFB6B750CE9A\}Configs/System/chimeraMenus\.conf"\s*
"\{B48C7FA12692DE03\}Configs/ERR/AdminMenus\.conf"\s*
\}\s*\}\s*\}\s*\}
"""
def parse_project(text, *, allow_core_menu=False):
"""Return identity/GUID/title/dependency captures, or None for unreviewed syntax."""
extension = ''
if allow_core_menu:
extension = '(?:' + CORE_MENU_CONFIGURATION + r'\s*)?'
return re.fullmatch(
r'\s*GameProject\s*\{\s*'
r'ID\s+"([^"\r\n]+)"\s*'
r'GUID\s+"([A-F0-9]{16})"\s*'
r'TITLE\s+"([^"\r\n]+)"\s*'
r'Dependencies\s*\{((?:\s*"[A-F0-9]{16}"\s*)+)\}\s*'
+ extension + r'\}\s*', text, re.VERBOSE)