From cf15744a8bb5e512dcf7ff569ed131ab4d3663c8 Mon Sep 17 00:00:00 2001 From: DitFranXX Date: Thu, 10 Dec 2020 22:12:18 +0900 Subject: [PATCH] Forte Support Draft --- nostalgia@asphyxia/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nostalgia@asphyxia/index.ts b/nostalgia@asphyxia/index.ts index faad91c..a438f9e 100644 --- a/nostalgia@asphyxia/index.ts +++ b/nostalgia@asphyxia/index.ts @@ -6,7 +6,7 @@ export function register() { const MultiRoute = (method: string, handler: EPR | boolean) => { // Helper for register multiple versions. - // But.. only Opus 2 for now. + R.Route(method, handler); // First version and Forte. R.Route(`op2_${method}`, handler); }; @@ -25,4 +25,10 @@ export function register() { PlayerRoute('get_playdata', get_playdata) PlayerRoute('regist_playdata', regist_playdata) PlayerRoute('set_total_result', set_total_result) + + R.Unhandled(async (info, data, send) => { + if (["eventlog"].includes(info.module)) return; + console.error(`Received Unhandled Response on ${info.method} by ${info.model}/${info.module}`) + console.error(`Received Request: ${JSON.stringify(data, null, 4)}`) + }) } \ No newline at end of file