Remove unneeded spawningFacet field; mark StopOnRetract entities

This commit is contained in:
Tony Garnock-Jones 2023-05-28 11:38:05 +02:00
parent 39fb9cb92e
commit 021fdf06bb
2 changed files with 5 additions and 2 deletions

View File

@ -249,10 +249,13 @@ export class Facet {
}
}
export const STOP_ON_RETRACT = Symbol('stop-on-retract'); // NB. NOT A GLOBAL SYMBOL
export class StopOnRetract implements Partial<Entity> {
retract(_handle: Handle): void {
Turn.active.stop();
}
data = STOP_ON_RETRACT;
}
export function _sync_impl(e: Partial<Entity>, peer: Ref): void {
@ -359,7 +362,7 @@ export class Turn {
describe() { return { type: 'bootActor', detail }; },
});
},
{ type: 'spawnActor', detail, spawningFacet, initialAssertions });
{ type: 'spawnActor', detail, initialAssertions });
return newActor;
}

View File

@ -21,7 +21,7 @@ export type TaskDescription =
export type TaskAction = { targetFacet: Facet, action: ActionDescription };
export type ActionDescription =
| { type: 'spawnActor', detail?: AnyValue, spawningFacet: Facet, initialAssertions: IdentitySet<Handle> }
| { type: 'spawnActor', detail?: AnyValue, initialAssertions: IdentitySet<Handle> }
| { type: 'stopActor', err?: AnyValue }
| { type: 'inertCheck' }