Skip to content

Commit 5e53673

Browse files
committed
Some warnings added
Everyone needs to know what (in the name of ducks) is doing wrong
1 parent f27cd3b commit 5e53673

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

addons/dialog_plugin/Nodes/dialogue_base_node/dialogue_base_node.gd

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ var next_input = 'ui_accept'
1919
onready var DialogNode := get_node_or_null(DialogNode_path)
2020
onready var PortraitManager := get_node_or_null(PortraitsNode_path)
2121

22+
func _ready() -> void:
23+
if not Engine.editor_hint:
24+
# FIXME: You should handle this warning elsewhere
25+
push_warning("[Dialogic] "+DialogUtil.Error.DIALOGNODE_IS_NOT_CHILD_OF_CANVASLAYER)
26+
2227

2328
func _input(event: InputEvent) -> void:
2429
if not next_input:
@@ -30,6 +35,8 @@ func _input(event: InputEvent) -> void:
3035

3136

3237
func start_timeline() -> void:
38+
if Engine.editor_hint:
39+
return
3340
_verify_timeline()
3441
timeline.start(self)
3542

@@ -50,6 +57,8 @@ func _verify_timeline() -> void:
5057

5158

5259
func _set_nodes_default_values() -> void:
60+
if Engine.editor_hint:
61+
return
5362
visible = false
5463
if DialogNode:
5564
DialogNode.visible = false
@@ -59,6 +68,12 @@ func _set_nodes_default_values() -> void:
5968
PortraitManager.visible = false
6069

6170

71+
func _get_configuration_warning() -> String:
72+
# FIXME: WHAT KIND OF ABOMINATION IS THIS IF STATEMENT?!
73+
if (get_parent() is CanvasLayer) or (get_parent() is Control):
74+
return ""
75+
return DialogUtil.Error.DIALOGNODE_IS_NOT_CHILD_OF_CANVASLAYER
76+
6277
func _on_event_start(_event):
6378
event_finished = false
6479
if DialogNode:

addons/dialog_plugin/Nodes/ingame_dialogue_box/ingame_dialogue_node.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
tool
12
extends DialogBaseNode
23

34
# This does nothing special. It's just a placeholder.

addons/dialog_plugin/Nodes/ingame_dialogue_box/ingame_dialogue_node.tscn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ resource_local_to_scene = true
99
size = 20
1010
font_data = ExtResource( 3 )
1111

12-
[node name="IngameNode" instance=ExtResource( 1 )]
12+
[node name="TextBox" instance=ExtResource( 1 )]
1313
script = ExtResource( 2 )
1414
DialogNode_path = NodePath("DialogNode")
1515
PortraitsNode_path = NodePath("Portraits")

0 commit comments

Comments
 (0)