Zombi Ubisoft (1986) PHP

par espritm · Remakes
pas encore noté
▶ Jouer 💬 Avis 1 Sources 🕘 Versions Éditer GitHub
games/zombi-ubisoft-1986-php / tools / extract / sources / probe-terminal.py · commit 5c56e28
"""Type commands into the original terminal; no command result or training flags patched."""from importlib.machinery import SourceFileLoaderfrom pathlib import Pathimport json,sysrunner=SourceFileLoader('rules','/workspace/analysis/rule-runner.py').load_module()root=Path('/workspace');world=json.loads((root/'analysis/extracted/world.json').read_text())command=sys.argv[1].replace('_',' ') if len(sys.argv)>1 else 'LIST'e=runner.Experiment('terminal-'+command.replace(' ','-').lower(),39,position_start=True)def key(name):    e.events += [f'{e.frame}:{name}+',f'{e.frame+24}:{name}-'];e.frame+=220e.key=keye.pokes += [f'8500:{0x6876+38*50+6:04x}=00']room=next(r for r in world['rooms'] if r['id']==39)row,col=next((y,x) for y,line in enumerate(room['objects_grid']) for x,v in enumerate(line) if v==75)e.mark('initial');e.select(4);e.key('copy');e.cell(row,col);e.key('copy');e.mark('login',500)e.key('copy');e.mark('ready');e.key('copy');e.mark('prompt')typing=f'{e.frame}:{command}\\n';e.frame+=len(command)*6+500;e.mark('response',500)if command=='LIST':e.key('copy');e.mark('list-second')e.key('copy');e.key('copy');e.mark('after-acknowledge')run=runner.subprocess.runrunner.subprocess.run=lambda cmd,**kwargs:run(cmd+['-type',typing],**kwargs)e.run(watch='66d1')