object move blocks

debug floaters
This commit is contained in:
azykov@mail.ru
2026-06-12 21:11:35 +03:00
parent 20a4edad5a
commit 209ff3f710
31 changed files with 527 additions and 53 deletions
+5 -8
View File
@@ -36,15 +36,12 @@ export class ScriptGameEventBus {
}
emit(event: string, context: Omit<ScriptContext, keyof ScriptCoroutineContext>): void {
console.log('emitting ' + event);
const coroutines = this.handlers[event]
?.map((h) => {
console.log(`passing ${event} to ${h.handler}(${JSON.stringify(context)}, ${JSON.stringify(h.coroutine)})`);
return h.handler({ ...context, ...h.coroutine });
});
console.log(coroutines);
?.map((h) => ({
owner: h.coroutine.thisObject.id,
name: `${h.coroutine.thisObjectType.name}[${h.coroutine.thisObject.id}]:${event}`,
coroutine: h.handler({ ...context, ...h.coroutine }),
}));
if (coroutines)
this.coroutines.push(coroutines);