2015-03-03 16:10:12 -06:00
|
|
|
from toontown.coghq import CogDisguiseGlobals
|
2015-06-21 03:29:47 -05:00
|
|
|
from toontown.suit import SuitDNA
|
2015-03-03 16:10:12 -06:00
|
|
|
|
|
|
|
class CogSuitManagerAI:
|
|
|
|
|
2015-06-21 03:29:47 -05:00
|
|
|
def recoverPart(self, toon, factoryType, suitTrack):
|
|
|
|
if suitTrack not in SuitDNA.suitDepts:
|
|
|
|
return
|
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
recoveredParts = [0, 0, 0, 0]
|
|
|
|
parts = toon.getCogParts()
|
2015-06-21 03:29:47 -05:00
|
|
|
suitTrack = SuitDNA.suitDepts.index(suitTrack)
|
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
if CogDisguiseGlobals.isSuitComplete(parts, suitTrack):
|
|
|
|
return recoveredParts
|
2015-06-21 03:29:47 -05:00
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
recoveredParts[suitTrack] = toon.giveGenericCogPart(factoryType, suitTrack)
|
2015-04-09 17:54:38 -05:00
|
|
|
return recoveredParts
|
|
|
|
|
|
|
|
def removeParts(self, toon, suitDept):
|
|
|
|
parts = toon.getCogParts()
|
2015-06-21 03:29:47 -05:00
|
|
|
|
2015-04-09 17:54:38 -05:00
|
|
|
if CogDisguiseGlobals.isSuitComplete(parts, suitDept):
|
2015-06-21 03:29:47 -05:00
|
|
|
toon.loseCogParts(suitDept)
|