Poodletooth-iLand/toontown/ai/CogSuitManagerAI.py

27 lines
766 B
Python
Raw Normal View History

2015-03-03 16:10:12 -06:00
from toontown.coghq import CogDisguiseGlobals
suitTrackIndex = {
's' : 3,
'm' : 2,
'l' : 1,
'c' : 0
}
class CogSuitManagerAI:
def __init__(self, air):
self.air = air
def recoverPart(self, toon, factoryType, suitTrack, zoneId, toons):
recoveredParts = [0, 0, 0, 0]
parts = toon.getCogParts()
suitTrack = suitTrackIndex[suitTrack]
if CogDisguiseGlobals.isSuitComplete(parts, suitTrack):
return recoveredParts
recoveredParts[suitTrack] = toon.giveGenericCogPart(factoryType, suitTrack)
2015-04-09 17:54:38 -05:00
return recoveredParts
def removeParts(self, toon, suitDept):
parts = toon.getCogParts()
if CogDisguiseGlobals.isSuitComplete(parts, suitDept):
toon.loseCogParts(suitDept)