storage to human bug fixed
This commit is contained in:
@@ -291,7 +291,7 @@ export function useRetrieveHandler() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (human && !human.isScheduled && human.state === "idle" && human.currentLoad < action.loadCapacity) {
|
if (human) {
|
||||||
const triggeredModel = action.triggers[0]?.triggeredAsset?.triggeredModel?.modelUuid
|
const triggeredModel = action.triggers[0]?.triggeredAsset?.triggeredModel?.modelUuid
|
||||||
? getEventByModelUuid(selectedProduct.productUuid, action.triggers[0].triggeredAsset.triggeredModel.modelUuid)
|
? getEventByModelUuid(selectedProduct.productUuid, action.triggers[0].triggeredAsset.triggeredModel.modelUuid)
|
||||||
: null;
|
: null;
|
||||||
@@ -445,6 +445,7 @@ export function useRetrieveHandler() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
monitoredHumansRef.current.add(human.modelUuid);
|
monitoredHumansRef.current.add(human.modelUuid);
|
||||||
|
if (humanAsset?.animationState?.current === "pickup" && humanAsset.animationState.isCompleted) {
|
||||||
const lastMaterial = getLastMaterial(storageUnit.modelUuid);
|
const lastMaterial = getLastMaterial(storageUnit.modelUuid);
|
||||||
if (lastMaterial) {
|
if (lastMaterial) {
|
||||||
const material = createNewMaterial(lastMaterial.materialId, lastMaterial.materialType, storageAction as StorageAction);
|
const material = createNewMaterial(lastMaterial.materialId, lastMaterial.materialType, storageAction as StorageAction);
|
||||||
@@ -461,6 +462,7 @@ export function useRetrieveHandler() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (triggeredModel?.type === "crane") {
|
} else if (triggeredModel?.type === "crane") {
|
||||||
const crane = getCraneById(triggeredModel.modelUuid);
|
const crane = getCraneById(triggeredModel.modelUuid);
|
||||||
const action = getActionByUuid(selectedProduct.productUuid, crane?.currentAction?.actionUuid || "");
|
const action = getActionByUuid(selectedProduct.productUuid, crane?.currentAction?.actionUuid || "");
|
||||||
|
|||||||
Reference in New Issue
Block a user