28 lines
2.1 KiB
Python
28 lines
2.1 KiB
Python
"""#71 (2026-11-26): Turtle/Octo item icons drew solid green (Deepsea Lobster 55509) wherever WoWHybridContent's overlay
|
|
does not paint (loot, tooltips, links, quest rewards). Catalogue audit of every Item.IconFileDataID (40679 rows) against
|
|
the af2ddfbb ROOT: exactly 11 FDIDs are missing, 8790000-8790010, the block stage198 (2026-11-22) reserved for the Octo
|
|
recipe icons and wrote into the Item rows but never shipped. Art-only step: add those 11 BLPs at their reserved FDIDs."""
|
|
import json, hashlib, struct, sys
|
|
from pathlib import Path
|
|
H = Path(__file__).resolve().parent; sys.path.insert(0, str(H))
|
|
import frozen_store as fs
|
|
md5 = lambda b: hashlib.md5(b).hexdigest(); sha = lambda b: hashlib.sha256(b).hexdigest()
|
|
REG = Path('/mnt/Games/@project/gateway/runtime/continuation-20261113/claude-lane/content/stage198-20261122/icon-fdids.json')
|
|
store = fs.Store(); root = store.root; lay = store.layout; assert lay['root_md5'] == fs.ROOT
|
|
have = set()
|
|
for g in lay['groups']:
|
|
f = 0
|
|
for (d,) in struct.iter_unpack('<I', memoryview(root)[g['ids_offset']:g['ckeys_offset']]):
|
|
f += d; have.add(f); f += 1
|
|
assets = []
|
|
for name, e in sorted(json.load(open(REG))['icons'].items(), key=lambda kv: kv[1]['fdid']):
|
|
raw = Path(e['asset']).read_bytes()
|
|
assert sha(raw) == e['sha256'] and md5(raw) == e['content_key'] and raw[:4] == b'BLP2', name
|
|
assert e['fdid'] not in have, (name, e['fdid'])
|
|
assets.append(dict(file_data_id=e['fdid'], path=e['path'], sha256=e['sha256'], ckey=e['content_key'], kind='BLP', file=e['asset']))
|
|
art = H / 'pins' / 'stage198-icons.json'; art.parent.mkdir(exist_ok=True)
|
|
raw = (json.dumps(dict(type='art', parent_root=fs.ROOT, assets=assets), indent=1) + '\n').encode(); art.write_bytes(raw)
|
|
(H / 'components.json').write_text(json.dumps([dict(file=str(art), sha256=sha(raw), type='art')], indent=2) + '\n')
|
|
(H / 'selected-root.json').write_text(json.dumps(dict(parent_build=fs.BUILD, parent_root=fs.ROOT, decoded_root_sha256=sha(bytes(root)), parent_root_sha256=sha(root)), indent=2) + '\n')
|
|
print('icons', len(assets), [a['file_data_id'] for a in assets])
|