fix: production
This commit is contained in:
parent
db1baa5db4
commit
92b167237d
|
@ -17,7 +17,7 @@ for (const componentName in specificationsAndOrDecorators) {
|
|||
if ('function' === typeof specificationOrDecorator) {
|
||||
Components[componentName] = specificationOrDecorator(
|
||||
class Decorated extends Arbitrary {
|
||||
static name = componentName;
|
||||
static componentName = componentName;
|
||||
}
|
||||
);
|
||||
if (!Components[componentName]) {
|
||||
|
@ -26,7 +26,7 @@ for (const componentName in specificationsAndOrDecorators) {
|
|||
}
|
||||
else {
|
||||
Components[componentName] = class Component extends Arbitrary {
|
||||
static name = componentName;
|
||||
static componentName = componentName;
|
||||
static schema = new Schema({
|
||||
type: 'object',
|
||||
properties: specificationOrDecorator,
|
||||
|
|
|
@ -83,7 +83,7 @@ export default class Base {
|
|||
}
|
||||
|
||||
markChange(entityId, key, value) {
|
||||
this.ecs.markChange(entityId, {[this.constructor.name]: {[key]: value}})
|
||||
this.ecs.markChange(entityId, {[this.constructor.componentName]: {[key]: value}})
|
||||
}
|
||||
|
||||
mergeDiff(original, update) {
|
||||
|
|
|
@ -51,8 +51,10 @@ onmessage = async (event) => {
|
|||
postMessage(encode({type: 'ConnectionStatus', payload: 'connected'}));
|
||||
})();
|
||||
|
||||
import.meta.hot.accept('../../engine/engine.js', async () => {
|
||||
await engine.disconnectPlayer(0, 0);
|
||||
postMessage(encode({type: 'ConnectionStatus', payload: 'aborted'}));
|
||||
close();
|
||||
});
|
||||
if (import.meta.hot) {
|
||||
import.meta.hot.accept('../../engine/engine.js', async () => {
|
||||
await engine.disconnectPlayer(0, 0);
|
||||
postMessage(encode({type: 'ConnectionStatus', payload: 'aborted'}));
|
||||
close();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user