def setAvailable(self, available): DistributedDistrictAI.setAvailable(self, available) self.air.netMessenger.send( 'shardStatus', [self.air.ourChannel, { 'available': bool(available) }])
def __init__(self, air): DistributedDistrictAI.__init__(self, air) self.avatarCount = 0 self.newAvatarCount = 0 self.mainWorldFile = '' self.shardType = PiratesGlobals.SHARD_MAIN self.populationLimits = [0, 0]
def announceGenerate(self): DistributedDistrictAI.announceGenerate(self) # Remember the time of which this district was created: self.created = int(time.time()) # We want to handle shard status queries so that a ShardStatusReceiver # being created after we're generated will know where we're at: self.air.netMessenger.accept('queryShardStatus', self, self.handleShardStatusQuery) # Send a shard status update with the information we have: status = { 'available': bool(self.available), 'name': self.name, 'created': int(time.time()) } self.air.netMessenger.send('shardStatus', [self.air.ourChannel, status]) # Add a post remove shard status update in-case we go down: status = {'available': False} datagram = self.air.netMessenger.prepare('shardStatus', [self.air.ourChannel, status]) self.air.addPostRemove(datagram)
def announceGenerate(self): DistributedDistrictAI.announceGenerate(self) # Remember the time of which this district was created: self.created = int(time.time()) # We want to handle shard status queries so that a ShardStatusReceiver # being created after we're generated will know where we're at: self.air.accept("queryShardStatus", self.handleShardStatusQuery) # Send a shard status update with the information we have: status = {"available": bool(self.available), "name": self.name, "created": int(time.time())} self.air.sendNetEvent("shardStatus", [self.air.ourChannel, status])
def announceGenerate(self): DistributedDistrictAI.announceGenerate(self) self.created = int(time.time()) self.air.netMessenger.accept('queryShardStatus', self, self.handleShardStatusQuery) status = { 'available': bool(self.available), 'name': self.name, 'created': int(time.time()) } self.air.netMessenger.send('shardStatus', [self.air.ourChannel, status]) status = {'available': False} datagram = self.air.netMessenger.prepare('shardStatus', [self.air.ourChannel, status]) self.air.addPostRemove(datagram)
def announceGenerate(self): DistributedDistrictAI.announceGenerate(self) # Remember the time of which this district was created: self.created = int(time.time()) # We want to handle shard status queries so that a ShardStatusReceiver # being created after we're generated will know where we're at: self.air.accept('queryShardStatus', self.handleShardStatusQuery) # Send a shard status update with the information we have: status = { 'available': bool(self.available), 'name': self.name, 'created': int(time.time()) } self.air.sendNetEvent('shardStatus', [self.air.ourChannel, status])
def setAvailable(self, available): DistributedDistrictAI.setAvailable(self, available) # Send a shard status update containing our availability: status = {'available': bool(available)} self.air.netMessenger.send('shardStatus', [self.air.ourChannel, status])
def __init__(self, air, mainWorld, shardType): DistributedDistrictAI.__init__(self, air) self.avatarCount = 0 self.newAvatarCount = 0 self.mainWorld = mainWorld self.shardType = shardType
def setName(self, name): DistributedDistrictAI.setName(self, name) # Send a shard status update containing our name: status = {'name': name} self.air.sendNetEvent('shardStatus', [self.air.ourChannel, status])
def __init__(self, air): DistributedDistrictAI.__init__(self, air) self.description = '' self.holidayValue = 0
def announceGenerate(self): DistributedDistrictAI.announceGenerate(self)
def __init__(self, air): DistributedDistrictAI.__init__(self, air) self.created = 0 self.ahnnLog = 0
def generate(self): DistributedDistrictAI.generate(self) self.stats = ToontownDistrictStatsAI.ToontownDistrictStatsAI(self.air) self.stats.toontownDistrictId = self.doId self.stats.generateOtpObject(self.stats.defaultParent, self.stats.defaultZone)
def setName(self, name): DistributedDistrictAI.setName(self, name) # Send a shard status update containing our name: status = {'name': name} self.air.netMessenger.send('shardStatus', [self.air.ourChannel, status])
def generate(self): DistributedDistrictAI.generate(self) self.air.notify.info("Generated PiratesDistrictAI at %d" % (self.getDoId()))
def setName(self, name): DistributedDistrictAI.setName(self, name) # Send a shard status update containing our name: status = {"name": name} self.air.sendNetEvent("shardStatus", [self.air.ourChannel, status])
def setAvailable(self, available): DistributedDistrictAI.setAvailable(self, available) # Send a shard status update containing our availability: status = {"available": bool(available)} self.air.sendNetEvent("shardStatus", [self.air.ourChannel, status])
def __init__(self, air): DistributedDistrictAI.__init__(self, air) self.ahnnLog = False self.description = '' self.iconPath = ''
def setAvailable(self, available): DistributedDistrictAI.setAvailable(self, available) # Send a shard status update containing our availability: status = {'available': bool(available)} self.air.sendNetEvent('shardStatus', [self.air.ourChannel, status])
def setName(self, name): DistributedDistrictAI.setName(self, name) self.air.netMessenger.send('shardStatus', [self.air.ourChannel, { 'name': name }])
def setName(self, name): DistributedDistrictAI.setName(self, name) # Send a shard status update containing our name: self.air.netMessenger.send('shardStatus', [self.air.ourChannel, {'name': \ name}])
def setAvailable(self, available): DistributedDistrictAI.setAvailable(self, available) # Send a shard status update containing our availability: self.air.netMessenger.send('shardStatus', [self.air.ourChannel, {'available': \ bool(available)}])
def __init__(self, air, name="untitled"): DistributedDistrictAI.__init__(self, air, name) self.stats = None
def delete(self): DistributedDistrictAI.delete(self) if(self.stats is not None): self.stats.requestDelete() self.stats = None
def __init__(self, air): DistributedDistrictAI.__init__(self, air) self.ahnnLog = False