mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -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')
|
self.notify.debug('Entering changeColor')
|
||||||
colorList = self.getColorList()
|
colorList = self.getColorList()
|
||||||
newChoice = self.shuffleButton.getCurrChoice()
|
newChoice = self.shuffleButton.getCurrChoice()
|
||||||
newHeadColorIndex = colorList.index(newChoice[0])
|
newHeadColorIndex = self.indexOf(colorList, newChoice[0], 25)
|
||||||
newArmColorIndex = colorList.index(newChoice[1])
|
newArmColorIndex = self.indexOf(colorList, newChoice[1], 25)
|
||||||
newGloveColorIndex = colorList.index(newChoice[2])
|
newGloveColorIndex = self.indexOf(colorList, newChoice[2], 0)
|
||||||
newLegColorIndex = colorList.index(newChoice[3])
|
newLegColorIndex = self.indexOf(colorList, newChoice[3], 25)
|
||||||
self.__swapHeadColor(newHeadColorIndex - self.headChoice)
|
self.__swapHeadColor(newHeadColorIndex - self.headChoice)
|
||||||
if self.colorAll:
|
if self.colorAll:
|
||||||
self.__swapArmColor(newHeadColorIndex - self.armChoice)
|
self.__swapArmColor(newHeadColorIndex - self.armChoice)
|
||||||
|
@ -298,6 +298,12 @@ class ColorShop(StateData.StateData):
|
||||||
self.__swapArmColor(newArmColorIndex - self.armChoice)
|
self.__swapArmColor(newArmColorIndex - self.armChoice)
|
||||||
self.__swapGloveColor(newGloveColorIndex - self.gloveChoice)
|
self.__swapGloveColor(newGloveColorIndex - self.gloveChoice)
|
||||||
self.__swapLegColor(newLegColorIndex - self.legChoice)
|
self.__swapLegColor(newLegColorIndex - self.legChoice)
|
||||||
|
|
||||||
|
def indexOf(self, list, item, default):
|
||||||
|
try:
|
||||||
|
return list.index(item)
|
||||||
|
except:
|
||||||
|
return default
|
||||||
|
|
||||||
def getCurrToonSetting(self):
|
def getCurrToonSetting(self):
|
||||||
return [self.dna.headColor, self.dna.armColor, self.dna.gloveColor, self.dna.legColor]
|
return [self.dna.headColor, self.dna.armColor, self.dna.gloveColor, self.dna.legColor]
|
||||||
|
|
Loading…
Reference in a new issue