projects
/
koperkapel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
960200f
)
Add roach_at helper.
author
Simon Cross
<hodgestar@gmail.com>
Sat, 5 Mar 2016 13:29:18 +0000
(15:29 +0200)
committer
Simon Cross
<hodgestar@gmail.com>
Sat, 5 Mar 2016 13:29:18 +0000
(15:29 +0200)
koperkapel/vehicles/base.py
patch
|
blob
|
history
diff --git
a/koperkapel/vehicles/base.py
b/koperkapel/vehicles/base.py
index 31f7eeaaa4f9ced6ac2285ab336038afd7975841..c2a24f64ecbfb6cb5d9f27cc03ae11da0a3cf141 100644
(file)
--- a/
koperkapel/vehicles/base.py
+++ b/
koperkapel/vehicles/base.py
@@
-41,6
+41,12
@@
class Vehicle:
# line below records new seating on the world proxy
vehicle.seating = seating
+ def roach_at(self, world, seat_pos):
+ roach_seating = world.vehicles[self.vehicle_type].seating
+ if seat_pos >= len(roach_seating):
+ return None
+ return roach_seating[seat_pos]
+
_vehicle_types = {}
@classmethod