toon: add astron support checks to some code
This commit is contained in:
parent
5447ed529c
commit
6311095365
1 changed files with 22 additions and 20 deletions
|
@ -229,7 +229,8 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
|
||||||
if self.WantOldGMNameBan:
|
if self.WantOldGMNameBan:
|
||||||
self._checkOldGMName()
|
self._checkOldGMName()
|
||||||
messenger.send('avatarEntered', [self])
|
messenger.send('avatarEntered', [self])
|
||||||
self.sendUpdate('setDefaultShard', [self.air.districtId])
|
if config.GetBool('astron-support', True):
|
||||||
|
self.sendUpdate('setDefaultShard', [self.air.districtId])
|
||||||
if hasattr(self, 'gameAccess') and self.gameAccess != 2:
|
if hasattr(self, 'gameAccess') and self.gameAccess != 2:
|
||||||
if self.hat[0] != 0:
|
if self.hat[0] != 0:
|
||||||
self.replaceItemInAccessoriesList(ToonDNA.HAT, 0, 0, 0, self.hat[0], self.hat[1], self.hat[2])
|
self.replaceItemInAccessoriesList(ToonDNA.HAT, 0, 0, 0, self.hat[0], self.hat[1], self.hat[2])
|
||||||
|
@ -249,27 +250,28 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
|
||||||
self.b_setShoes(0, 0, 0)
|
self.b_setShoes(0, 0, 0)
|
||||||
self.startPing()
|
self.startPing()
|
||||||
|
|
||||||
def setLocation(self, parentId, zoneId):
|
if config.GetBool('astron-support', True):
|
||||||
DistributedPlayerAI.DistributedPlayerAI.setLocation(self, parentId, zoneId)
|
def setLocation(self, parentId, zoneId):
|
||||||
if self.isPlayerControlled():
|
DistributedPlayerAI.DistributedPlayerAI.setLocation(self, parentId, zoneId)
|
||||||
if 100 <= zoneId < ToontownGlobals.DynamicZonesBegin:
|
if self.isPlayerControlled():
|
||||||
hood = ZoneUtil.getHoodId(zoneId)
|
if 100 <= zoneId < ToontownGlobals.DynamicZonesBegin:
|
||||||
self.sendUpdate('setLastHood', [hood])
|
hood = ZoneUtil.getHoodId(zoneId)
|
||||||
self.setDefaultZone(hood)
|
self.sendUpdate('setLastHood', [hood])
|
||||||
self.sendUpdate('setDefaultZone', [hood])
|
self.setDefaultZone(hood)
|
||||||
|
self.sendUpdate('setDefaultZone', [hood])
|
||||||
|
|
||||||
canonicalZoneId = ZoneUtil.getCanonicalZoneId(zoneId)
|
canonicalZoneId = ZoneUtil.getCanonicalZoneId(zoneId)
|
||||||
canonicalHood = ZoneUtil.getHoodId(canonicalZoneId)
|
canonicalHood = ZoneUtil.getHoodId(canonicalZoneId)
|
||||||
hoodsVisited = list(self.getHoodsVisited())
|
hoodsVisited = list(self.getHoodsVisited())
|
||||||
if canonicalHood not in hoodsVisited:
|
if canonicalHood not in hoodsVisited:
|
||||||
hoodsVisited.append(canonicalHood)
|
hoodsVisited.append(canonicalHood)
|
||||||
self.b_setHoodsVisited(hoodsVisited)
|
self.b_setHoodsVisited(hoodsVisited)
|
||||||
|
|
||||||
if canonicalZoneId == ToontownGlobals.GoofySpeedway:
|
if canonicalZoneId == ToontownGlobals.GoofySpeedway:
|
||||||
teleportAccess = self.getTeleportAccess()
|
teleportAccess = self.getTeleportAccess()
|
||||||
if ToontownGlobals.GoofySpeedway not in teleportAccess:
|
if ToontownGlobals.GoofySpeedway not in teleportAccess:
|
||||||
teleportAccess.append(ToontownGlobals.GoofySpeedway)
|
teleportAccess.append(ToontownGlobals.GoofySpeedway)
|
||||||
self.b_setTeleportAccess(teleportAccess)
|
self.b_setTeleportAccess(teleportAccess)
|
||||||
|
|
||||||
def _doDbCheck(self, task = None):
|
def _doDbCheck(self, task = None):
|
||||||
self._dbCheckDoLater = None
|
self._dbCheckDoLater = None
|
||||||
|
|
Loading…
Reference in a new issue