#if the conveyer was full, it means that it also was blocked
#if the conveyer was full, it means that it also was blocked
...
@@ -221,8 +243,7 @@ class Conveyer(CoreObject):
...
@@ -221,8 +243,7 @@ class Conveyer(CoreObject):
defhaveToDispose(self,callerObject=None):
defhaveToDispose(self,callerObject=None):
#it has meaning only if there are one or more entities in the conveyer
#it has meaning only if there are one or more entities in the conveyer
iflen(self.position)>0:
iflen(self.position)>0:
returnlen(self.Res.activeQ)>0andself.length-self.position[0]<0.000001#the conveyer can dispose an object
returnlen(self.getActiveObjectQueue())>0andself.length-self.position[0]<0.000001#the conveyer can dispose an object #only when an entity is at the end of it
#only when an entity is at the end of it
else:
else:
returnFalse
returnFalse
...
@@ -230,8 +251,8 @@ class Conveyer(CoreObject):
...
@@ -230,8 +251,8 @@ class Conveyer(CoreObject):
#the conveyer full even when it has one place
#the conveyer full even when it has one place
defisFull(self):
defisFull(self):
totalLength=0
totalLength=0
foriinrange(len(self.Res.activeQ)):
forentityinself.getActiveObjectQueue():
totalLength+=self.Res.activeQ[i].length
totalLength+=entity.length
returnself.length<totalLength
returnself.length<totalLength
#checks if the Mover should be called so that the move is performed
#checks if the Mover should be called so that the move is performed
...
@@ -241,9 +262,9 @@ class Conveyer(CoreObject):
...
@@ -241,9 +262,9 @@ class Conveyer(CoreObject):
#checks if the conveyer is ready to receive or dispose an entity
#checks if the conveyer is ready to receive or dispose an entity