Skip to content

Commit

Permalink
loose coupling: Log takes a username now.
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Aug 8, 2010
1 parent 990e15c commit 22bd999
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions quest/eventlog.py
Expand Up @@ -76,8 +76,8 @@ def append(msg):
messages = {}

class Log(object):
def __init__(self, gs):
self.chanid = gs.player.username
def __init__(self, playername):
self.chanid = playername
messages[self.chanid] = []

comet.channels.create(self.chanid, append.name)
Expand Down
2 changes: 1 addition & 1 deletion quest/quest.py
Expand Up @@ -28,7 +28,7 @@ def startGame(self, player):
self.roomDisplay = component.Component(RoomDisplay(self.player.position, self))
self.spellInput = component.Component(SpellInput(self))

self.eventlog = component.Component(Log(self))
self.eventlog = component.Component(Log(self.player.username))

self.model("game")

Expand Down

0 comments on commit 22bd999

Please sign in to comment.