Skip to content

Commit

Permalink
Fix misc bugs discovered while looking at #49.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrzwicky committed Oct 10, 2017
1 parent 54b8a44 commit 88c96db
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion fofix/core/GameEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ def __init__(self, config = None):
fp, pathname, description = imp.find_module("CustomTheme",[themepath])
theme = imp.load_module("CustomTheme", fp, pathname, description)
self.theme = theme.CustomTheme(themepath, themename)
except ImportError:
except ImportError as e:
log.error("Failed to load CustomTheme.py from %s" % pathname)
self.theme = Theme(themepath, themename)

self.task.addTask(self.theme)
Expand Down
4 changes: 4 additions & 0 deletions fofix/core/Theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,8 @@ def renderUnselectedItem(self, scene, i, n):
score = _("Nil")
stars = 0
name = ""
notesTotal = 0

if not item.getLocked():
try:
difficulties = item.partDifficulties[scene.scorePart.id]
Expand Down Expand Up @@ -1708,6 +1710,8 @@ def renderSelectedItem(self, scene, n):
score = _("Nil")
stars = 0
name = ""
notesTotal = 0

if not item.getLocked():
try:
difficulties = item.partDifficulties[scene.scorePart.id]
Expand Down
14 changes: 7 additions & 7 deletions fofix/game/MainMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ def __init__(self, engine):
strSettings = ""
strQuit = ""
else:
strCareer = "Career"
strQuickplay = "Quickplay"
strSolo = "Solo"
strMultiplayer = "Multiplayer"
strTraining = "Training"
strSettings = "Settings"
strQuit = "Quit"
strCareer = _("Career")
strQuickplay = _("Quickplay")
strSolo = _("Solo")
strMultiplayer = _("Multiplayer")
strTraining = _("Training")
strSettings = _("Settings")
strQuit = _("Quit")

multPlayerMenu = [
(_("Face-Off"), lambda: self.newLocalGame(players = 2, maxplayers = 4)),
Expand Down
13 changes: 6 additions & 7 deletions fofix/game/guitarscene/instruments/Drum.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,8 @@ def renderNote(self, length, sustain, color, tailOnly = False, isTappable = Fals
noteImage = self.noteButtons
texCoord = self.openTexCoord[y]
else:
if not noteImage:
noteImage = self.noteButtons
texCoord = self.noteTexCoord[y]
noteImage = self.noteButtons
texCoord = self.noteTexCoord[y]
else:
fret -= 1
vtx = self.noteVtx
Expand Down Expand Up @@ -688,22 +687,22 @@ def playDrumSounds(self, controls, playBassDrumOnly = False): #MFH - handles p
drumsJustHit[0] = True
if self.fretboardHop < 0.04:
self.fretboardHop = 0.04 #stump
if i == 1:
elif i == 1:
if not playBassDrumOnly and self.playedSound[i] == False:
self.engine.data.T1DrumSound.play()
self.playedSound[i] = True
drumsJustHit[i] = True
if i == 2:
elif i == 2:
if not playBassDrumOnly and self.playedSound[i] == False:
self.engine.data.T2DrumSound.play()
self.playedSound[i] = True
drumsJustHit[i] = True
if i == 3:
elif i == 3:
if not playBassDrumOnly and self.playedSound[i] == False:
self.engine.data.T3DrumSound.play()
self.playedSound[i] = True
drumsJustHit[i] = True
if i == 4: #MFH - must actually activate starpower!
elif i == 4: #MFH - must actually activate starpower!
if not playBassDrumOnly and self.playedSound[i] == False:
self.engine.data.CDrumSound.play()
self.playedSound[i] = True
Expand Down

0 comments on commit 88c96db

Please sign in to comment.