diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 88ca056a93..7c8dfb6d93 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -20,6 +20,18 @@ body: validations: required: false + - type: input + id: resolution + attributes: + label: Game resolution + placeholder: e.g. 1920x1080 + description: > + If you report a problem from within the game, this will have been filled automatically with the current resolution. + + You can change this if you are reporting a problem you saw in a different resolution. + validations: + required: false + - type: input id: scene attributes: @@ -35,6 +47,19 @@ body: validations: required: false + - type: input + id: location + attributes: + label: Player location (X,Y) + placeholder: e.g. 0,0 + description: > + Provide the player's coordinates in the format `X,Y` (integers only, no spaces). If reporting from within the game, + this will have been filled automatically with the player's current location. + + Leave blank if location is irrelevant to the issue. + validations: + required: false + - type: textarea id: about attributes: diff --git a/scenes/globals/pause/report_bug_button.gd b/scenes/globals/pause/report_bug_button.gd index 6b1d4c5f36..fe0b406ccb 100644 --- a/scenes/globals/pause/report_bug_button.gd +++ b/scenes/globals/pause/report_bug_button.gd @@ -22,4 +22,18 @@ func _on_pressed() -> void: if current_scene: url += "&scene=" + current_scene.scene_file_path.uri_encode() + var game_resolution := DisplayServer.window_get_size() + if game_resolution: + url += "&resolution=" + ("%sx%s" % [game_resolution.x, game_resolution.y]) + + var player := get_tree().get_first_node_in_group("player") + if player: + url += ( + "&location=" + + ( + ("%s,%s" % [player.get_global_position().x, player.get_global_position().y]) + . uri_encode() + ) + ) + OS.shell_open(url)