PDB must be crucified

This commit is contained in:
DenialMC 2015-05-11 22:58:11 +03:00
parent 267310adc7
commit 2d055f2dea
35 changed files with 7 additions and 139 deletions

View file

@ -44,10 +44,9 @@ class MagicWordManagerAI(DistributedObjectAI):
@magicWord(category=CATEGORY_COMMUNITY_MANAGER, types=[str])
def help(wordName=None):
print 'help called with %s' % (wordName)
if not wordName:
return "What were you interested getting help for?"
word = spellbook.words.get(wordName.lower()) # look it up by its lower case value
word = spellbook.words.get(wordName.lower())
if not word:
accessLevel = spellbook.getInvoker().getAdminAccess()
wname = wordName.lower()
@ -55,7 +54,7 @@ def help(wordName=None):
if spellbook.words.get(key).access <= accessLevel:
if wname in key:
return 'Did you mean %s' % (spellbook.words.get(key).name)
return 'I have no clue what %s is refering to' % (wordName)
return 'I have no clue what %s is referring to' % (wordName)
return word.doc
@magicWord(category=CATEGORY_COMMUNITY_MANAGER, types=[])

View file

@ -13,11 +13,6 @@ class AvatarDNA:
def makeNetString(self):
notify.error('called makeNetString on avatarDNA parent class')
def printNetString(self):
string = self.makeNetString()
dg = PyDatagram(string)
dg.dumpHex(ostream)
def makeFromNetString(self, string):
notify.error('called makeFromNetString on avatarDNA parent class')

View file

@ -331,8 +331,6 @@ def leftHand(prop=None):
@magicWord(category=CATEGORY_PROGRAMMER, types=[])
def getPos():
"""
print av position
Return your target's position.
"""
target = spellbook.getTarget()
pos = target.getPos()
print(pos)
return spellbook.getTarget().getPos()

View file

@ -577,23 +577,6 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
self.cameraPositions.remove(camPos)
self.nextCameraPos(1)
def printCameraPositions(self):
print '['
for i in xrange(len(self.cameraPositions)):
self.printCameraPosition(i)
print ','
print ']'
def printCameraPosition(self, index):
cp = self.cameraPositions[index]
print '(Point3(%0.2f, %0.2f, %0.2f),' % (cp[0][0], cp[0][1], cp[0][2])
print 'Point3(%0.2f, %0.2f, %0.2f),' % (cp[1][0], cp[1][1], cp[1][2])
print 'Point3(%0.2f, %0.2f, %0.2f),' % (cp[2][0], cp[2][1], cp[2][2])
print 'Point3(%0.2f, %0.2f, %0.2f),' % (cp[3][0], cp[3][1], cp[3][2])
print '%d,' % cp[4]
print ')',
def posCamera(self, lerp, time):
if not lerp:
self.positionCameraWithPusher(self.getCompromiseCameraPos(), self.getLookAtPoint())
@ -1112,7 +1095,6 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
def startChat(self):
self.chatMgr.start()
self.accept(OTPGlobals.ThinkPosHotkey, self.thinkPos)
self.accept(OTPGlobals.PrintCamPosHotkey, self.printCamPos)
if self.__enableMarkerPlacement:
self.accept(OTPGlobals.PlaceMarkerHotkey, self.__placeMarker)
@ -1120,16 +1102,9 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
self.chatMgr.stop()
self.ignore(OTPGlobals.WhisperIncomingEvent)
self.ignore(OTPGlobals.ThinkPosHotkey)
self.ignore(OTPGlobals.PrintCamPosHotkey)
if self.__enableMarkerPlacement:
self.ignore(OTPGlobals.PlaceMarkerHotkey)
def printCamPos(self):
node = base.camera.getParent()
pos = base.cam.getPos(node)
hpr = base.cam.getHpr(node)
print 'cam pos = ', `pos`, ', cam hpr = ', `hpr`
def d_broadcastPositionNow(self):
self.d_clearSmoothing()
self.d_broadcastPosHpr()

View file

@ -6,9 +6,6 @@ class LevelMgr(LevelMgrBase.LevelMgrBase):
def __init__(self, level, entId):
LevelMgrBase.LevelMgrBase.__init__(self, level, entId)
self.geom = loader.loadModel(self.modelFilename)
if not self.geom:
import pdb
pdb.set_trace()
self.zoneNums = []
self.level.zoneNum2zoneId = {}
self.level.zoneId2zoneNum = {}

View file

@ -82,14 +82,3 @@ class LevelSpec:
def privGetScenarioEntityDict(self, scenario):
return self.specDict['scenarios'][scenario]
def printZones(self):
allIds = self.getAllEntIds()
type2id = self.getEntType2ids(allIds)
zoneIds = type2id['zone']
if 0 in zoneIds:
zoneIds.remove(0)
zoneIds.sort()
for zoneNum in zoneIds:
spec = self.getEntitySpec(zoneNum)
print 'zone %s: %s' % (zoneNum, spec['name'])

View file

@ -197,7 +197,6 @@ InventoryHotkeyOn = 'home'
InventoryHotkeyOff = 'home-up'
MapHotkeyOn = 'delete'
MapHotkeyOff = 'delete-up'
PrintCamPosHotkey = 'f12'
QuitGameHotKeyOSX = 'meta-q'
QuitGameHotKeyRepeatOSX = 'meta-q-repeat'
HideGameHotKeyOSX = 'meta-h'

View file

@ -710,9 +710,6 @@ class NewsManager(DistributedObject.DistributedObject):
self.weekDaysInMonth[i] = (i, 4)
startingWeekDay, numDays = calendar.monthrange(year, month)
if startingWeekDay > 6:
import pdb
pdb.set_trace()
for i in xrange(4):
if numDays == self.numDaysCorMatrix[i][0]:
break

View file

@ -1389,10 +1389,6 @@ class BattleCalculatorAI:
self.__printSuitAtkStats()
return None
def __calculateFiredCogs():
import pdb
pdb.set_trace()
def toonLeftBattle(self, toonId):
if self.notify.getDebug():
self.notify.debug('toonLeftBattle()' + str(toonId))

View file

@ -1597,9 +1597,6 @@ def doReOrg(attack):
partTrack = getPartTrack(sprayEffect, 1.0, 1.9, [sprayEffect, suit, 0])
if dmg > 0:
headParts = toon.getHeadParts()
if __debug__:
print '***********headParts pos=', headParts[0].getPos()
print '***********headParts hpr=', headParts[0].getHpr()
headTracks = Parallel()
for partNum in xrange(0, headParts.getNumPaths()):
part = headParts.getPath(partNum)
@ -1619,8 +1616,6 @@ def doReOrg(attack):
arms = toon.findAllMatches('**/arms')
sleeves = toon.findAllMatches('**/sleeves')
hands = toon.findAllMatches('**/hands')
if __debug__:
print '*************arms hpr=', arms[0].getHpr()
for partNum in xrange(0, arms.getNumPaths()):
chestTracks.append(getChestTrack(arms.getPath(partNum)))
chestTracks.append(getChestTrack(sleeves.getPath(partNum)))

View file

@ -6,8 +6,6 @@ from toontown.hood import ZoneUtil
from toontown.toonbase.ToonBaseGlobal import *
from toontown.toonbase.ToontownGlobals import *
from toontown.toon.DistributedNPCToonBase import DistributedNPCToonBase
if (__debug__):
import pdb
class DistributedKartShopInterior(DistributedObject):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedKartShopInterior')

View file

@ -5,11 +5,6 @@ from toontown.building.DistributedDoorAI import DistributedDoorAI
from toontown.building.DistributedKartShopInteriorAI import DistributedKartShopInteriorAI
from toontown.toon import NPCToons
if __debug__:
import pdb
class KartShopBuildingAI:
notify = directNotify.newCategory('KartShopBuildingAI')

View file

@ -188,9 +188,6 @@ class CogdoFlyingGame(DirectObject):
self.ignore(CogdoFlyingLegalEagle.RequestAddTargetAgainEventName)
self.ignore(CogdoFlyingLegalEagle.RequestRemoveTargetEventName)
self.ignore(CogdoFlyingLocalPlayer.PlayWaitingMusicEventName)
if __debug__ and base.config.GetBool('schellgames-dev', True):
self.ignore('end')
self.ignore('home')
self.level.update(0.0)
for eagle in self.legalEagles:
eagle.gameEnd()

View file

@ -18,8 +18,6 @@ class CogdoMaze(MazeBase, DirectObject):
self._clearColor = VBase4(base.win.getClearColor())
self._clearColor.setW(1.0)
base.win.setClearColor(VBase4(0.0, 0.0, 0.0, 1.0))
if __debug__ and base.config.GetBool('cogdomaze-dev', False):
self._initCollisionVisuals()
def _initWaterCoolers(self):
self._waterCoolers = []
@ -60,10 +58,6 @@ class CogdoMaze(MazeBase, DirectObject):
base.win.setClearColor(self._clearColor)
del self._clearColor
MazeBase.destroy(self)
if __debug__ and hasattr(self, '_cubes'):
self.ignoreAll()
self._cubes.removeNode()
del self._cubes
def onstage(self):
MazeBase.onstage(self)

View file

@ -38,9 +38,6 @@ class CountryClubRoom(DirectObject.DirectObject):
return self.roomNum
def setGeom(self, geom):
if geom == None:
import pdb
pdb.set_trace()
self.__geom = geom
return

View file

@ -179,9 +179,6 @@ class DistributedGolfGreenGame(BattleBlocker.BattleBlocker):
None]
groundCircle = loader.loadModel('phase_12/models/bossbotHQ/bust_a_cog_hole')
groundCircle.reparentTo(self.spriteNode)
if groundCircle == None:
import pdb
pdb.set_trace()
groundCircle.setTransparency(TransparencyAttrib.MAlpha)
groundCircle.setPos(newCell[1], -self.radiusBall, newCell[2])
groundCircle.setScale(1.2)
@ -528,8 +525,6 @@ class DistributedGolfGreenGame(BattleBlocker.BattleBlocker):
return
def __acceptExit(self, buttonValue = None):
import pdb
pdb.set_trace()
if hasattr(self, 'frame'):
self.hide()
self.unload()

View file

@ -184,9 +184,6 @@ class GameSprite:
self.multiColorStep = 0.1
elif colorType == 9:
myModel = 'phase_12/models/bossbotHQ/bust_a_cog_ball_steel'
if not myModel:
import pdb
pdb.set_trace()
self.breakable = 0
elif colorType == 10:
myModel = 'phase_12/models/bossbotHQ/bust_a_cog_ball_fire'

View file

@ -580,9 +580,6 @@ class DistributedCogThiefGame(DistributedMinigame):
if cog.suit:
cogPos = cog.suit.getPos()
collisionPos = colEntry.getContactPos(render)
if (cogPos - collisionPos).length() > 4:
import pdb
pdb.set_trace()
self.sendUpdate('cogHitBarrel', [timestamp,
cogIndex,
barrelIndex,

View file

@ -772,9 +772,6 @@ class DistributedDivingGame(DistributedMinigame):
fish.removeNode()
del fish
del self.spawners[spawnerId].fishArray[spawnId]
else:
import pdb
pdb.setTrace()
return
def setTreasureGrabbed(self, avId, chestId):

View file

@ -1,7 +1,5 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObject import DistributedObject
if (__debug__):
import pdb
class DistributedKartPad(DistributedObject):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedKartPad')

View file

@ -535,8 +535,6 @@ class DistributedRace(DistributedObject.DistributedObject):
t = projLength2 / segLength2
if self.debugIt:
self.notify.debug('self.debugIt = %d' % self.debugIt)
import pdb
pdb.set_trace()
if nextPole < self.currentPole:
newT = self.curveTs[self.currentPole] * (1 - t) + self.curve.getMaxT() * t
else:

View file

@ -21,8 +21,6 @@ from toontown.racing.Kart import Kart
from toontown.racing.KartShopGlobals import KartGlobals
from toontown.racing import RaceGlobals
from toontown.toontowngui.TTDialog import TTGlobalDialog
if (__debug__):
import pdb
class DistributedStartingBlock(DistributedObject.DistributedObject, FSM):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStartingBlock')

View file

@ -5,13 +5,8 @@ from direct.distributed.ClockDelta import *
from direct.distributed import DistributedSmoothNodeAI
from direct.fsm import FSM
from direct.task import Task
from direct.distributed.PyDatagram import *
if (__debug__):
import pdb
class DistributedVehicleAI(DistributedSmoothNodeAI.DistributedSmoothNodeAI, FSM.FSM):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedVehicleAI')

View file

@ -4,8 +4,6 @@ from direct.task import Task
from pandac.PandaModules import *
from toontown.racing.DistributedKartPad import DistributedKartPad
from toontown.racing.KartShopGlobals import KartGlobals
if (__debug__):
import pdb
class DistributedViewPad(DistributedKartPad):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedViewPad')

View file

@ -3,10 +3,8 @@ from direct.showbase import PythonUtil
from toontown.toonbase import TTLocalizer
from pandac.PandaModules import *
from KartShopGlobals import *
import types
if (__debug__):
import pdb
import copy
import types, copy
KartDNA = PythonUtil.Enum('bodyType, bodyColor, accColor, ebType, spType, fwwType, bwwType, rimsType, decalType')
InvalidEntry = -1
KartInfo = PythonUtil.Enum('name, model, cost, viewDist, decalId, LODmodel1, LODmodel2')

View file

@ -12,8 +12,6 @@ from KartShopGlobals import *
from toontown.racing.Kart import Kart
from toontown.shtiker.KartPage import KartViewer
from KartDNA import *
if (__debug__):
import pdb
MENUS = PythonUtil.Enum('MainMenu, BuyKart, BuyAccessory, ReturnKart, ConfirmBuyAccessory, ConfirmBuyKart, BoughtKart, BoughtAccessory')
MM_OPTIONS = PythonUtil.Enum('Cancel, BuyAccessory, BuyKart', -1)
BK_OPTIONS = PythonUtil.Enum('Cancel, BuyKart', -1)

View file

@ -64,8 +64,6 @@ class GSPlayground(Playground.Playground):
return
def enterStartingBlock(self, distStartingBlock):
import pdb
pdb.set_trace()
self.accept(self.startingBlockDoneEvent, self.handleStartingBlockDone)
self.startingBlock = Elevator.Elevator(self.fsm.getStateNamed('startingBlock'), self.startingBlockDoneEvent, distStartingBlock)
distStartingBlock.elevatorFSM = self.startingBlock
@ -79,8 +77,6 @@ class GSPlayground(Playground.Playground):
del self.startingBlock
def detectedStartingBlockCollision(self, distStartingBlock):
import pdb
pdb.set_trace()
self.fsm.request('startingBlock', [distStartingBlock])
def handleStartingBlockDone(self, doneStatus):

View file

@ -8,8 +8,6 @@ from toontown.safezone.GSPlayground import GSPlayground
from toontown.effects.CarSmoke import CarSmoke
from toontown.toonbase import ToontownGlobals
import random
if (__debug__):
import pdb
class GSSafeZoneLoader(SafeZoneLoader):

View file

@ -9,8 +9,6 @@ from toontown.safezone.GZPlayground import GZPlayground
from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownGlobals
import random
if (__debug__):
import pdb
class GZSafeZoneLoader(SafeZoneLoader):

View file

@ -8,8 +8,6 @@ from toontown.shtiker.ShtikerPage import ShtikerPage
from toontown.toonbase import ToontownGlobals, TTLocalizer
from FishPage import FishingTrophy
from toontown.golf import GolfGlobals
if (__debug__):
import pdb
PageMode = PythonUtil.Enum('Records, Trophy')
class GolfPage(ShtikerPage):

View file

@ -10,8 +10,6 @@ from toontown.racing import RaceGlobals
from toontown.shtiker.ShtikerPage import ShtikerPage
from toontown.toonbase import ToontownGlobals, TTLocalizer
from FishPage import FishingTrophy
if (__debug__):
import pdb
PageMode = PythonUtil.Enum('Customize, Records, Trophy')
class KartPage(ShtikerPage):

View file

@ -661,8 +661,6 @@ class DistributedBossbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS
t = max(t0, t1)
progVal = fromValue + (toValue - fromValue) * min(t, 1)
self.notify.debug('progVal=%s' % progVal)
import pdb
pdb.set_trace()
return progVal
def __doDirectedAttack(self):

View file

@ -64,8 +64,6 @@ from toontown.battle import BattleParticles
if base.wantKarts:
from toontown.racing.KartDNA import *
if (__debug__):
import pdb
class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, DistributedSmoothNode.DistributedSmoothNode, DelayDeletable):

View file

@ -2853,8 +2853,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
self.sendUpdate('setKartAccessoriesOwned', [accessories])
def setKartAccessoriesOwned(self, accessories):
if (__debug__):
import pdb
self.accessories = accessories
def getKartAccessoriesOwned(self):

View file

@ -59,8 +59,6 @@ from toontown.toonbase.ToontownGlobals import *
from toontown.friends.FriendHandle import FriendHandle
ClaraBaseXPos = 0.12
if (__debug__):
import pdb
class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
neverDisable = 1
@ -1405,8 +1403,6 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
return
def setPlantToWater(self, plantId):
import pdb
pdb.set_trace()
if self.plantToWater == None:
self.plantToWater = plantId
self.notify.debug('setting plant to water %s' % plantId)