diff options
Diffstat (limited to 'webAO/packets/handlers/handleRT.ts')
| -rw-r--r-- | webAO/packets/handlers/handleRT.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/webAO/packets/handlers/handleRT.ts b/webAO/packets/handlers/handleRT.ts new file mode 100644 index 0000000..62ebb1e --- /dev/null +++ b/webAO/packets/handlers/handleRT.ts @@ -0,0 +1,25 @@ +import { client } from "../../client"; +import { initTestimonyUpdater } from '../../viewport/utils/initTestimonyUpdater' + +/** + * Handles a testimony states. + * @param {Array} args packet arguments + */ +export const handleRT = (args: string[]) => { + const judgeid = Number(args[2]); + switch (args[1]) { + case "testimony1": + client.testimonyID = 1; + break; + case "testimony2": + // Cross Examination + client.testimonyID = 2; + break; + case "judgeruling": + client.testimonyID = 3 + judgeid; + break; + default: + console.warn("Invalid testimony"); + } + initTestimonyUpdater(); +}
\ No newline at end of file |
