soundlist: dont crash on ini not found lol

This commit is contained in:
cidoku 2025-10-27 03:25:29 -03:00
parent d83ecfc5a7
commit e4005b5492

View File

@ -3690,7 +3690,7 @@ class GUI(QtGui.QWidget):
self.mChatMessage = mChatMessage
newSide = self.mChatMessage[SIDE]
canSlide = self.slideAvailable and not wasZoom and int(self.mChatMessage[EMOTE_MOD]) < 5
canSlide = self.slideAvailable and not wasZoom and int(self.mChatMessage[EMOTE_MOD]) < 5 and self.mChatMessage[ANIM].strip() != ""
if canSlide and self.mChatMessage[SLIDE] == "1" and self.slideLastPos and newSide != self.slideLastPos and newSide in ["def", "pro", "wit"]:
self.startSlide(self.slideMap[self.slideLastPos][newSide])
@ -4293,10 +4293,11 @@ class GUI(QtGui.QWidget):
def populateSoundList(self):
self.boxSounds.clear()
self.boxSounds.addItem("Default")
with open("base/soundlist.ini") as f:
for sound in f.read().split("\n"):
if not sound: continue
self.boxSounds.addItem(sound.strip())
if exists("base/soundlist.ini"):
with open("base/soundlist.ini") as f:
for sound in f.read().split("\n"):
if not sound: continue
self.boxSounds.addItem(sound.strip())
def playSfx(self):