Handle 'setProjectTimePaused' in asset and scheduler files

This commit is contained in:
2026-04-14 22:27:13 +02:00
parent c9b0e4c827
commit 4bf5afb263
3 changed files with 9 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ function removeInvalidatedInteractionLinks(
return silencedSoundEmitterIds.has(link.action.targetSoundEmitterId);
case "control":
switch (link.action.effect.type) {
case "setProjectTimePaused":
case "setActorPresence":
case "playActorAnimation":
case "followActorPath":

View File

@@ -613,6 +613,10 @@ function cloneDiscreteStateAsEffect(
state: RuntimeResolvedControlState["discrete"][number]
): ControlEffect {
switch (state.type) {
case "projectTimePaused":
throw new Error(
"Project time pause is intentionally not cloned into scheduler routine effects because pausing the scheduler clock would deadlock time progression."
);
case "actorPresence":
return createSetActorPresenceControlEffect({
target: state.target,

View File

@@ -534,6 +534,10 @@ export function getProjectScheduleEffectOptionId(
effect: ControlEffect
): ProjectScheduleEffectOptionId {
switch (effect.type) {
case "setProjectTimePaused":
throw new Error(
"Project time pause is intentionally not exposed in the schedule editor because a scheduler routine cannot safely pause its own project clock."
);
case "setActorPresence":
return effect.active ? "actor.present" : "actor.hidden";
case "playActorAnimation":