Update interaction system and project scheduler to use impulse steps

This commit is contained in:
2026-04-14 23:20:22 +02:00
parent 80e887c5bf
commit 07fcd85382
2 changed files with 21 additions and 10 deletions

View File

@@ -4,8 +4,8 @@ import {
type InteractionLink
} from "../interactions/interaction-links";
import {
getInteractionLinkSequenceSteps,
type SequenceStep
getInteractionLinkImpulseSteps,
type ImpulseSequenceStep
} from "../sequencer/project-sequence-steps";
import type {
@@ -699,14 +699,14 @@ export class RuntimeInteractionSystem {
continue;
}
for (const step of getInteractionLinkSequenceSteps(link)) {
for (const step of getInteractionLinkImpulseSteps(link)) {
this.dispatchSequenceStep(step, link, runtimeScene, dispatcher);
}
}
}
private dispatchSequenceStep(
step: SequenceStep,
step: ImpulseSequenceStep,
link: InteractionLink,
runtimeScene: RuntimeSceneDefinition,
dispatcher: RuntimeInteractionDispatcher

View File

@@ -21,12 +21,16 @@ import { normalizeYawDegrees } from "../entities/entity-instances";
import {
cloneProjectScheduler,
compareProjectScheduleRoutinePriority,
findProjectScheduleRoutineEffect,
getProjectScheduleRoutineElapsedHoursAt,
isProjectScheduleRoutineActiveAt,
type ProjectScheduler,
type ProjectScheduleRoutine
} from "../scheduler/project-scheduler";
} from "../sequencer/project-sequencer";
import {
findHeldSequenceControlEffect,
getHeldSequenceControlEffects,
getProjectScheduleRoutineHeldSteps
} from "../sequencer/project-sequence-steps";
type ActorScheduleRoutine = ProjectScheduleRoutine & {
target: {
@@ -421,15 +425,20 @@ export function resolveRuntimeActorScheduleState(options: {
};
}
const heldSteps = getProjectScheduleRoutineHeldSteps(activeRoutine);
const presenceEffect =
findProjectScheduleRoutineEffect(activeRoutine, "setActorPresence") ??
findHeldSequenceControlEffect(heldSteps, "setActorPresence") ??
createSetActorPresenceControlEffect({
target: createActorControlTargetRef(options.actorId),
active: true
});
const animationEffect =
findProjectScheduleRoutineEffect(activeRoutine, "playActorAnimation");
const pathEffect = findProjectScheduleRoutineEffect(activeRoutine, "followActorPath");
findHeldSequenceControlEffect(heldSteps, "playActorAnimation");
const pathEffect = findHeldSequenceControlEffect(
heldSteps,
"followActorPath"
);
const elapsedHours = getProjectScheduleRoutineElapsedHoursAt(
activeRoutine,
options.dayNumber,
@@ -502,7 +511,9 @@ function resolveRuntimeScheduledControlRoutines(options: {
continue;
}
for (const effect of routine.effects) {
for (const effect of getHeldSequenceControlEffects(
getProjectScheduleRoutineHeldSteps(routine)
)) {
const resolutionKey = getControlEffectResolutionKey(effect);
if (seenResolutionKeys.has(resolutionKey)) {