def _say_choice(self): psounds.play_stereo(sounds.get_sound(SELECT_SOUND)) choice = self.choices[self.choice_index] msg = list(choice[0]) if len(choice) > 2: msg += mp.COMMA + choice[2] voice.item(msg)
def _confirm_choice(self): psounds.play_stereo(sounds.get_sound(6116)) if self._choice_exists() and self.choices[self.choice_index]: voice.confirmation( self.choices[self.choice_index][0][:1] ) # repeat only the first part of the choice (not the help) self.choice_done = True
def _loop_noise(self): if self.loop_noise is not None: if self.loop_source is None: # same priority level as "footstep", to avoid unpleasant interruptions self.loop_source = psounds.play_loop(sounds.get_sound(self.loop_noise), self.loop_volume, self.x, self.y, -10) else : self.loop_source.move(self.x, self.y) else: self.stop()
def launch_event(self, sound, volume=1, priority=0, limit=0, ambient=False): if self.place is self.interface.place: pass elif self.place in getattr(self.interface.place, "neighbors", []): priority -= 1 # Diminishing the volume is necessary as long as # "in the fog of war" squares are implemented # by shifting the observer backwards along the y axis. volume /= 4.0 else: return return psounds.play(sounds.get_sound(sound), volume, self.x, self.y, priority, limit, ambient)
def _say_choice(self): psounds.play_stereo(sounds.get_sound(6115)) voice.item(self.choices[self.choice_index][0])
def launch_event(self, sound, volume=1, priority=0, limit=0, ambient=False): if self.place is self.interface.place: return psounds.play(sounds.get_sound(sound), volume, self.x, self.y, priority, limit, ambient)
def _confirm_choice(self): psounds.play_stereo(sounds.get_sound(CONFIRM_SOUND)) if self._choice_exists() and self.choices[self.choice_index]: voice.confirmation(self.choices[self.choice_index][0]) self.choice_done = True
def _confirm_choice(self): psounds.play_stereo(sounds.get_sound(6116)) if self._choice_exists() and self.choices[self.choice_index]: voice.confirmation(self.choices[self.choice_index][0][:1]) # repeat only the first part of the choice (not the help) self.choice_done = True