mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 03:35:12 -06:00
24 lines
755 B
Python
24 lines
755 B
Python
from toontown.coghq import CogDisguiseGlobals
|
|
from toontown.suit import SuitDNA
|
|
|
|
class CogSuitManagerAI:
|
|
|
|
def recoverPart(self, toon, factoryType, suitTrack):
|
|
if suitTrack not in SuitDNA.suitDepts:
|
|
return
|
|
|
|
recoveredParts = [0, 0, 0, 0]
|
|
parts = toon.getCogParts()
|
|
suitTrack = SuitDNA.suitDepts.index(suitTrack)
|
|
|
|
if CogDisguiseGlobals.isSuitComplete(parts, suitTrack):
|
|
return recoveredParts
|
|
|
|
recoveredParts[suitTrack] = toon.giveGenericCogPart(factoryType, suitTrack)
|
|
return recoveredParts
|
|
|
|
def removeParts(self, toon, suitDept):
|
|
parts = toon.getCogParts()
|
|
|
|
if CogDisguiseGlobals.isSuitComplete(parts, suitDept):
|
|
toon.loseCogParts(suitDept)
|