Commit f41ce2f1 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Jérome Perrin

haveToDispose of MouldAssemblyBuffer now checks whether the entity to be...

haveToDispose of MouldAssemblyBuffer now checks whether the entity to be disposed has manager, if yes performs default behaviour, otherwise checks if the manager is available
parent d5f80f1f
......@@ -136,11 +136,16 @@ class MouldAssemblyBuffer(QueueManagedJob):
# read the entity to be disposed
index = 0
activeEntity=None
for index in range(len(activeObjectQueue)):
if activeObjectQueue[index].order.componentsReadyForAssembly:
activeEntity=activeObjectQueue[index]
break
index +=1
for entity in activeObjectQueue:
if entity.order.componentsReadyForAssembly:
# if the entity has no manager
if entity.manager==None:
activeEntity=entity
break
# otherwise, if the manager of the entity is available
elif entity.manager.checkIfResourceIsAvailable:
activeEntity=entity
break
# if there is no entity in the activeQ that its parentOrder has the flag componentsReadyForAssembly set
if not activeEntity:
# return false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment