Poodletooth-iLand/toontown/distributed/ShardStatusReceiver.py

17 lines
423 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:
2015-07-12 11:48:58 -05:00
self.air.accept('shardStatus', self.handleShardStatus)
2015-03-03 16:10:12 -06:00
2015-07-12 11:48:58 -05:00
self.air.sendNetEvent('queryShardStatus')
2015-03-03 16:10:12 -06:00
def handleShardStatus(self, channel, status):
self.shards.setdefault(channel, {}).update(status)
def getShards(self):
return self.shards