diff --git a/dialogue/npcs/villager_normal.json b/dialogue/npcs/villager_normal.json index c7385d1..5a052cd 100644 --- a/dialogue/npcs/villager_normal.json +++ b/dialogue/npcs/villager_normal.json @@ -13,9 +13,9 @@ ] }, "welcome": [ - "Oh hello, [color=blue]{player}[/color]... You look great! What do you want from me?", - "Hey, [color=blue]{player}[/color]! Hope you have fun today! So what do you want?", - "Hi! What's up [color=blue]{player}[/color]?" + "Oh hello, {player}... You look great! What do you want from me?", + "Hey, {player}! Hope you have fun today! So what do you want?", + "Hi! What's up {player}?" ], "else": [ "Do you need something else?", @@ -23,7 +23,7 @@ ], "goodbye": [ "Was nice talking to you goodbye!", - "Have a great day, [color=blue]{player}[/color]!" + "Have a great day, {player}!" ], "tipp": [ [ diff --git a/scenes/gui/dialog_bubble.tscn b/scenes/gui/dialog_bubble.tscn index c9bb463..8dd853e 100644 --- a/scenes/gui/dialog_bubble.tscn +++ b/scenes/gui/dialog_bubble.tscn @@ -11,7 +11,7 @@ script = ExtResource("1_xtj1q") metadata/_edit_use_anchors_ = true [node name="typewriter_timer" type="Timer" parent="."] -wait_time = 0.05 +wait_time = 0.04 one_shot = true metadata/charsAtOnce = 60 diff --git a/src/scene-scripts/dialogue-system/dialog_bubble.cs b/src/scene-scripts/dialogue-system/dialog_bubble.cs index 1f0208e..7c48e07 100644 --- a/src/scene-scripts/dialogue-system/dialog_bubble.cs +++ b/src/scene-scripts/dialogue-system/dialog_bubble.cs @@ -5,79 +5,80 @@ using System.Text.RegularExpressions; public partial class dialog_bubble : CanvasLayer { - public Variant parsedDlg; - public ArrayList dlgLines = new ArrayList(); - public int dlgPointer = 0; - public RichTextLabel richText; - public int dialogOptionsLength = 1; + public Variant parsedDlg; + public ArrayList dlgLines = new ArrayList(); + public int dlgPointer = 0; + public RichTextLabel richText; + public int dialogOptionsLength = 1; - public override void _Ready() - { - richText = GetNode("box/rich_text_label"); - } - public void GetDialog(string file, string title, Variant actor, string playerName) - { - parsedDlg = Json.ParseString(FileAccess.Open(file, FileAccess.ModeFlags.Read).GetAsText().Replace("{player}", playerName)); - GetNode