19 lines
1.0 KiB
Python
19 lines
1.0 KiB
Python
"""Read recipe-related DB2 tables from the installed canonical content (cb30 store + cf2c helm-only change) by FDID."""
|
|
import sys,json,hashlib
|
|
from pathlib import Path
|
|
sys.path.insert(0,'/mnt/Games/@project/gateway/runtime/continuation-20261113/claude-lane/content/helm-alias-cb30-20261122')
|
|
import frozen_store as fs
|
|
C=fs.casc
|
|
T={'SkillLineAbility':1266278,'SpellReagents':841946,'SpellTotems':1002162,'SpellCastingRequirements':1002166,'SpellEffect':1140088,
|
|
'SpellName':1990283,'SpellFocusObject':1280620,'SkillLine':1240935,'TradeSkillCategory':1301101}
|
|
store=fs.Store(); root=store.root; lay=store.layout
|
|
routes=C.root_controls_batch(root,lay,set(T.values()))
|
|
out=Path('native'); out.mkdir(exist_ok=True)
|
|
for n,f in T.items():
|
|
cks={r['content_key'] for r in routes[f] if r['group']['locale']&2 and not r['group']['flags1']}
|
|
assert len(cks)==1,(n,cks); ck=cks.pop()
|
|
res=store.read(ck); assert res, n
|
|
raw=res[2]
|
|
assert hashlib.md5(raw).hexdigest()==ck, n
|
|
(out/f'{n}.db2').write_bytes(raw); print(n,ck,len(raw),raw[:4])
|