forked from vantablack/vantaMOO
Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Alexander Yakovlev | 409029e55a | |
Alexander Yakovlev | 3bd279b9aa | |
oreolek | 5669bcfbef |
|
@ -5,7 +5,32 @@ Rooms are simple containers that has no location of their own.
|
|||
|
||||
"""
|
||||
from lib.rpsystem import ContribRPRoom
|
||||
from evennia.utils import logger
|
||||
|
||||
# rpsystem
|
||||
class Room(ContribRPRoom):
|
||||
pass
|
||||
|
||||
class VBGB(Room):
|
||||
def at_say(
|
||||
self,
|
||||
message,
|
||||
msg_self=None,
|
||||
msg_location=None,
|
||||
receivers=None,
|
||||
msg_receivers=None,
|
||||
**kwargs,
|
||||
):
|
||||
if not self.channel:
|
||||
# connect to Evennia channel
|
||||
channel = search.channel_search("VBGB")
|
||||
if not channel:
|
||||
raise RuntimeError(f"Evennia Channel 'VBGB' not found.")
|
||||
channel = channel[0]
|
||||
# Cache this channel
|
||||
self.channel = channel
|
||||
self.channel.connect(self)
|
||||
logger.log_msg(message)
|
||||
logger.log_msg(self.id)
|
||||
self.channel.msg(message, senders=self.id)
|
||||
return super().at_say(self, message, msg_self,msg_location, receivers, msg_receivers, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue