fixed the unreveal part (it was already fixed in my test version, but I forgot to copy it over)

develop
doomchild 2011-03-30 13:37:51 -05:00
parent a4eb1e79be
commit 48f8e86b0a
1 changed files with 7 additions and 6 deletions

@ -8,7 +8,7 @@ class HideBlock(object):
self.x = 0 self.x = 0
self.y = 0 self.y = 0
self.z = 0 self.z = 0
self.hiddens = [[0] * 16 for i in xrange(16)] self.hiddens = [[0 for i in xrange(16)] for j in xrange(16)]
df_cm = ContextManager("Memory.xml") df_cm = ContextManager("Memory.xml")
df = df_cm.get_single_context() df = df_cm.get_single_context()
@ -73,16 +73,17 @@ raw_input()
print "Unrevealing...please wait" print "Unrevealing...please wait"
df.attach() df.attach()
m = df.maps
m.start() m.start()
for h in hide_blocks: for h in hide_blocks:
d = m.read_designations(hb.x, hb.y, hb.z) d = m.read_designations(h.x, h.y, h.z)
for k_i, i in enumerate(d): for k_i, i in enumerate(h.hiddens):
for k_j, j in enumerate(i): for k_j, j in enumerate(i):
j.bits.hidden = h.hiddens[k_i][k_j] d[k_i][k_j].bits.hidden = j
m.write_designations(hb.x, hb.y, hb.z, d) m.write_designations(h.x, h.y, h.z, d)
m.finish() m.finish()