Bugfixes and Beauty

This commit is contained in:
2020-05-16 11:22:41 -04:00
parent 86637e395f
commit 497f251376
28 changed files with 222 additions and 8 deletions

View File

@ -1,5 +1,7 @@
extends "res://Scripts/Component/Speaker.gd"
signal dialog_exited
const Story_Reader_Class = preload("res://addons/EXP-System-Dialog/Reference_StoryReader/EXP_StoryReader.gd")
const story_file = preload("res://Assets/Stories/english_story.tres")
var story_reader = Story_Reader_Class.new()
@ -69,6 +71,7 @@ func move_dialog_forward(decision = 0):
nid = story_reader.get_nid_from_slot(did, nid, decision)
process_message(story_reader.get_text(did, nid))
else:
emit_signal("dialog_exited")
gui.finish_dialog()
func _process(delta):

View File

@ -1,9 +1,18 @@
extends "res://Scripts/Component/Interactable.gd"
var state : int = 0
func _ready():
connect("interacted", self, "_on_interact")
$Speaker.speaker_name = "CEO Grant Blevins"
#$Speaker.start_dialog("intro_science")
$Speaker.connect("dialog_exited", self, "_on_dialog_exit")
func _on_interact():
$Speaker.start_dialog("intro_meet_ceo")
if state == 0:
$Speaker.start_dialog("intro_meet_ceo")
else:
$Speaker.start_dialog("into_speak_ceo")
func _on_dialog_exit():
if state == 0:
state = 1

View File

@ -3,7 +3,7 @@ extends "res://Scripts/Component/Interactable.gd"
func _ready():
connect("interacted", self, "_on_interact")
$Speaker.speaker_name = "Dr.Thadd"
$Speaker.start_dialog("intro_science")
#$Speaker.start_dialog("intro_science")
func _on_interact():
$Speaker.start_dialog("intro_science_followup")

View File

@ -24,7 +24,7 @@ func remove_interactable(interactable):
interactables.remove(loc)
func _process(delta):
if Input.is_action_just_pressed("ui_accept") and len(interactables) > 0:
if Input.is_action_just_pressed("ui_accept") and len(interactables) > 0 and not gui.is_in_dialog():
interactables[0].interact()
func _physics_process(delta):

View File

@ -21,6 +21,7 @@ func clear_choices():
$Dialog/Choices.get_child(i).queue_free()
func add_choice(speaker : Node, choice_id : int, choice_text : String):
$Dialog/Choices.hide()
var button = Button.new()
button.text = choice_text
button.connect("button_down", speaker, "_on_choice", [choice_id])