feat(): add animation and call service & controllers (#259)

* feat(): add animation and call service & controllers

- run animations on interval so we don't lose animations when walking through doors
- move cl_call.ts to a class

* fix(animation/service): make everything private except for open/closePhone and start/endPhoneCall
This commit is contained in:
Dillon Skaggs authored and GitHub committed 2021-07-06 23:02:55 +02:00
1 parent 4ef89f679f
commit 398bfa2092
14 files changed
+412 -298

No files matched your search

+3 -3
View File
@@ -1,4 +1,4 @@
import { CallEvents } from '../../../typings/call';
import { CallEvents, CallRejectReasons } from '../../../typings/call';
import { getSource } from '../utils/miscUtils';
import CallService from './calls.service';
import { callLogger } from './calls.utils';
@@ -21,9 +21,9 @@ onNet(CallEvents.ACCEPT_CALL, (transmitterNumber: string) => {
);
});
onNet(CallEvents.REJECTED, (transmitterNumber: string) => {
onNet(CallEvents.REJECTED, (transmitterNumber: string, reason?: CallRejectReasons) => {
const src = getSource();
CallService.handleRejectCall(src, transmitterNumber).catch((e) =>
CallService.handleRejectCall(src, transmitterNumber, reason).catch((e) =>
callLogger.error(
`Error occured in rejectcall event (${transmitterNumber}), Error: ${e.message}`,
),