- removed recorded speech (propretiary software)
- use speech TTS in FG
This commit is contained in:
@@ -8,11 +8,15 @@
|
||||
# fgcommand("play-audio-sample", props.Node.new(sound));
|
||||
#}
|
||||
|
||||
var show_message = func (m, delay, snd = nil) {
|
||||
var show_message = func (m, delay, speak = nil, snd = nil) {
|
||||
setprop("/sim/mission/message/current-message", m);
|
||||
setprop("/sim/mission/message/message-delay", delay);
|
||||
setprop("/sim/mission/message/show-message", 1);
|
||||
|
||||
if (speak != nil) {
|
||||
mission.speak(m);
|
||||
}
|
||||
|
||||
if (snd != nil) {
|
||||
mission.play_sound(snd);
|
||||
}
|
||||
@@ -27,6 +31,7 @@ mission.extension_add("MissionObject", {
|
||||
node : n,
|
||||
name : n.getValue("name"),
|
||||
_message : n.getValue("text"),
|
||||
_speak : n.getValue("speak"),
|
||||
_sound_file : n.getValue("sound-file"),
|
||||
_delay : (n.getValue("delay-sec") or 5),
|
||||
};
|
||||
@@ -34,7 +39,7 @@ mission.extension_add("MissionObject", {
|
||||
return m;
|
||||
},
|
||||
|
||||
start: func show_message(me._message, me._delay, me._sound_file),
|
||||
start: func show_message(me._message, me._delay, me._speak, me._sound_file),
|
||||
|
||||
stop: func,
|
||||
|
||||
|
||||
@@ -14,15 +14,6 @@ mission.extension_add("MissionObject", {
|
||||
return m;
|
||||
},
|
||||
|
||||
# _play_sound: func {
|
||||
# var sound = {
|
||||
# path : me._sound_path,
|
||||
# file : me._sound_file, #file,
|
||||
# volume : 1
|
||||
# };
|
||||
# fgcommand("play-audio-sample", props.Node.new(sound));
|
||||
# },
|
||||
|
||||
start: func mission.play_sound(me._sound_file),
|
||||
|
||||
stop: func,
|
||||
|
||||
Reference in New Issue
Block a user