Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
bd720f0f
Commit
bd720f0f
authored
Oct 30, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LineCLearance cleanup
parent
e20b3402
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
dream/simulation/LineClearance.py
dream/simulation/LineClearance.py
+13
-0
No files found.
dream/simulation/LineClearance.py
View file @
bd720f0f
...
@@ -40,6 +40,19 @@ class LineClearance(Queue):
...
@@ -40,6 +40,19 @@ class LineClearance(Queue):
# only to the potential giver that will give the entity.
# only to the potential giver that will give the entity.
# =======================================================================
# =======================================================================
def
canAccept
(
self
,
callerObject
=
None
):
def
canAccept
(
self
,
callerObject
=
None
):
requesting
=
None
current
=
None
if
callerObject
:
if
len
(
callerObject
.
getActiveObjectQueue
()):
requesting
=
callerObject
.
getActiveObjectQueue
()[
0
]
if
len
(
self
.
getActiveObjectQueue
()):
current
=
self
.
getActiveObjectQueue
()[
0
]
if
requesting
and
current
:
if
requesting
.
parentBatch
!=
current
.
parentBatch
:
return
False
# get active and giver objects
# get active and giver objects
activeObject
=
self
.
getActiveObject
()
activeObject
=
self
.
getActiveObject
()
activeObjectQueue
=
self
.
getActiveObjectQueue
()
activeObjectQueue
=
self
.
getActiveObjectQueue
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment