Add debug output and disabled item check for validation
This commit is contained in:
@@ -205,10 +205,22 @@ func _validate_selection() -> void:
|
|||||||
status_label.text = "Please select an arrival point"
|
status_label.text = "Please select an arrival point"
|
||||||
return
|
return
|
||||||
|
|
||||||
var arrival_data = arrival_list.get_item_metadata(arrival_idx[0])
|
# Check if the selected arrival item is disabled (e.g., "No TransitionPieces found")
|
||||||
if arrival_data == null or typeof(arrival_data) != TYPE_DICTIONARY:
|
if arrival_list.is_item_disabled(arrival_idx[0]):
|
||||||
apply_button.disabled = true
|
apply_button.disabled = true
|
||||||
status_label.text = "Invalid arrival point selected"
|
status_label.text = "Please select a valid arrival point"
|
||||||
|
return
|
||||||
|
|
||||||
|
var arrival_data = arrival_list.get_item_metadata(arrival_idx[0])
|
||||||
|
print("DEBUG: arrival_data = ", arrival_data, " type = ", typeof(arrival_data))
|
||||||
|
if arrival_data == null:
|
||||||
|
apply_button.disabled = true
|
||||||
|
status_label.text = "No arrival point data (null)"
|
||||||
|
return
|
||||||
|
|
||||||
|
if typeof(arrival_data) != TYPE_DICTIONARY:
|
||||||
|
apply_button.disabled = true
|
||||||
|
status_label.text = "Invalid arrival point data type: " + str(typeof(arrival_data))
|
||||||
return
|
return
|
||||||
|
|
||||||
apply_button.disabled = false
|
apply_button.disabled = false
|
||||||
|
|||||||
Reference in New Issue
Block a user