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