Merge branch 'beta-wip' into estates

This commit is contained in:
Anthony Castelli 2014-08-06 19:13:07 -07:00
commit dd45b0a17c
9 changed files with 54 additions and 39 deletions

View file

@ -53,7 +53,7 @@ want-parties #f
want-gardening #t
# This is a temporary 'fix' for DistributedSmoothNodes... probably not the permanent solution to our problem, but it works for now.
smooth-lag 0.4
want-keep-alive #t
want-keep-alive #f
# Developer Modifications

View file

@ -60,7 +60,7 @@ want-news-page #f
want-gardening #f
# This is a temporary 'fix' for DistributedSmoothNodes... probably not the permanent solution to our problem, but it works for now.
smooth-lag 0.4
want-keep-alive #t
want-keep-alive #f
# Holidays and Events

View file

@ -1,6 +1,6 @@
{
"__fyi__": "If you use anything other than the first 7 characters of the git hash, you just broke everything",
"astron": "b467639",
"astron": "d92df90",
"panda3d": "d048f43",
"version-prefix": "ttr-beta-",
"server-resources": ["dna", "xml", "txt", "dat", "bam"]

View file

@ -20,7 +20,7 @@ want-parties #f
want-accessories #f
want-golf #f
want-gardening #f
want-keep-alive #t
want-keep-alive #f
# Chat stuff

View file

@ -274,7 +274,7 @@ def textures():
def fps():
'Toggle frame rate meter on or off.'
base.setFrameRateMeter(not base.frameRateMeter)
@magicWord(category=CATEGORY_GUI)
def showAvIds():
'Show avId in Nametags.'
@ -284,32 +284,46 @@ def showAvIds():
def showNames():
'Remove avIds in Nametags.'
messenger.send('nameTagShowName')
@magicWord(access=200)
def showAccess():
return "Access level: " + str(spellbook.getTarget().getAdminAccess())
@magicWord(category=CATEGORY_GUI)
def toga2d():
if aspect2d.isHidden():
aspect2d.show()
else:
aspect2d.hide()
@magicWord(category=CATEGORY_GUI)
def placer():
base.camera.place()
@magicWord(category=CATEGORY_GUI)
def explorer():
base.render.explore()
@magicWord(category=CATEGORY_GRAPHICAL, aliases=['syncTextures', 'reloadTex', 'synctex'])
def reloadTextures():
""" Artfart command to reload all of the textures. """
# TODO: A panel that says "Reloading textures... Please wait!"
# ...though it's not important since it's a staff command and
# only staff will see it.
import glob
# Stolen from ToontownStart.py
# Remount all phase files. This maybe might work? Idk. Lets see
# if Panda craps itself.
for file in glob.glob('resources/*.mf'):
mf = Multifile()
mf.openReadWrite(Filename(file))
names = mf.getSubfileNames()
for name in names:
ext = os.path.splitext(name)[1]
if ext not in ['.jpg', '.jpeg', '.ogg', '.rgb']:
mf.removeSubfile(name)
vfs.mount(mf, Filename('/'), 0)
# And finally reload everything!
for texture in TexturePool.findAllTextures():
texture.reload()
return "Reloaded all of the textures!"

@ -1 +1 @@
Subproject commit 295365c37d60d4fa6888b3fd2c59897ebad5806f
Subproject commit 008d0bf2a05a060ab18bdda1ce3975fd3d2a4909

View file

@ -43,6 +43,7 @@ class SpellbookLoader(object):
import __builtin__
class game:
name = 'uberDog'
process = 'server'
__builtin__.game = game
__builtin__.simbase = base
__builtin__.__dev__ = False
@ -118,14 +119,14 @@ class MediaWikiGenerator(object):
self.output.write('\n')
def magic_word(self, mw):
self.output.write('{{MagicWord')
self.output.write('{{Magic word')
self.output.write('|name=%s' % mw.name)
self.output.write('|word=%s' % mw.name)
self.output.write('|usage=%s' % mw.getUsage())
self.output.write('|args=%s' % mw.getUsage())
if mw.doc:
self.output.write('|description=%s' % mw.doc)
self.output.write('|desc=%s' % mw.doc)
self.output.write('|access=%s' % mw.access)

View file

@ -24,7 +24,7 @@ class RewardPanel(DirectFrame):
SkipBattleMovieEvent = 'skip-battle-movie-event'
def __init__(self, name):
if base.config.GetBool('want-skip-button', 0):
if config.GetBool('want-skip-button', False):
gscale = (TTLocalizer.RPdirectFrame[0], TTLocalizer.RPdirectFrame[1], TTLocalizer.RPdirectFrame[2] * 1.1)
gpos = Point3(0, 0, -0.05)
else:
@ -455,14 +455,14 @@ class RewardPanel(DirectFrame):
def getTrackIntervalList(self, toon, track, origSkill, earnedSkill, hasUber, guestWaste = 0):
if hasUber < 0:
print (toon.doId, 'Reward Panel received an invalid hasUber from an uberList')
tickDelay = 0.1
tickDelay = 1.0 / 30
intervalList = []
if origSkill + earnedSkill >= ToontownBattleGlobals.UnpaidMaxSkills[track] and toon.getGameAccess() != OTPGlobals.AccessFull:
lostExp = origSkill + earnedSkill - ToontownBattleGlobals.UnpaidMaxSkills[track]
intervalList.append(Func(self.showTrackIncLabel, track, lostExp, 1))
else:
intervalList.append(Func(self.showTrackIncLabel, track, earnedSkill))
barTime = math.log(earnedSkill + 0.5)
barTime = 1.0
numTicks = int(math.ceil(barTime / tickDelay))
for i in range(numTicks):
t = (i + 1) / float(numTicks)
@ -471,7 +471,7 @@ class RewardPanel(DirectFrame):
intervalList.append(Wait(tickDelay))
intervalList.append(Func(self.resetBarColor, track))
intervalList.append(Wait(0.3))
intervalList.append(Wait(0.1))
nextExpValue = self.getNextExpValue(origSkill, track)
finalGagFlag = 0
while origSkill + earnedSkill >= nextExpValue and origSkill < nextExpValue and not finalGagFlag:
@ -490,9 +490,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.3))
intervalList.append(Wait(0.1))
skillDiff = currentSkill - ToontownBattleGlobals.Levels[track][ToontownBattleGlobals.LAST_REGULAR_GAG_LEVEL + 1]
barTime = math.log(skillDiff + 0.5)
barTime = math.log(skillDiff + 1)
numTicks = int(math.ceil(barTime / tickDelay))
displayedSkillDiff = skillDiff
if displayedSkillDiff > ToontownBattleGlobals.UberSkill:
@ -502,20 +502,20 @@ class RewardPanel(DirectFrame):
t = (i + 1) / float(numTicks)
newValue = int(currentSkill - t * skillDiff + 0.5)
intervalList.append(Func(self.incrementExp, track, newValue, toon))
intervalList.append(Wait(tickDelay * 0.5))
intervalList.append(Wait(tickDelay * 0.7))
intervalList.append(Wait(0.3))
intervalList.append(Wait(0.1))
return intervalList
def getMeritIntervalList(self, toon, dept, origMerits, earnedMerits):
tickDelay = 0.08
tickDelay = 1.0 / 60
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 = math.log(earnedMerits + 1)
barTime = 1.0
numTicks = int(math.ceil(barTime / tickDelay))
for i in range(numTicks):
t = (i + 1) / float(numTicks)
@ -524,10 +524,10 @@ class RewardPanel(DirectFrame):
intervalList.append(Wait(tickDelay))
intervalList.append(Func(self.resetMeritBarColor, dept))
intervalList.append(Wait(0.3))
intervalList.append(Wait(0.1))
if toon.cogLevels[dept] < ToontownGlobals.MaxCogSuitLevel:
if neededMerits and toon.readyForPromotion(dept):
intervalList.append(Wait(0.3))
intervalList.append(Wait(0.4))
intervalList += self.getPromotionIntervalList(toon, dept)
return intervalList
@ -575,7 +575,7 @@ class RewardPanel(DirectFrame):
def getQuestIntervalList(self, toon, deathList, toonList, origQuestsList, itemList, helpfulToonsList = []):
avId = toon.getDoId()
tickDelay = 0.2
tickDelay = 0.5
intervalList = []
toonShortList = []
for t in toonList:
@ -664,7 +664,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 = math.log(earned + 1)
barTime = 1.0
numTicks = int(math.ceil(barTime / tickDelay))
for i in range(numTicks):
t = (i + 1) / float(numTicks)
@ -726,19 +726,19 @@ class RewardPanel(DirectFrame):
if meritList[dept]:
track += self.getMeritIntervalList(toon, dept, origMeritList[dept], meritList[dept])
track.append(Wait(1.0))
track.append(Wait(0.75))
itemInterval = self.getItemIntervalList(toon, itemList)
if itemInterval:
track.append(Func(self.initItemFrame, toon))
track.append(Wait(1.0))
track.append(Wait(0.25))
track += itemInterval
track.append(Wait(1.0))
track.append(Wait(0.5))
missedItemInterval = self.getMissedItemIntervalList(toon, missedItemList)
if missedItemInterval:
track.append(Func(self.initMissedItemFrame, toon))
track.append(Wait(1.0))
track.append(Wait(0.25))
track += missedItemInterval
track.append(Wait(1.0))
track.append(Wait(0.5))
self.notify.debug('partList = %s' % partList)
newPart = 0
for part in partList:
@ -750,9 +750,9 @@ class RewardPanel(DirectFrame):
partList = self.getCogPartIntervalList(toon, partList)
if partList:
track.append(Func(self.initCogPartFrame, toon))
track.append(Wait(1.0))
track.append(Wait(0.25))
track += partList
track.append(Wait(1.0))
track.append(Wait(0.5))
questList = self.getQuestIntervalList(toon, deathList, toonList, origQuestsList, itemList, helpfulToonsList)
if questList:
avQuests = []
@ -760,9 +760,9 @@ class RewardPanel(DirectFrame):
avQuests.append(origQuestsList[i:i + 5])
track.append(Func(self.initQuestFrame, toon, copy.deepcopy(avQuests)))
track.append(Wait(1.0))
track.append(Wait(0.25))
track += questList
track.append(Wait(2.0))
track.append(Wait(0.5))
track.append(Wait(0.25))
if trackEnded:
track.append(Func(self.vanishFrames))

View file

@ -623,7 +623,7 @@ QuestDialogDict = {160: {GREETING: '',
COMPLETE: 'Did you buy anything nice?\x07I just finished redecorating my house, and I must say it looks Toontastic.\x07Come back here any time for more ToonTasks - we have plenty of them!',
LEAVING: QuestsDefaultLeaving},
400: {GREETING: '',
QUEST: 'Throw and Squirt are great, but you\'re going to need more gags to fight higher level Cogs.\x07When you team up with other Toons against the Cogs, you can combine your gags for even more giggles.\x07Try different combinations of gags to see what works best.\x07To start you off, you can choose between Sound and Toonup.\x07Sound is special. When it hits, it damages all Cogs rather than a single one.\x07Toon-Up is special too. Instead of hitting the Cogs, you can heal other Toons by giving them a some laff.\x07It\'s a tough decision, so choose wisely.\x07You may want to ask some friends what they think so you can make strategies with your gags.\x07When you are ready to decide, come back here and choose.',
QUEST: 'Throw and Squirt are great, but you\'re going to need more gags to fight those higher level Cogs.\x07When you team up with other Toons against the Cogs, you can combine your gags for even more giggles!\x07Try different combinations of gags to see what works best.\x07To start you off, you can choose between Sound and Toon-Up.\x07Sound is special: When it hits, it damages all Cogs rather than a single one.\x07Toon-Up hits all of your targets too -- but they aren\'t Cogs!\x07Instead of hitting the Cogs, you can heal other Toons by making them laugh. It won\'t hurt the Cogs, but it will help your friends last longer in battle!\x07I understand it\'s a tough decision, so take your time to choose wisely.\x07You may want to ask a few friends what they think so you can plan strategies together.\x07When you are ready to decide, come back here and take your pick.',
INCOMPLETE_PROGRESS: 'Back so soon? Are you ready to choose?',
INCOMPLETE_WRONG_NPC: 'I heard that you\'re training for your next gag track. It\'s a tough pick!',
COMPLETE: 'Ah, great decision!\x07Hang on a minute, I can\'t just GIVE you the gags. Didn\'t Flippy tell you about training?\x07Before you can buy those gags, you need to know how to use them by collecting film strips.\x07Toon HQ can give you a few ToonTasks to earn them.\x07There are 15 film strips, which form an animation to show you how to use your new gags.\x07When you collect all 15, you can get the Final Gag Training task that will allow you to use them.\x07You can check your progress in the Shticker Book.',