mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
A few fixes.
This commit is contained in:
parent
a31c46f29a
commit
64a87dff1b
5 changed files with 32 additions and 21 deletions
|
@ -115,10 +115,17 @@ class AIBase:
|
|||
self.taskMgr.add(self.__resetPrevTransform, 'resetPrevTransform', priority=-51)
|
||||
self.taskMgr.add(self.__ivalLoop, 'ivalLoop', priority=20)
|
||||
self.taskMgr.add(self.__igLoop, 'igLoop', priority=50)
|
||||
if self.config.GetBool('garbage-collect-states', 1):
|
||||
self.taskMgr.add(self.__garbageCollectStates, 'garbageCollectStates', priority=46)
|
||||
if self.AISleep >= 0 and (not self.AIRunningNetYield or self.AIForceSleep):
|
||||
self.taskMgr.add(self.__sleepCycleTask, 'aiSleep', priority=55)
|
||||
self.eventMgr.restart()
|
||||
|
||||
def __garbageCollectStates(self, state):
|
||||
TransformState.garbageCollect()
|
||||
RenderState.garbageCollect()
|
||||
return Task.cont
|
||||
|
||||
def getRepository(self):
|
||||
return self.air
|
||||
|
||||
|
|
|
@ -62,9 +62,10 @@ if ':' in host:
|
|||
port = int(port)
|
||||
simbase.air.connect(host, port)
|
||||
|
||||
gc.enable()
|
||||
|
||||
try:
|
||||
run()
|
||||
gc.enable()
|
||||
except SystemExit:
|
||||
raise
|
||||
except Exception:
|
||||
|
|
|
@ -434,10 +434,10 @@ class RewardPanel(DirectFrame):
|
|||
def getTrackIntervalList(self, toon, track, origSkill, earnedSkill, hasUber):
|
||||
if hasUber < 0:
|
||||
print (toon.doId, 'Reward Panel received an invalid hasUber from an uberList')
|
||||
tickDelay = 1.0 / 60
|
||||
tickDelay = 0.1
|
||||
intervalList = []
|
||||
intervalList.append(Func(self.showTrackIncLabel, track, earnedSkill))
|
||||
barTime = 0.5
|
||||
barTime = math.log(earnedSkill + 0.5)
|
||||
numTicks = int(math.ceil(barTime / tickDelay))
|
||||
for i in xrange(numTicks):
|
||||
t = (i + 1) / float(numTicks)
|
||||
|
@ -463,9 +463,9 @@ class RewardPanel(DirectFrame):
|
|||
uberSkill = ToontownBattleGlobals.UberSkill + ToontownBattleGlobals.Levels[track][ToontownBattleGlobals.LAST_REGULAR_GAG_LEVEL + 1]
|
||||
if currentSkill >= uberSkill and not hasUber > 0:
|
||||
intervalList += self.getUberGagIntervalList(toon, track, ToontownBattleGlobals.LAST_REGULAR_GAG_LEVEL + 1)
|
||||
intervalList.append(Wait(0.1))
|
||||
intervalList.append(Wait(0.3))
|
||||
skillDiff = currentSkill - ToontownBattleGlobals.Levels[track][ToontownBattleGlobals.LAST_REGULAR_GAG_LEVEL + 1]
|
||||
barTime = math.log(skillDiff + 1)
|
||||
barTime = math.log(skillDiff + 0.5)
|
||||
numTicks = int(math.ceil(barTime / tickDelay))
|
||||
displayedSkillDiff = skillDiff
|
||||
if displayedSkillDiff > ToontownBattleGlobals.UberSkill:
|
||||
|
@ -477,18 +477,18 @@ class RewardPanel(DirectFrame):
|
|||
intervalList.append(Func(self.incrementExp, track, newValue, toon))
|
||||
intervalList.append(Wait(tickDelay * 0.5))
|
||||
|
||||
intervalList.append(Wait(0.1))
|
||||
intervalList.append(Wait(0.3))
|
||||
return intervalList
|
||||
|
||||
def getMeritIntervalList(self, toon, dept, origMerits, earnedMerits):
|
||||
tickDelay = 1.0 / 60
|
||||
tickDelay = 0.08
|
||||
intervalList = []
|
||||
totalMerits = CogDisguiseGlobals.getTotalMerits(toon, dept)
|
||||
neededMerits = 0
|
||||
if totalMerits and origMerits != totalMerits:
|
||||
neededMerits = totalMerits - origMerits
|
||||
intervalList.append(Func(self.showMeritIncLabel, dept, min(neededMerits, earnedMerits)))
|
||||
barTime = 0.5
|
||||
barTime = math.log(earnedMerits + 1)
|
||||
numTicks = int(math.ceil(barTime / tickDelay))
|
||||
for i in xrange(numTicks):
|
||||
t = (i + 1) / float(numTicks)
|
||||
|
@ -497,10 +497,10 @@ class RewardPanel(DirectFrame):
|
|||
intervalList.append(Wait(tickDelay))
|
||||
|
||||
intervalList.append(Func(self.resetMeritBarColor, dept))
|
||||
intervalList.append(Wait(0.1))
|
||||
intervalList.append(Wait(0.3))
|
||||
if toon.cogLevels[dept] < ToontownGlobals.MaxCogSuitLevel:
|
||||
if neededMerits and toon.readyForPromotion(dept):
|
||||
intervalList.append(Wait(0.4))
|
||||
intervalList.append(Wait(0.3))
|
||||
intervalList += self.getPromotionIntervalList(toon, dept)
|
||||
return intervalList
|
||||
|
||||
|
@ -621,7 +621,7 @@ class RewardPanel(DirectFrame):
|
|||
if earned > 0:
|
||||
earned = min(earned, quest.getNumQuestItems() - questDesc[4])
|
||||
if earned > 0 or base.localAvatar.tutorialAck == 0 and num == 1:
|
||||
barTime = 0.5
|
||||
barTime = math.log(earned + 1)
|
||||
numTicks = int(math.ceil(barTime / tickDelay))
|
||||
for i in xrange(numTicks):
|
||||
t = (i + 1) / float(numTicks)
|
||||
|
@ -683,19 +683,19 @@ class RewardPanel(DirectFrame):
|
|||
if meritList[dept]:
|
||||
track += self.getMeritIntervalList(toon, dept, origMeritList[dept], meritList[dept])
|
||||
|
||||
track.append(Wait(0.75))
|
||||
track.append(Wait(1.0))
|
||||
itemInterval = self.getItemIntervalList(toon, itemList)
|
||||
if itemInterval:
|
||||
track.append(Func(self.initItemFrame, toon))
|
||||
track.append(Wait(0.25))
|
||||
track.append(Wait(1.0))
|
||||
track += itemInterval
|
||||
track.append(Wait(0.5))
|
||||
track.append(Wait(1.0))
|
||||
missedItemInterval = self.getMissedItemIntervalList(toon, missedItemList)
|
||||
if missedItemInterval:
|
||||
track.append(Func(self.initMissedItemFrame, toon))
|
||||
track.append(Wait(0.25))
|
||||
track.append(Wait(1.0))
|
||||
track += missedItemInterval
|
||||
track.append(Wait(0.5))
|
||||
track.append(Wait(1.0))
|
||||
self.notify.debug('partList = %s' % partList)
|
||||
newPart = 0
|
||||
for part in partList:
|
||||
|
@ -707,9 +707,9 @@ class RewardPanel(DirectFrame):
|
|||
partList = self.getCogPartIntervalList(toon, partList)
|
||||
if partList:
|
||||
track.append(Func(self.initCogPartFrame, toon))
|
||||
track.append(Wait(0.25))
|
||||
track.append(Wait(1.0))
|
||||
track += partList
|
||||
track.append(Wait(0.5))
|
||||
track.append(Wait(1.0))
|
||||
questList = self.getQuestIntervalList(toon, deathList, toonList, origQuestsList, itemList, helpfulToonsList)
|
||||
if questList:
|
||||
avQuests = []
|
||||
|
@ -717,9 +717,9 @@ class RewardPanel(DirectFrame):
|
|||
avQuests.append(origQuestsList[i:i + 5])
|
||||
|
||||
track.append(Func(self.initQuestFrame, toon, copy.deepcopy(avQuests)))
|
||||
track.append(Wait(0.25))
|
||||
track.append(Wait(1.0))
|
||||
track += questList
|
||||
track.append(Wait(0.5))
|
||||
track.append(Wait(2.0))
|
||||
track.append(Wait(0.25))
|
||||
if trackEnded:
|
||||
track.append(Func(self.vanishFrames))
|
||||
|
|
|
@ -11,6 +11,9 @@ class DistributedKnockKnockDoorAI(DistributedAnimatedPropAI.DistributedAnimatedP
|
|||
self.propId = propId
|
||||
self.doLaterTask = None
|
||||
|
||||
def delete(self):
|
||||
DistributedAnimatedPropAI.DistributedAnimatedPropAI.delete(self)
|
||||
|
||||
def enterOff(self):
|
||||
DistributedAnimatedPropAI.DistributedAnimatedPropAI.enterOff(self)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class ToontownLoadingScreen:
|
|||
def __init__(self):
|
||||
self.__expectedCount = 0
|
||||
self.__count = 0
|
||||
self.textures = [(loader.loadTexture('phase_3.5/maps/loading/toon.jpg'), ToontownGlobals.getInterfaceFont(), (0.2, 0.6, 0.9, 1)),
|
||||
self.textures = [(loader.loadTexture('phase_3.5/maps/loading/toon.jpg'), ToontownGlobals.getInterfaceFont(), (0, 0, 0.5, 1)),
|
||||
(loader.loadTexture('phase_3.5/maps/loading/cog.jpg'), ToontownGlobals.getSuitFont(), (1.0, 1.0, 1.0, 1)),
|
||||
(loader.loadTexture('phase_3.5/maps/loading/default.jpg'), ToontownGlobals.getInterfaceFont(), (0, 0, 0.5, 1))
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue