This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
Jessist/addons/dialogue_manager/dialogue_response.gd

21 lines
608 B
GDScript3
Raw Normal View History

2022-06-18 13:05:48 +02:00
extends Node
var character: String
var character_replacements: Array
var is_allowed: bool
var prompt: String
var translation_key: String
var replacements: Array
var next_id: String
func _init(data: Dictionary, should_translate: bool = true) -> void:
character = data.get("character", "")
character_replacements = data.get("character_replacements", [])
is_allowed = data.get("is_allowed", true)
prompt = tr(data.get("translation_key")) if should_translate else data.get("text")
translation_key = data.get("translation_key")
replacements = data.get("replacements", [])
next_id = data.get("next_id")