Mercurial > nagslang
comparison nagslang/game_object.py @ 319:01e98732de46
Open bulkheads are no longer opaque to furniture
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Fri, 06 Sep 2013 02:01:30 +0200 |
parents | 26d1978fa1da |
children | 5030ef2718ae |
comparison
equal
deleted
inserted
replaced
318:26d1978fa1da | 319:01e98732de46 |
---|---|
160 You can return `False` to ignore the collision, anything else | 160 You can return `False` to ignore the collision, anything else |
161 (including `None`) to process the collision as normal. | 161 (including `None`) to process the collision as normal. |
162 """ | 162 """ |
163 return True | 163 return True |
164 | 164 |
165 def collide_with_furniture(self, furniture): | |
166 return True | |
167 | |
165 @classmethod | 168 @classmethod |
166 def requires(cls): | 169 def requires(cls): |
167 """Hints for the level editor""" | 170 """Hints for the level editor""" |
168 return [("name", "string")] | 171 return [("name", "string")] |
169 | 172 |
306 def collide_with_protagonist(self, protagonist): | 309 def collide_with_protagonist(self, protagonist): |
307 if self.puzzler.get_state(): | 310 if self.puzzler.get_state(): |
308 # Reject the collision, we can walk through. | 311 # Reject the collision, we can walk through. |
309 return False | 312 return False |
310 return True | 313 return True |
314 | |
315 collide_with_furniture = collide_with_protagonist | |
311 | 316 |
312 @classmethod | 317 @classmethod |
313 def requires(cls): | 318 def requires(cls): |
314 return [("name", "string"), ("end1", "coordinates"), | 319 return [("name", "string"), ("end1", "coordinates"), |
315 ("end2", "coordinates"), ("key_state", "puzzler")] | 320 ("end2", "coordinates"), ("key_state", "puzzler")] |