diff --git a/assets/font/urbane-rounded-medium.otf.import b/assets/font/urbane-rounded-medium.otf.import index 088b5ca..1f5e3c7 100644 --- a/assets/font/urbane-rounded-medium.otf.import +++ b/assets/font/urbane-rounded-medium.otf.import @@ -18,6 +18,7 @@ generate_mipmaps=false multichannel_signed_distance_field=false msdf_pixel_range=8 msdf_size=48 +allow_system_fallback=true force_autohinter=false hinting=1 subpixel_positioning=1 diff --git a/dialog/npcs/villager_normal.json b/dialog/npcs/villager_normal.json deleted file mode 100644 index 2eb375a..0000000 --- a/dialog/npcs/villager_normal.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "dialogTitle": "Debug Character", - "dialogType": "villager", - "randomWelcomeText":[ - "Oh hello, {0}... You look great! What do you want from me?", - "Hey, {0}! Hope you have fun today!", - "Hi! What's up {0}?" - ], - "randomGoodbyeText":[ - "Was nice talking to you goodbye!", - "Have a great day, {0}!" - ], - "multiTipp0":[ - "You can walk arround with WASD on PC.", - "You can also use your joystick and D-Pad, if you have a controller.", - "You can interact with cupcakes and use the buggy placeholder clouds as a football." - ], - "multiTipp1":[ - "Lorem ipsum dolor sit amet, consetetur sadipscing elitr,", - "sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,", - "sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.", - "Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.", - { - "Okay I'm doing that":[ - "Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." - ] - } - ], - "multiTipp2":[ - "test1test1test1test1test1test1test1test1test1test1test1test1test1test1test1", - "test2test2test2test2test2test2test2test2test2test2test2test2test2test2test2", - "test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3", - "So do you want to do xy for me?", - { - "Okay I'm doing that":[ - "Good nice thank you!" - ] - } - ] -} \ No newline at end of file diff --git a/dialogue/npcs/villager_normal.json b/dialogue/npcs/villager_normal.json new file mode 100644 index 0000000..ca41eb4 --- /dev/null +++ b/dialogue/npcs/villager_normal.json @@ -0,0 +1,64 @@ +{ + "dialogTitle": "Debug Character", + "dialogType": "villager", + + "player": { + "talk" : [ + "I just wanna talk", + "What's up", + "Can we talk?" + ], + "goaway" : [ + "Nevermind!", + "Nothing", + "Have a great day!" + ] + }, + + "welcome": + [ + "Oh hello, {0}... You look great! What do you want from me?", + "Hey, {0}! Hope you have fun today! So what do you want?", + "Hi! What's up {0}?" + ], + "else": + [ + "Do you need something else?", + "So can i help you with something else?" + ], + "goodbye": + [ + "Was nice talking to you goodbye!", + "Have a great day, {0}!" + ], + + "multi": + { + "tipp": + [ + [ + "You can walk arround with WASD on PC.", + "You can also use your joystick and D-Pad, if you have a controller.", + "You can interact with cupcakes and use the buggy placeholder clouds as a football." + ], + [ + "Lorem ipsum dolor sit amet, consetetur sadipscing elitr,", + "sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,", + "sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.", + "Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." + ], + [ + "test1test1test1test1test1test1test1test1test1test1test1test1test1test1test1", + "test2test2test2test2test2test2test2test2test2test2test2test2test2test2test2", + "test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3", + "So do you want to do xy for me?", + { + "did you detect this dictionary as answer prompt?": + [ + "yes i have!" + ] + } + ] + ] + } +} \ No newline at end of file diff --git a/scenes/tiles/dialogdebug_cupcake.tscn b/scenes/tiles/dialogdebug_cupcake.tscn index b34713b..74c8ad2 100644 --- a/scenes/tiles/dialogdebug_cupcake.tscn +++ b/scenes/tiles/dialogdebug_cupcake.tscn @@ -18,7 +18,7 @@ texture = ExtResource("1_imilm") shape = SubResource("RectangleShape2D_pchpi") [node name="dialog_trigger_area" parent="." instance=ExtResource("2_blpmd")] -dialogFile = "res://dialog/npcs/villager_normal.json" +dialogFile = "res://dialogue/npcs/villager_normal.json" [node name="collision_shape_2d" parent="dialog_trigger_area" index="0"] shape = SubResource("RectangleShape2D_d78tr") diff --git a/src/scene-scripts/dialog_trigger_area.cs b/src/scene-scripts/dialog_trigger_area.cs index c00e815..d2c3b4a 100644 --- a/src/scene-scripts/dialog_trigger_area.cs +++ b/src/scene-scripts/dialog_trigger_area.cs @@ -7,6 +7,6 @@ public partial class dialog_trigger_area : Area2D string dialogFile; public void OnInteraction(string playerName) { - GetNode("/root/main/dialog_bubble").Call("ImportString",dialogFile,playerName); + GetNode("/root/main/dialog_bubble").Call("ImportString",dialogFile,playerName);//signal instead of call? } } diff --git a/src/scene-scripts/gui/dialog_bubble.cs b/src/scene-scripts/gui/dialog_bubble.cs index d6fd170..3dea9ad 100644 --- a/src/scene-scripts/gui/dialog_bubble.cs +++ b/src/scene-scripts/gui/dialog_bubble.cs @@ -1,61 +1,10 @@ //WORK IN PROGRESS this code is very messy and will be fixed when it works using Godot; -using Godot.Collections; using System; -using System.Collections.Generic; public partial class dialog_bubble : CanvasLayer { - public Dictionary allDialog; - public List currentDialogList = new List(); - public string currentKey; - public string currentDialogLine; - public int dialogCounter; - public string userName; - public void ImportString(string dialogFile, string playerName) - { - userName = playerName; - GetNode("/root/main/player").Call("ChangeProcess", false); - currentKey = "multiTipp2";//2 is a selection menu needs to be planned before coding - using var file = FileAccess.Open(dialogFile, FileAccess.ModeFlags.Read); - string text = file.GetAsText(); - allDialog = (Dictionary)JSON.ParseString(text); - GetNode