refactor: sync schema
This commit is contained in:
parent
21ae93f1cc
commit
fe69ceb14b
|
@ -10,14 +10,9 @@ export class SynchronizedCreatePacket extends SynchronizedPacket {
|
|||
return super.pack(packet);
|
||||
}
|
||||
|
||||
static get schema() {
|
||||
const superSchema = super.schema;
|
||||
static get synchronizationSchema() {
|
||||
return {
|
||||
...superSchema,
|
||||
data: {
|
||||
...superSchema.data,
|
||||
spec: 'buffer',
|
||||
},
|
||||
spec: 'buffer',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import {SynchronizedPacket} from './synchronized.packet';
|
||||
|
||||
export class SynchronizedDestroyPacket extends SynchronizedPacket {
|
||||
}
|
||||
export class SynchronizedDestroyPacket extends SynchronizedPacket {}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import {SynchronizedPacket} from './synchronized.packet';
|
||||
|
||||
export class SynchronizedUpdatePacket extends SynchronizedPacket {
|
||||
}
|
||||
export class SynchronizedUpdatePacket extends SynchronizedPacket {}
|
||||
|
|
|
@ -8,10 +8,15 @@ export class SynchronizedPacket extends Packet {
|
|||
data: {
|
||||
synchronized: {
|
||||
type: 'uint8',
|
||||
id: 'uint32',
|
||||
id: 'varuint',
|
||||
},
|
||||
...this.synchronizationSchema,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
static get synchronizationSchema() {
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user