added multiple actions for storage unit , and simulation bug fix

This commit is contained in:
2025-08-22 09:52:02 +05:30
parent e950b0f54a
commit c24b0fd414
16 changed files with 112 additions and 189 deletions

View File

@@ -35,17 +35,15 @@ function PillarJibInstance({ crane }: { crane: CraneStatus }) {
if (!crane.isActive && crane.currentPhase === 'init' && crane.currentMaterials.length > 0 && action.maxPickUpCount <= crane.currentMaterials.length) {
setCurrentPhase(crane.modelUuid, 'init-pickup');
} else if (crane.currentPhase === 'picking' && crane.currentMaterials.length > 0 && action.maxPickUpCount <= crane.currentMaterials.length && !crane.isCarrying) {
if (action.triggers.length > 0) {
if (humanAsset?.animationState?.current === "working_standing" && humanAsset?.animationState?.isCompleted && humanId && humanAction && humanAction.actionType === 'operator') {
setCurrentAnimation(humanId, 'idle', true, true, true);
setIsCaryying(crane.modelUuid, true);
setCurrentPhase(crane.modelUuid, 'pickup-drop');
} else {
setCurrentPhaseHuman(humanId, 'hooking');
setHumanActive(humanId, true);
setHumanState(humanId, 'running');
setCurrentAnimation(humanId, 'working_standing', true, false, false);
}
if (humanAsset?.animationState?.current === "working_standing" && humanAsset?.animationState?.isCompleted && humanId && humanAction && humanAction.actionType === 'operator') {
setCurrentAnimation(humanId, 'idle', true, true, true);
setIsCaryying(crane.modelUuid, true);
setCurrentPhase(crane.modelUuid, 'pickup-drop');
} else {
setCurrentPhaseHuman(humanId, 'hooking');
setHumanActive(humanId, true);
setHumanState(humanId, 'running');
setCurrentAnimation(humanId, 'working_standing', true, false, false);
}
} else if (crane.currentPhase === 'dropping' && crane.currentMaterials.length > 0 && action.maxPickUpCount <= crane.currentMaterials.length && crane.isCarrying && human.currentPhase === 'hooking') {
setCurrentPhaseHuman(humanId, 'loadPoint-unloadPoint');