Working dialogue system

This commit is contained in:
2ndbeam 2024-05-19 17:14:52 +03:00
commit c0c68c8662
16 changed files with 267 additions and 103 deletions

View file

@ -1,7 +1,19 @@
extends MenuAction
class_name MessageSenderAction
var dialogue
## Message which will be send on click
var msg: Message
## Gets message and translates it on display.
## Shown message should end with _LOCAL
func _ready():
var item_id = get_parent().menu.item_ids[id]
msg = Message.create(item_id, tr(item_id + "_LOCAL"))
text = msg.shown
super._ready()
func action():
dialogue.send_message(msg)
get_parent().transit_menu(id)