projects
/
koperkapel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ctpug.org.za:koperkapel
[koperkapel.git]
/
koperkapel
/
roaches.py
diff --git
a/koperkapel/roaches.py
b/koperkapel/roaches.py
index b39d189fe669c6571047973feb33f8b7b6e4eecc..95353ee18a441bdf947bb4cf07586c41e1faa18b 100644
(file)
--- a/
koperkapel/roaches.py
+++ b/
koperkapel/roaches.py
@@
-8,6
+8,13
@@
from .actors.orientatedsurf import OrientatedSurfActor
from .serums import roach_serum_color
from .serums import roach_serum_color
+def roach_by_name(world, roach_name):
+ roaches = [r for r in world.roaches if r.name == roach_name]
+ if not roaches:
+ return None
+ return roaches[0]
+
+
class RoachActor(OrientatedSurfActor):
def __init__(self, frames):
self._frames = frames
class RoachActor(OrientatedSurfActor):
def __init__(self, frames):
self._frames = frames