Remove unneeded spawningFacet field; mark StopOnRetract entities
This commit is contained in:
parent
39fb9cb92e
commit
021fdf06bb
|
@ -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> {
|
export class StopOnRetract implements Partial<Entity> {
|
||||||
retract(_handle: Handle): void {
|
retract(_handle: Handle): void {
|
||||||
Turn.active.stop();
|
Turn.active.stop();
|
||||||
}
|
}
|
||||||
|
data = STOP_ON_RETRACT;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function _sync_impl(e: Partial<Entity>, peer: Ref): void {
|
export function _sync_impl(e: Partial<Entity>, peer: Ref): void {
|
||||||
|
@ -359,7 +362,7 @@ export class Turn {
|
||||||
describe() { return { type: 'bootActor', detail }; },
|
describe() { return { type: 'bootActor', detail }; },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
{ type: 'spawnActor', detail, spawningFacet, initialAssertions });
|
{ type: 'spawnActor', detail, initialAssertions });
|
||||||
return newActor;
|
return newActor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ export type TaskDescription =
|
||||||
export type TaskAction = { targetFacet: Facet, action: ActionDescription };
|
export type TaskAction = { targetFacet: Facet, action: ActionDescription };
|
||||||
|
|
||||||
export type 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: 'stopActor', err?: AnyValue }
|
||||||
| { type: 'inertCheck' }
|
| { type: 'inertCheck' }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue