mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 19:52:37 -06:00
Another fix
This commit is contained in:
parent
c609a44980
commit
ead19d7c63
1 changed files with 10 additions and 4 deletions
|
@ -285,10 +285,10 @@ class ColorShop(StateData.StateData):
|
|||
self.notify.debug('Entering changeColor')
|
||||
colorList = self.getColorList()
|
||||
newChoice = self.shuffleButton.getCurrChoice()
|
||||
newHeadColorIndex = colorList.index(newChoice[0])
|
||||
newArmColorIndex = colorList.index(newChoice[1])
|
||||
newGloveColorIndex = colorList.index(newChoice[2])
|
||||
newLegColorIndex = colorList.index(newChoice[3])
|
||||
newHeadColorIndex = self.indexOf(colorList, newChoice[0], 25)
|
||||
newArmColorIndex = self.indexOf(colorList, newChoice[1], 25)
|
||||
newGloveColorIndex = self.indexOf(colorList, newChoice[2], 0)
|
||||
newLegColorIndex = self.indexOf(colorList, newChoice[3], 25)
|
||||
self.__swapHeadColor(newHeadColorIndex - self.headChoice)
|
||||
if self.colorAll:
|
||||
self.__swapArmColor(newHeadColorIndex - self.armChoice)
|
||||
|
@ -299,5 +299,11 @@ class ColorShop(StateData.StateData):
|
|||
self.__swapGloveColor(newGloveColorIndex - self.gloveChoice)
|
||||
self.__swapLegColor(newLegColorIndex - self.legChoice)
|
||||
|
||||
def indexOf(self, list, item, default):
|
||||
try:
|
||||
return list.index(item)
|
||||
except:
|
||||
return default
|
||||
|
||||
def getCurrToonSetting(self):
|
||||
return [self.dna.headColor, self.dna.armColor, self.dna.gloveColor, self.dna.legColor]
|
||||
|
|
Loading…
Reference in a new issue