Poodletooth-iLand/toontown/distributed/ShardStatusReceiver.py

18 lines
498 B
Python
Raw Normal View History

2015-03-03 16:10:12 -06:00
class ShardStatusReceiver:
def __init__(self, air):
self.air = air
self.shards = {}
# Accept the shardStatus event:
self.air.netMessenger.accept('shardStatus', self, self.handleShardStatus)
# Query the status of any existing shards:
self.air.netMessenger.send('queryShardStatus')
def handleShardStatus(self, channel, status):
self.shards.setdefault(channel, {}).update(status)
def getShards(self):
return self.shards