Move all root .py files into playscii/ package directory. Rename playscii.py to app.py, add __main__.py entry point. Convert bare imports to relative (within package) and absolute (in formats/ and games/). Data dirs stay at root.
23 lines
631 B
Python
23 lines
631 B
Python
from playscii.game_room import GameRoom
|
|
|
|
|
|
class MazeRoom(GameRoom):
|
|
def exited(self, new_room):
|
|
GameRoom.exited(self, new_room)
|
|
# clear message line when exiting
|
|
if self.world.hud:
|
|
self.world.hud.post_msg("")
|
|
|
|
|
|
class OutsideRoom(MazeRoom):
|
|
camera_follow_player = True
|
|
|
|
def entered(self, old_room):
|
|
MazeRoom.entered(self, old_room)
|
|
self.world.collision_enabled = False
|
|
self.world.app.camera.y_tilt = 4
|
|
|
|
def exited(self, new_room):
|
|
MazeRoom.exited(self, new_room)
|
|
self.world.collision_enabled = True
|
|
self.world.app.camera.y_tilt = 0
|