Don't throw in mce.py on fill/replace with an empty box

mce.py, when called with an empty box (e.g., request entire world to be
changed), would throw an exception, since box is None (and therefore has
no volume parameter).  This would prevent the ligthting steps from
occuring further on.
This commit is contained in:
Caleb Deveraux 2010-10-05 21:54:58 -06:00
parent b3a51d8487
commit 85a6959c8c

4
mce.py
View File

@ -268,7 +268,7 @@ class mce(object):
self.needsSave = True;
print "Filled {0} blocks.".format(box.volume)
print "Filled {0} blocks.".format("all" if box is None else box.volume)
def _replace(self, command):
"""
@ -306,7 +306,7 @@ class mce(object):
self.level.fillBlocks(box, newBlockType, blockData = 0, blocksToReplace = [blockType])
self.needsSave = True;
print "Replaced {0} blocks.".format(box.volume)
print "Replaced {0} blocks.".format("all" if box is None else box.volume)
def _analyze(self, command):
"""