Bug markers now have their info properly set when first created.

This commit is contained in:
Jamie Greunbaum
2024-05-28 18:39:58 -04:00
parent 58bc591405
commit 27b5d593f6
3 changed files with 93 additions and 75 deletions
+4 -3
View File
@@ -386,13 +386,14 @@ func __bug_report_form_data_prepared(tag_lists:Array) -> void:
__bug_report_form.fill_tags(tag_lists)
__bug_report_form.submitted.connect(__form_submitted)
__bug_report_form.cancelled.connect(__form_cancelled)
func __form_submitted(map_name:String, bug_position:Vector3, bug_normal:Vector3) -> void:
func __form_submitted(bug:BugbotBugData) -> void:
__get_bug_marker_root(get_tree().current_scene)
var marker : BugMarker = (load(bug_marker) as PackedScene).instantiate() as BugMarker
__bug_marker_root.add_child(marker)
marker.global_position = bug_position
marker.set_rotation_to_normal(bug_normal)
marker.global_position = bug.marker_position
marker.set_rotation_to_normal(bug.marker_normal)
marker.marker_status = BugMarker.BugStatus.UNRESOLVED
marker.bug_info = bug
__form_cancelled()
func __form_cancelled() -> void:
__bug_report_form.queue_free()