Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
This commit is contained in:
+37
-5
@@ -16,6 +16,7 @@ sys.dont_write_bytecode = True
|
||||
|
||||
from source_manifest import addon_manifest
|
||||
from project_schema import parse_project
|
||||
from resource_references import hard_resource_references
|
||||
from external_addons import policy as external_policy, direct_for, resource_allowed, ALLOWED
|
||||
from release_check import audit, read_json, evidence_path
|
||||
|
||||
@@ -24,7 +25,15 @@ BASE = '58D0FB3206B6F859'
|
||||
PROJECTS = {'core': ('ERR_Core', '2528466DE220D91C', ())}
|
||||
|
||||
DIRECTORIES = {'Scripts', 'Prefabs', 'Configs', 'Missions', 'Worlds', 'UI', 'Materials', 'AI'}
|
||||
SUFFIXES = {'.c', '.et', '.conf', '.ent', '.layer', '.layout', '.emat', '.bt', '.meta', '.gproj'}
|
||||
SUFFIXES = {'.c', '.et', '.conf', '.ent', '.layer', '.layout', '.emat', '.bt', '.meta', '.gproj', '.imageset', '.png', '.edds'}
|
||||
# Locally authored atlas, with its editable FBX and native import result.
|
||||
# Keep binary-model admission scoped to this reviewed asset, not arbitrary Assets/.
|
||||
ATLAS_ROOT = 'addons/core/Assets/Items/ERR_Atlas/'
|
||||
ATLAS_FILES = {name + suffix for name in ('ERR_Atlas', 'ERR_AtlasLeaf')
|
||||
for suffix in ('.fbx', '.txo', '.xob', '.xob.meta')}
|
||||
ATLAS_FILES.update('AtlasTurn' + suffix for suffix in ('.agr', '.agr.meta', '.agf', '.agf.meta'))
|
||||
ATLAS_FILES.update(name + suffix for name in ('AtlasPrint', 'AtlasPaper', 'AtlasCover', 'AtlasWire')
|
||||
for suffix in ('.emat', '.emat.meta'))
|
||||
EXCLUDED = {'.git', '.build', '.local', '__pycache__', 'profiles', 'profile', 'cache',
|
||||
'runtime', 'evidence', 'vendor', 'vanilla', 'original', 'node_modules', '.agents', '.codex'}
|
||||
README = '''# DEVELOPMENT SOURCE BUNDLE — Co10 Escape Reintroduced
|
||||
@@ -41,7 +50,9 @@ Open addons/core/addon.gproj and use Missions/ERR_Everon.conf.
|
||||
|
||||
Scenario: {C1E20667DCE324ED}Missions/ERR_Everon.conf
|
||||
Use the installed engine's normal project/scenario workflow. This archive has not
|
||||
been compiled by its bundler; no native caches or binaries are included.
|
||||
been compiled by its bundler; no native caches or executable binaries are included.
|
||||
Authored UI textures include their PNG sources and Workbench-imported EDDS files.
|
||||
The authored atlas includes FBX/TXO model sources and its imported XOB resource.
|
||||
|
||||
Target: Everon, up to 12 players. The mod requires the listed external addons. This remains development source.
|
||||
Manual prison/scavenging/radio/extraction play, remote joins/reconnects and
|
||||
@@ -105,6 +116,8 @@ def inventory(root):
|
||||
folded.add(name.casefold())
|
||||
if parts[2] == 'addon.gproj' and len(parts) == 3:
|
||||
pass
|
||||
elif name.startswith(ATLAS_ROOT) and name[len(ATLAS_ROOT):] in ATLAS_FILES:
|
||||
pass
|
||||
elif len(parts) < 4 or parts[2] not in DIRECTORIES or path.suffix not in SUFFIXES - {'.gproj'}:
|
||||
raise ValueError(f'unreviewed addon source/resource format: {name}')
|
||||
result[name] = digest
|
||||
@@ -143,7 +156,26 @@ def validate(payload, root):
|
||||
suffix = PurePosixPath(name).suffix
|
||||
if suffix == '.meta':
|
||||
continue
|
||||
text = data.decode('utf-8') # Current reviewed handoff contains text assets only.
|
||||
if name.startswith(ATLAS_ROOT) and suffix in {'.fbx', '.xob', '.txo'}:
|
||||
stem = str(PurePosixPath(name).with_suffix(''))
|
||||
if any(stem + required not in payload for required in ('.xob', '.xob.meta', '.fbx')):
|
||||
raise ValueError(f'atlas model lacks source/runtime/metadata: {name}')
|
||||
signatures = {'.fbx': b'Kaydara FBX Binary', '.xob': b'FORM', '.txo': b'$object'}
|
||||
if not data.startswith(signatures[suffix]) or (suffix == '.xob' and data[8:12] != b'XOB9'):
|
||||
raise ValueError(f'invalid atlas model signature: {name}')
|
||||
continue
|
||||
if suffix in {'.png', '.edds'}:
|
||||
if not name.startswith('addons/core/UI/Textures/'):
|
||||
raise ValueError(f'image outside authored UI textures: {name}')
|
||||
signature = b'\x89PNG\r\n\x1a\n' if suffix == '.png' else b'DDS '
|
||||
if not data.startswith(signature):
|
||||
raise ValueError(f'invalid UI texture signature: {name}')
|
||||
# Workbench attaches PNG import settings to the EDDS runtime resource.
|
||||
runtime = str(PurePosixPath(name).with_suffix('.edds'))
|
||||
if runtime not in payload or runtime + '.meta' not in payload:
|
||||
raise ValueError(f'UI texture lacks imported runtime/metadata: {name}')
|
||||
continue
|
||||
text = data.decode('utf-8')
|
||||
if re.search(r'\b(?:ESCT\w*|SCRTC_\w+|SCRT_\w+|EAI_\w+)\b', text):
|
||||
raise ValueError(f'original ecosystem dependency: {name}')
|
||||
if suffix not in {'.c', '.layer', '.gproj'} and name + '.meta' not in payload:
|
||||
@@ -151,13 +183,13 @@ def validate(payload, root):
|
||||
owner = name.split('/')[1]
|
||||
visible = {owner, *PROJECTS[owner][2]}
|
||||
if 'core' in visible: visible.update(ALLOWED)
|
||||
for guid, resource in re.findall(r'\{([A-F0-9]{16})\}([^"\n]+)', text):
|
||||
for guid, resource in hard_resource_references(name, text):
|
||||
if guid in resources:
|
||||
path, target = resources[guid]
|
||||
if path != resource or target not in visible:
|
||||
raise ValueError(f'resource outside project dependency closure: {name}')
|
||||
elif vanilla.get(resource) != guid and not resource_allowed(external,visible,guid,resource):
|
||||
raise ValueError(f'unresolved or nonvanilla resource: {name}')
|
||||
raise ValueError(f'unresolved or nonvanilla resource: {name}: {{{guid}}}{resource}')
|
||||
return projects
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user