dont play second sound when sending message
This commit is contained in:
parent
37e0505839
commit
3cf3d05b7b
|
@ -131,6 +131,10 @@ pub fn play_sfx(
|
||||||
events_sfx.clear();
|
events_sfx.clear();
|
||||||
}
|
}
|
||||||
for sfx in events_sfx.read() {
|
for sfx in events_sfx.read() {
|
||||||
|
match sfx.0 {
|
||||||
|
Sfx::None => { continue; }
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
commands.spawn(AudioBundle {
|
commands.spawn(AudioBundle {
|
||||||
source: match sfx.0 {
|
source: match sfx.0 {
|
||||||
Sfx::Switch => sound_switch.0.clone(),
|
Sfx::Switch => sound_switch.0.clone(),
|
||||||
|
|
|
@ -377,7 +377,7 @@ impl ParserState {
|
||||||
name: self.name.clone(),
|
name: self.name.clone(),
|
||||||
label: self.label.clone(),
|
label: self.label.clone(),
|
||||||
delay: self.delay.clone(),
|
delay: self.delay.clone(),
|
||||||
sound: "chat".to_string(),
|
sound: if self.is_choice { "".to_string() } else { "chat".to_string() },
|
||||||
level: self.level.clone(),
|
level: self.level.clone(),
|
||||||
reply: if self.is_choice { "".to_string() } else { self.text.clone() },
|
reply: if self.is_choice { "".to_string() } else { self.text.clone() },
|
||||||
choice: if self.is_choice { self.text.clone() } else { "".to_string() },
|
choice: if self.is_choice { self.text.clone() } else { "".to_string() },
|
||||||
|
|
Loading…
Reference in a new issue