mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 13:55:04 +02:00
Move method checker to template file
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { NgZone } from '@angular/core';
|
||||
import { getMethods } from 'ag-sockets/dist/browser';
|
||||
import {
|
||||
MapInfo, WorldState, PartyMember, PartyFlags, Action, NotificationFlags, Pony, LeaveReason,
|
||||
SayData, MapState, defaultMapState, Apply, InfoFlags, PonyData, FriendStatusData, WorldMap
|
||||
@@ -186,7 +185,7 @@ export class ClientActions extends ClientActionsTemplate {
|
||||
DEVELOPMENT && !TESTS && console.error(`actionParam: Invalid action: ${action}`);
|
||||
}
|
||||
}
|
||||
// @Method({ binary: [Bin.U8] })
|
||||
// @Method({ binary: [Bin.U8] }>)
|
||||
left(reason: LeaveReason) {
|
||||
this.game.player = undefined;
|
||||
this.game.map = createWorldMap();
|
||||
@@ -292,10 +291,3 @@ export class ClientActions extends ClientActionsTemplate {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
if (DEVELOPMENT) {
|
||||
getMethods(ClientActions)
|
||||
.filter(m => !m.options.binary)
|
||||
.forEach(m => console.error(`Missing binary encoding for ClientActions.${m.name}()`));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Method, SocketClient, Bin } from 'ag-sockets/dist/browser';
|
||||
import { Method, SocketClient, Bin, getMethods } from 'ag-sockets/dist/browser';
|
||||
import {
|
||||
MapInfo, WorldState, PartyFlags, Action, NotificationFlags, LeaveReason,
|
||||
SayData, MapState, PonyData, FriendStatusData} from './interfaces';
|
||||
@@ -51,3 +51,10 @@ export class ClientActionsTemplate implements SocketClient {
|
||||
@Method({ binary: [Bin.Obj] })
|
||||
testPositions(_data: { frame: number; x: number | undefined; y: number | undefined; moved: boolean; }[]) {}
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
if (DEVELOPMENT) {
|
||||
getMethods(ClientActionsTemplate)
|
||||
.filter(m => !m.options.binary)
|
||||
.forEach(m => console.error(`Missing binary encoding for ClientActions.${m.name}()`));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user