Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions addons/dialogic/Modules/Text/node_type_sound.gd
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ func _ready() -> void:
get_parent().continued_revealing_text.connect(_on_continued_revealing_text)
get_parent().finished_revealing_text.connect(_on_finished_revealing_text)

if DialogicUtil.autoload():
var current_speaker = DialogicUtil.autoload().Text.get_current_speaker()
if current_speaker:
load_overwrite(current_speaker.custom_info.get('sound_moods', {}).get(current_speaker.current_mood, {}))

func _on_started_revealing_text() -> void:
if !enabled or (get_parent() is DialogicNode_DialogText and !get_parent().enabled):
Expand Down
2 changes: 2 additions & 0 deletions addons/dialogic/Modules/Text/subsystem_text.gd
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,14 @@ func update_name_label(character:DialogicCharacter):


func update_typing_sound_mood_from_character(character:DialogicCharacter, mood:String) -> void:
character.current_mood = mood
if character.custom_info.get("sound_moods", {}).is_empty():
update_typing_sound_mood()
elif mood in character.custom_info.get("sound_moods", {}):
update_typing_sound_mood(character.custom_info.get("sound_moods", {})[mood])
else:
var default_mood : String = character.custom_info.get("sound_mood_default", "")
character.current_mood = default_mood
update_typing_sound_mood(character.custom_info.get("sound_moods", {}).get(default_mood, {}))


Expand Down
1 change: 1 addition & 0 deletions addons/dialogic/Resources/character.gd
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ enum TranslatedProperties {

var _translation_id := ""

var current_mood := ""

func _get_extension() -> String:
return "dch"
Expand Down