Explorar o código

comments, notify.debug->info

Darren Ranalli %!s(int64=22) %!d(string=hai) anos
pai
achega
4b4e9e0a0c
Modificáronse 2 ficheiros con 7 adicións e 4 borrados
  1. 3 0
      direct/src/level/EditMgrAI.py
  2. 4 4
      direct/src/level/LevelSpec.py

+ 3 - 0
direct/src/level/EditMgrAI.py

@@ -16,6 +16,9 @@ class EditMgrAI(EditMgrBase.EditMgrBase):
 
             # dumb linear search for now
             # make this smarter (cache last-allocated id)
+            # Note that this uses the ID range associated with the
+            # AI's username, not the username of the user who requested
+            # the new entity.
             for id in xrange(*EditorGlobals.getEntIdAllocRange()):
                 if not id in entIdDict:
                     break

+ 4 - 4
direct/src/level/LevelSpec.py

@@ -94,8 +94,8 @@ class LevelSpec:
 
         def setAttribChange(self, entId, attrib, value, username):
             """ we're being asked to change an attribute """
-            LevelSpec.notify.debug("setAttribChange(%s): %s, %s = '%s'" %
-                                   (username, entId, attrib, repr(value)))
+            LevelSpec.notify.info("setAttribChange(%s): %s, %s = '%s'" %
+                                  (username, entId, attrib, repr(value)))
             assert entId in self.entId2specDict
             specDict = self.entId2specDict[entId]
             assert specDict[entId].has_key(attrib)
@@ -105,7 +105,7 @@ class LevelSpec:
             self.level.handleAttribChange(entId, attrib, value, username)
 
         def insertEntity(self, entId, entType, parentEntId):
-            LevelSpec.notify.debug('inserting entity %s' % entId)
+            LevelSpec.notify.info('inserting entity %s' % entId)
             assert entId not in self.entId2specDict
             assert self.entTypeReg is not None
             globalEnts = self.privGetGlobalEntityDict()
@@ -125,7 +125,7 @@ class LevelSpec:
             self.level.handleEntityInsert(entId)
             
         def removeEntity(self, entId):
-            LevelSpec.notify.debug('removing entity %s' % entId)
+            LevelSpec.notify.info('removing entity %s' % entId)
             assert entId in self.entId2specDict
             # notify the level
             self.level.handleEntityRemove(entId)