Commit e4a55f34 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

ExitJobShop getEntity controls if activeEntity concluded sequence and signals blocked buffer

parent 9fac9f8b
...@@ -63,4 +63,19 @@ class ExitJobShop(Exit): ...@@ -63,4 +63,19 @@ class ExitJobShop(Exit):
if activeObject.id in activeEntity.remainingRoute[0].get('stationIdsList',[]): if activeObject.id in activeEntity.remainingRoute[0].get('stationIdsList',[]):
return True return True
return False return False
def getEntity(self):
activeEntity = Exit.getEntity(self) #run the default method
from Globals import G
# for all the entities in the EntityList
for entity in G.EntityList:
requiredParts=entity.getRequiredParts()
if requiredParts:
# if the activeEntity is in the requierdParts of the entity
if activeEntity in requiredParts:
# if the entity that requires the activeEntity can proceed then signal the currentStation of the entity
if entity.checkIfRequiredPartsReady():
self.sendSignal(receiver=entity.currentStation, signal=entity.currentStation.canDispose)
return activeEntity
\ No newline at end of file
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