Commit 590f6419 authored by Ralf's avatar Ralf
Browse files

Tell people they're alone when they are

parent b483dfcd
......@@ -112,8 +112,9 @@ class Labyrinth:
descr += "Next to you, "+describeThings(local)+"\n"
for direction, (dy,dx) in directions.items():
field = player.field.neighbor(dx=dx, dy=dy)
if field is None: continue
if field.things:
if field is None:
descr += "In the "+direction+", you see a weird kind of void. What could that be? Only time will tell...\n"
elif field.things:
descr += "In the "+direction+", "+describeThings(field.things)+"\n"
return descr
......
......@@ -108,13 +108,19 @@ class Player(Thing):
elif verb in sayVerbs:
msg = " ".join(words[1:])
someoneClose = False
for dx, dy in directionOffsets.values():
for thing in self.field.neighbor(dx=dx, dy=dy).things:
if isinstance(thing, Player) and thing != self:
assert thing != self
if isinstance(thing, Player):
someoneClose = True
thing.send("You hear someone saying: "+msg)
for admin in self.game.admins:
admin.send("{0} says: {1}".format(self.uid, msg))
self.send("You say: "+msg)
if someoneClose:
self.send("You say: "+msg)
else:
self.send("You want to say something, but then you realize nobody's caring anyway. Get over it!")
elif verb in leaveVerbs:
self.send("Good Bye!")
self.game.removePlayer(self)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment