Handle disconnects gracefully! Handle KillObject to prevent perpetually inflating object store. Unsubscribe from rxjs subscription in bot.ts on disconnect. Stop ping timer. Don't re-create clientEvents on each login.

This commit is contained in:
Casper Warden
2017-12-14 01:21:18 +00:00
parent 4e8feb181f
commit c9831ab427
20 changed files with 223 additions and 82 deletions

View File

@@ -2,8 +2,8 @@
import { Circuit } from './Circuit';
import { Agent } from './Agent';
import { GameObject } from './Object';
import { NameValue } from "./NameValue";
import { ClientEvents } from "./ClientEvents";
import { NameValue } from './NameValue';
import { ClientEvents } from './ClientEvents';
export declare class ObjectStore {
private circuit;
private agent;
@@ -12,6 +12,7 @@ export declare class ObjectStore {
private objectsByParent;
private clientEvents;
constructor(circuit: Circuit, agent: Agent, clientEvents: ClientEvents);
deleteObject(objectID: number): void;
readExtraParams(buf: Buffer, pos: number, o: GameObject): number;
getObjectsByParent(parentID: number): GameObject[];
parseNameValues(str: string): {