Dialog bug fix/tweaks
Deploy Promiscuity Auth API / deploy (push) Successful in 47s
Deploy Promiscuity Character API / deploy (push) Successful in 43s
Deploy Promiscuity Locations API / deploy (push) Successful in 44s
k8s smoke test / test (push) Successful in 7s

This commit is contained in:
2026-02-13 11:55:19 -06:00
parent ba6edd455a
commit 6dc4d53ba0
3 changed files with 44 additions and 4 deletions
@@ -5,6 +5,7 @@ extends Area3D
@export_multiline var dialog_text := ""
@export var auto_popup := false
@export_enum("Every Entry", "Once") var auto_popup_mode := 0
@export var auto_popup_close_on_exit := false
var _has_triggered := false
@@ -24,9 +25,15 @@ func _on_body_entered(body: Node) -> void:
if not (target_group == StringName() or body.is_in_group(target_group)):
return
if auto_popup:
if DialogSystem and DialogSystem.has_method("is_dialog_open") and DialogSystem.is_dialog_open():
if not (DialogSystem.has_method("is_dialog_open_from") and DialogSystem.is_dialog_open_from(self)):
return
if auto_popup_mode == 1 and _has_triggered:
return
_has_triggered = true
if DialogSystem and auto_popup_close_on_exit and DialogSystem.has_method("show_text_from"):
DialogSystem.show_text_from(self, dialog_text)
return
if DialogSystem and DialogSystem.has_method("show_text"):
DialogSystem.show_text(dialog_text)
return
@@ -35,7 +42,15 @@ func _on_body_entered(body: Node) -> void:
func _on_body_exited(body: Node) -> void:
if not (target_group == StringName() or body.is_in_group(target_group)):
return
if auto_popup:
if auto_popup_close_on_exit and DialogSystem:
if DialogSystem.has_method("close_if_source"):
DialogSystem.close_if_source(self)
elif DialogSystem.has_method("close_if_text"):
DialogSystem.close_if_text(dialog_text)
return
return
if target_group == StringName() or body.is_in_group(target_group):
DialogSystem.unregister_interactable(self)