Permalink
Browse files

rename chunkFilename arguments, move chunkFilenameAt nearby

  • Loading branch information...
1 parent 745d1c4 commit b135d7693f2183930ed26255ccc05eee26046091 @codewarrior0 committed Jan 13, 2012
Showing with 8 additions and 7 deletions.
  1. +8 −7 infiniteworld.py
View
15 infiniteworld.py
@@ -2586,10 +2586,6 @@ def _saveChunk(self, chunk):
def discardAllChunks(self):
""" clear lots of memory, fast. """
- def chunkFilenameAt(self, x, y, z):
- cx = x >> 4
- cz = z >> 4
- return self._loadedChunks.get((cx, cz)).filename
def dirhash(self, n):
@@ -2613,10 +2609,15 @@ def regionFilename(self, rx, rz):
"r.%s.%s.mcr" % (rx, rz))
return s
- def chunkFilename(self, x, z):
- s = os.path.join(self.worldDir, self.dirhash(x), self.dirhash(z),
- "c.%s.%s.dat" % (base36(x), base36(z)))
+ def chunkFilename(self, cx, cz):
+ s = os.path.join(self.worldDir, self.dirhash(cx), self.dirhash(cz),
+ "c.%s.%s.dat" % (base36(cx), base36(cz)))
return s
+
+ def chunkFilenameAt(self, x, y, z):
+ cx = x >> 4
+ cz = z >> 4
+ return self._loadedChunks.get((cx, cz)).filename
def extractChunksInBox(self, box, parentFolder):
for cx, cz in box.chunkPositions:

0 comments on commit b135d76

Please sign in to comment.