decompilation: Fix toontown.coghq.MintLayout decompilation.
This commit is contained in:
parent
89671096d1
commit
6aa2e87d8f
1 changed files with 38 additions and 420 deletions
|
@ -726,217 +726,56 @@ class MintLayout:
|
|||
for i in xrange(self.numHallways):
|
||||
self.hallways.append(hallwayRng.choice(connectorRoomNames))
|
||||
|
||||
def _genFloorLayout--- This code section failed: ---
|
||||
def _genFloorLayout(self):
|
||||
rng = self.getRng()
|
||||
startingRoomIDs = MintRoomSpecs.CashbotMintEntranceIDs
|
||||
middleRoomIDs = MintRoomSpecs.CashbotMintMiddleRoomIDs
|
||||
finalRoomIDs = MintRoomSpecs.CashbotMintFinalRoomIDs
|
||||
|
||||
0 LOAD_FAST 'self'
|
||||
3 LOAD_ATTR 'getRng'
|
||||
6 CALL_FUNCTION_0 None
|
||||
9 STORE_FAST 'rng'
|
||||
numBattlesLeft = ToontownGlobals.MintNumBattles[self.mintId]
|
||||
|
||||
12 LOAD_GLOBAL 'MintRoomSpecs'
|
||||
15 LOAD_ATTR 'CashbotMintEntranceIDs'
|
||||
18 STORE_FAST 'startingRoomIDs'
|
||||
finalRoomId = rng.choice(finalRoomIDs)
|
||||
numBattlesLeft -= MintRoomSpecs.getNumBattles(finalRoomId)
|
||||
|
||||
21 LOAD_GLOBAL 'MintRoomSpecs'
|
||||
24 LOAD_ATTR 'CashbotMintMiddleRoomIDs'
|
||||
27 STORE_FAST 'middleRoomIDs'
|
||||
middleRoomIds = []
|
||||
middleRoomsLeft = self.numRooms - 2
|
||||
|
||||
30 LOAD_GLOBAL 'MintRoomSpecs'
|
||||
33 LOAD_ATTR 'CashbotMintFinalRoomIDs'
|
||||
36 STORE_FAST 'finalRoomIDs'
|
||||
numBattles2middleRoomIds = invertDictLossless(MintRoomSpecs.middleRoomId2numBattles)
|
||||
|
||||
39 LOAD_GLOBAL 'ToontownGlobals'
|
||||
42 LOAD_ATTR 'MintNumBattles'
|
||||
45 LOAD_FAST 'self'
|
||||
48 LOAD_ATTR 'mintId'
|
||||
51 BINARY_SUBSCR None
|
||||
52 STORE_FAST 'numBattlesLeft'
|
||||
allBattleRooms = []
|
||||
for num, roomIds in numBattles2middleRoomIds.items():
|
||||
if num > 0:
|
||||
allBattleRooms.extend(roomIds)
|
||||
while 1:
|
||||
allBattleRoomIds = list(allBattleRooms)
|
||||
rng.shuffle(allBattleRoomIds)
|
||||
battleRoomIds = self._chooseBattleRooms(numBattlesLeft,
|
||||
allBattleRoomIds)
|
||||
if battleRoomIds is not None:
|
||||
break
|
||||
|
||||
55 LOAD_FAST 'rng'
|
||||
58 LOAD_ATTR 'choice'
|
||||
61 LOAD_FAST 'finalRoomIDs'
|
||||
64 CALL_FUNCTION_1 None
|
||||
67 STORE_FAST 'finalRoomId'
|
||||
MintLayout.notify.info('could not find a valid set of battle rooms, trying again')
|
||||
|
||||
70 LOAD_FAST 'numBattlesLeft'
|
||||
73 LOAD_GLOBAL 'MintRoomSpecs'
|
||||
76 LOAD_ATTR 'getNumBattles'
|
||||
79 LOAD_FAST 'finalRoomId'
|
||||
82 CALL_FUNCTION_1 None
|
||||
85 INPLACE_SUBTRACT None
|
||||
86 STORE_FAST 'numBattlesLeft'
|
||||
middleRoomIds.extend(battleRoomIds)
|
||||
middleRoomsLeft -= len(battleRoomIds)
|
||||
|
||||
89 BUILD_LIST_0 None
|
||||
92 STORE_FAST 'middleRoomIds'
|
||||
if middleRoomsLeft > 0:
|
||||
actionRoomIds = numBattles2middleRoomIds[0]
|
||||
for i in xrange(middleRoomsLeft):
|
||||
roomId = rng.choice(actionRoomIds)
|
||||
actionRoomIds.remove(roomId)
|
||||
middleRoomIds.append(roomId)
|
||||
|
||||
95 LOAD_FAST 'self'
|
||||
98 LOAD_ATTR 'numRooms'
|
||||
101 LOAD_CONST 2
|
||||
104 BINARY_SUBTRACT None
|
||||
105 STORE_FAST 'middleRoomsLeft'
|
||||
roomIds = []
|
||||
|
||||
108 LOAD_GLOBAL 'invertDictLossless'
|
||||
111 LOAD_GLOBAL 'MintRoomSpecs'
|
||||
114 LOAD_ATTR 'middleRoomId2numBattles'
|
||||
117 CALL_FUNCTION_1 None
|
||||
120 STORE_FAST 'numBattles2middleRoomIds'
|
||||
roomIds.append(rng.choice(startingRoomIDs))
|
||||
|
||||
123 BUILD_LIST_0 None
|
||||
126 STORE_FAST 'allBattleRooms'
|
||||
rng.shuffle(middleRoomIds)
|
||||
roomIds.extend(middleRoomIds)
|
||||
|
||||
129 SETUP_LOOP '186'
|
||||
132 LOAD_FAST 'numBattles2middleRoomIds'
|
||||
135 LOAD_ATTR 'items'
|
||||
138 CALL_FUNCTION_0 None
|
||||
141 GET_ITER None
|
||||
142 FOR_ITER '185'
|
||||
145 UNPACK_SEQUENCE_2 None
|
||||
148 STORE_FAST 'num'
|
||||
151 STORE_FAST 'roomIds'
|
||||
roomIds.append(finalRoomId)
|
||||
|
||||
154 LOAD_FAST 'num'
|
||||
157 LOAD_CONST 0
|
||||
160 COMPARE_OP '>'
|
||||
163 JUMP_IF_FALSE '182'
|
||||
|
||||
166 LOAD_FAST 'allBattleRooms'
|
||||
169 LOAD_ATTR 'extend'
|
||||
172 LOAD_FAST 'roomIds'
|
||||
175 CALL_FUNCTION_1 None
|
||||
178 POP_TOP None
|
||||
179 JUMP_BACK '142'
|
||||
182 JUMP_BACK '142'
|
||||
185 POP_BLOCK None
|
||||
186_0 COME_FROM '129'
|
||||
|
||||
186 SETUP_LOOP '268'
|
||||
|
||||
189 LOAD_GLOBAL 'list'
|
||||
192 LOAD_FAST 'allBattleRooms'
|
||||
195 CALL_FUNCTION_1 None
|
||||
198 STORE_FAST 'allBattleRoomIds'
|
||||
|
||||
201 LOAD_FAST 'rng'
|
||||
204 LOAD_ATTR 'shuffle'
|
||||
207 LOAD_FAST 'allBattleRoomIds'
|
||||
210 CALL_FUNCTION_1 None
|
||||
213 POP_TOP None
|
||||
|
||||
214 LOAD_FAST 'self'
|
||||
217 LOAD_ATTR '_chooseBattleRooms'
|
||||
220 LOAD_FAST 'numBattlesLeft'
|
||||
|
||||
223 LOAD_FAST 'allBattleRoomIds'
|
||||
226 CALL_FUNCTION_2 None
|
||||
229 STORE_FAST 'battleRoomIds'
|
||||
|
||||
232 LOAD_FAST 'battleRoomIds'
|
||||
235 LOAD_CONST None
|
||||
238 COMPARE_OP 'is not'
|
||||
241 JUMP_IF_FALSE '248'
|
||||
|
||||
244 BREAK_LOOP None
|
||||
245 JUMP_FORWARD '248'
|
||||
248_0 COME_FROM '245'
|
||||
|
||||
248 LOAD_GLOBAL 'MintLayout'
|
||||
251 LOAD_ATTR 'notify'
|
||||
254 LOAD_ATTR 'info'
|
||||
257 LOAD_CONST 'could not find a valid set of battle rooms, trying again'
|
||||
260 CALL_FUNCTION_1 None
|
||||
263 POP_TOP None
|
||||
264 JUMP_BACK '189'
|
||||
267 POP_BLOCK None
|
||||
268_0 COME_FROM '186'
|
||||
|
||||
268 LOAD_FAST 'middleRoomIds'
|
||||
271 LOAD_ATTR 'extend'
|
||||
274 LOAD_FAST 'battleRoomIds'
|
||||
277 CALL_FUNCTION_1 None
|
||||
280 POP_TOP None
|
||||
|
||||
281 LOAD_FAST 'middleRoomsLeft'
|
||||
284 LOAD_GLOBAL 'len'
|
||||
287 LOAD_FAST 'battleRoomIds'
|
||||
290 CALL_FUNCTION_1 None
|
||||
293 INPLACE_SUBTRACT None
|
||||
294 STORE_FAST 'middleRoomsLeft'
|
||||
|
||||
297 LOAD_FAST 'middleRoomsLeft'
|
||||
300 LOAD_CONST 0
|
||||
303 COMPARE_OP '>'
|
||||
306 JUMP_IF_FALSE '386'
|
||||
|
||||
309 LOAD_FAST 'numBattles2middleRoomIds'
|
||||
312 LOAD_CONST 0
|
||||
315 BINARY_SUBSCR None
|
||||
316 STORE_FAST 'actionRoomIds'
|
||||
|
||||
319 SETUP_LOOP '386'
|
||||
322 LOAD_GLOBAL 'xrange'
|
||||
325 LOAD_FAST 'middleRoomsLeft'
|
||||
328 CALL_FUNCTION_1 None
|
||||
331 GET_ITER None
|
||||
332 FOR_ITER '382'
|
||||
335 STORE_FAST 'i'
|
||||
|
||||
338 LOAD_FAST 'rng'
|
||||
341 LOAD_ATTR 'choice'
|
||||
344 LOAD_FAST 'actionRoomIds'
|
||||
347 CALL_FUNCTION_1 None
|
||||
350 STORE_FAST 'roomId'
|
||||
|
||||
353 LOAD_FAST 'actionRoomIds'
|
||||
356 LOAD_ATTR 'remove'
|
||||
359 LOAD_FAST 'roomId'
|
||||
362 CALL_FUNCTION_1 None
|
||||
365 POP_TOP None
|
||||
|
||||
366 LOAD_FAST 'middleRoomIds'
|
||||
369 LOAD_ATTR 'append'
|
||||
372 LOAD_FAST 'roomId'
|
||||
375 CALL_FUNCTION_1 None
|
||||
378 POP_TOP None
|
||||
379 JUMP_BACK '332'
|
||||
382 POP_BLOCK None
|
||||
383_0 COME_FROM '319'
|
||||
383 JUMP_FORWARD '386'
|
||||
386_0 COME_FROM '383'
|
||||
|
||||
386 BUILD_LIST_0 None
|
||||
389 STORE_FAST 'roomIds'
|
||||
|
||||
392 LOAD_FAST 'roomIds'
|
||||
395 LOAD_ATTR 'append'
|
||||
398 LOAD_FAST 'rng'
|
||||
401 LOAD_ATTR 'choice'
|
||||
404 LOAD_FAST 'startingRoomIDs'
|
||||
407 CALL_FUNCTION_1 None
|
||||
410 CALL_FUNCTION_1 None
|
||||
413 POP_TOP None
|
||||
|
||||
414 LOAD_FAST 'rng'
|
||||
417 LOAD_ATTR 'shuffle'
|
||||
420 LOAD_FAST 'middleRoomIds'
|
||||
423 CALL_FUNCTION_1 None
|
||||
426 POP_TOP None
|
||||
|
||||
427 LOAD_FAST 'roomIds'
|
||||
430 LOAD_ATTR 'extend'
|
||||
433 LOAD_FAST 'middleRoomIds'
|
||||
436 CALL_FUNCTION_1 None
|
||||
439 POP_TOP None
|
||||
|
||||
440 LOAD_FAST 'roomIds'
|
||||
443 LOAD_ATTR 'append'
|
||||
446 LOAD_FAST 'finalRoomId'
|
||||
449 CALL_FUNCTION_1 None
|
||||
452 POP_TOP None
|
||||
|
||||
453 LOAD_FAST 'roomIds'
|
||||
456 RETURN_VALUE None
|
||||
|
||||
Syntax error at or near `POP_BLOCK' token at offset 267
|
||||
return roomIds
|
||||
|
||||
def getNumRooms(self):
|
||||
return len(self.roomIds)
|
||||
|
@ -982,147 +821,7 @@ Syntax error at or near `POP_BLOCK' token at offset 267
|
|||
while baseIndex < len(allBattleRoomIds):
|
||||
nextRoomId = allBattleRoomIds[baseIndex]
|
||||
baseIndex += 1
|
||||
newNumBattlesLef
|
||||
# Can't uncompyle C:\Users\Maverick\Documents\Visual Studio 2010\Projects\Unfreezer\py2\toontown\coghq\MintLayout.pyc
|
||||
Traceback (most recent call last):
|
||||
File "C:\python27\lib\uncompyle2\__init__.py", line 206, in main
|
||||
uncompyle_file(infile, outstream, showasm, showast)
|
||||
File "C:\python27\lib\uncompyle2\__init__.py", line 143, in uncompyle_file
|
||||
uncompyle(version, co, outstream, showasm, showast)
|
||||
File "C:\python27\lib\uncompyle2\__init__.py", line 132, in uncompyle
|
||||
raise walk.ERROR
|
||||
ParserError: --- This code section failed: ---
|
||||
|
||||
0 LOAD_FAST 'self'
|
||||
3 LOAD_ATTR 'getRng'
|
||||
6 CALL_FUNCTION_0 None
|
||||
9 STORE_FAST 'rng'
|
||||
|
||||
12 LOAD_GLOBAL 'MintRoomSpecs'
|
||||
15 LOAD_ATTR 'CashbotMintEntranceIDs'
|
||||
18 STORE_FAST 'startingRoomIDs'
|
||||
|
||||
21 LOAD_GLOBAL 'MintRoomSpecs'
|
||||
24 LOAD_ATTR 'CashbotMintMiddleRoomIDs'
|
||||
27 STORE_FAST 'middleRoomIDs'
|
||||
|
||||
30 LOAD_GLOBAL 'MintRoomSpecs'
|
||||
33 LOAD_ATTR 'CashbotMintFinalRoomIDs'
|
||||
36 STORE_FAST 'finalRoomIDs'
|
||||
|
||||
39 LOAD_GLOBAL 'ToontownGlobals'
|
||||
42 LOAD_ATTR 'MintNumBattles'
|
||||
45 LOAD_FAST 'self'
|
||||
48 LOAD_ATTR 'mintId'
|
||||
51 BINARY_SUBSCR None
|
||||
52 STORE_FAST 'numBattlesLeft'
|
||||
|
||||
55 LOAD_FAST 'rng'
|
||||
58 LOAD_ATTR 'choice'
|
||||
61 LOAD_FAST 'finalRoomIDs'
|
||||
64 CALL_FUNCTION_1 None
|
||||
67 STORE_FAST 'finalRoomId'
|
||||
|
||||
70 LOAD_FAST 'numBattlesLeft'
|
||||
73 LOAD_GLOBAL 'MintRoomSpecs'
|
||||
76 LOAD_ATTR 'getNumBattles'
|
||||
79 LOAD_FAST 'finalRoomId'
|
||||
82 CALL_FUNCTION_1 None
|
||||
85 INPLACE_SUBTRACT None
|
||||
86 STORE_FAST 'numBattlesLeft'
|
||||
|
||||
89 BUILD_LIST_0 None
|
||||
92 STORE_FAST 'middleRoomIds'
|
||||
|
||||
95 LOAD_FAST 'self'
|
||||
98 LOAD_ATTR 'numRooms'
|
||||
101 LOAD_CONST 2
|
||||
104 BINARY_SUBTRACT None
|
||||
105 STORE_FAST 'middleRoomsLeft'
|
||||
|
||||
108 LOAD_GLOBAL 'invertDictLossless'
|
||||
111 LOAD_GLOBAL 'MintRoomSpecs'
|
||||
114 LOAD_ATTR 'middleRoomId2numBattles'
|
||||
117 CALL_FUNCTION_1 None
|
||||
120 STORE_FAST 'numBattles2middleRoomIds'
|
||||
|
||||
123 BUILD_LIST_0 None
|
||||
126 STORE_FAST 'allBattleRooms'
|
||||
|
||||
129 SETUP_LOOP '186'
|
||||
132 LOAD_FAST 'numBattles2middleRoomIds'
|
||||
135 LOAD_ATTR 'items'
|
||||
138 CALL_FUNCTION_0 None
|
||||
141 GET_ITER None
|
||||
142 FOR_ITER '185'
|
||||
145 UNPACK_SEQUENCE_2 None
|
||||
148 STORE_FAST 'num'
|
||||
151 STORE_FAST 'roomIds'
|
||||
|
||||
154 LOAD_FAST 'num'
|
||||
157 LOAD_CONST 0
|
||||
160 COMPARE_OP '>'
|
||||
163 JUMP_IF_FALSE '182'
|
||||
|
||||
166 LOAD_FAST 'allBattleRooms'
|
||||
169 LOAD_ATTR 'extend'
|
||||
172 LOAD_FAST 'roomIds'
|
||||
175 CALL_FUNCTION_1 None
|
||||
178 POP_TOP None
|
||||
179 JUMP_BACK '142'
|
||||
182 JUMP_BACK '142'
|
||||
185 POP_BLOCK None
|
||||
186_0 COME_FROM '129'
|
||||
|
||||
186 SETUP_LOOP '268'
|
||||
|
||||
189 LOAD_GLOBAL 'list'
|
||||
192 LOAD_FAST 'allBattleRooms'
|
||||
195 CALL_FUNCTION_1 None
|
||||
198 STORE_FAST 'allBattleRoomIds'
|
||||
|
||||
201 LOAD_FAST 'rng'
|
||||
204 LOAD_ATTR 'shuffle'
|
||||
207 LOAD_FAST 'allBattleRoomIds'
|
||||
210 CALL_FUNCTION_1 None
|
||||
213 POP_TOP None
|
||||
|
||||
214 LOAD_FAST 'self'
|
||||
217 LOAD_ATTR '_chooseBattleRooms'
|
||||
220 LOAD_FAST 'numBattlesLeft'
|
||||
|
||||
223 LOAD_FAST 'allBattleRoomIds'
|
||||
226 CALL_FUNCTION_2 None
|
||||
229 STORE_FAST 'battleRoomIds'
|
||||
|
||||
232 LOAD_FAST 'battleRoomIds'
|
||||
235 LOAD_CONST None
|
||||
238 COMPARE_OP 'is not'
|
||||
241 JUMP_IF_FALSE '248'
|
||||
|
||||
244 BREAK_LOOP None
|
||||
245 JUMP_FORWARD '248'
|
||||
248_0 COME_FROM '245'
|
||||
|
||||
248 LOAD_GLOBAL 'MintLayout'
|
||||
251 LOAD_ATTR 'notify'
|
||||
254 LOAD_ATTR 'info'
|
||||
257 LOAD_CONST 'could not find a valid set of battle rooms, trying again'
|
||||
260 CALL_FUNCTION_1 None
|
||||
263 POP_TOP None
|
||||
264 JUMP_BACK '189'
|
||||
267 POP_BLOCK None
|
||||
268_0 COME_FROM '186'
|
||||
|
||||
268 LOAD_FAST 'middleRoomIds'
|
||||
271 LOAD_ATTR 'extend'
|
||||
274 LOAD_FAST 'battleRoomIds'
|
||||
277 CALL_FUNCTION_1 None
|
||||
280 POP_TOP None
|
||||
|
||||
281 LOAD_FAST 'middleRoomsLeft'
|
||||
284 LOAD_GLOBAL 'len'
|
||||
287 LOAD_FAST 'battleRoomIdst = numBattlesLeft - MintRoomSpecs.middleRoomId2numBattles[nextRoomId]
|
||||
newNumBattlesLeft = numBattlesLeft - MintRoomSpecs.middleRoomId2numBattles[nextRoomId]
|
||||
if newNumBattlesLeft < 0:
|
||||
continue
|
||||
elif newNumBattlesLeft == 0:
|
||||
|
@ -1147,84 +846,3 @@ ParserError: --- This code section failed: ---
|
|||
|
||||
def __repr__(self):
|
||||
return str(self)
|
||||
'
|
||||
290 CALL_FUNCTION_1 None
|
||||
293 INPLACE_SUBTRACT None
|
||||
294 STORE_FAST 'middleRoomsLeft'
|
||||
|
||||
297 LOAD_FAST 'middleRoomsLeft'
|
||||
300 LOAD_CONST 0
|
||||
303 COMPARE_OP '>'
|
||||
306 JUMP_IF_FALSE '386'
|
||||
|
||||
309 LOAD_FAST 'numBattles2middleRoomIds'
|
||||
312 LOAD_CONST 0
|
||||
315 BINARY_SUBSCR None
|
||||
316 STORE_FAST 'actionRoomIds'
|
||||
|
||||
319 SETUP_LOOP '386'
|
||||
322 LOAD_GLOBAL 'xrange'
|
||||
325 LOAD_FAST 'middleRoomsLeft'
|
||||
328 CALL_FUNCTION_1 None
|
||||
331 GET_ITER None
|
||||
332 FOR_ITER '382'
|
||||
335 STORE_FAST 'i'
|
||||
|
||||
338 LOAD_FAST 'rng'
|
||||
341 LOAD_ATTR 'choice'
|
||||
344 LOAD_FAST 'actionRoomIds'
|
||||
347 CALL_FUNCTION_1 None
|
||||
350 STORE_FAST 'roomId'
|
||||
|
||||
353 LOAD_FAST 'actionRoomIds'
|
||||
356 LOAD_ATTR 'remove'
|
||||
359 LOAD_FAST 'roomId'
|
||||
362 CALL_FUNCTION_1 None
|
||||
365 POP_TOP None
|
||||
|
||||
366 LOAD_FAST 'middleRoomIds'
|
||||
369 LOAD_ATTR 'append'
|
||||
372 LOAD_FAST 'roomId'
|
||||
375 CALL_FUNCTION_1 None
|
||||
378 POP_TOP None
|
||||
379 JUMP_BACK '332'
|
||||
382 POP_BLOCK None
|
||||
383_0 COME_FROM '319'
|
||||
383 JUMP_FORWARD '386'
|
||||
386_0 COME_FROM '383'
|
||||
|
||||
386 BUILD_LIST_0 None
|
||||
389 STORE_FAST 'roomIds'
|
||||
|
||||
392 LOAD_FAST 'roomIds'
|
||||
395 LOAD_ATTR 'append'
|
||||
398 LOAD_FAST 'rng'
|
||||
401 LOAD_ATTR 'choice'
|
||||
404 LOAD_FAST 'startingRoomIDs'
|
||||
407 CALL_FUNCTION_1 None
|
||||
410 CALL_FUNCTION_1 None
|
||||
413 POP_TOP None
|
||||
|
||||
414 LOAD_FAST 'rng'
|
||||
417 LOAD_ATTR 'shuffle'
|
||||
420 LOAD_FAST 'middleRoomIds'
|
||||
423 CALL_FUNCTION_1 None
|
||||
426 POP_TOP None
|
||||
|
||||
427 LOAD_FAST 'roomIds'
|
||||
430 LOAD_ATTR 'extend'
|
||||
433 LOAD_FAST 'middleRoomIds'
|
||||
436 CALL_FUNCTION_1 None
|
||||
439 POP_TOP None
|
||||
|
||||
440 LOAD_FAST 'roomIds'
|
||||
443 LOAD_ATTR 'append'
|
||||
446 LOAD_FAST 'finalRoomId'
|
||||
449 CALL_FUNCTION_1 None
|
||||
452 POP_TOP None
|
||||
|
||||
453 LOAD_FAST 'roomIds'
|
||||
456 RETURN_VALUE None
|
||||
|
||||
Syntax error at or near `POP_BLOCK' token at offset 267
|
||||
|
||||
|
|
Loading…
Reference in a new issue