Skip to content

Commit

Permalink
Support static methods as commands
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed Sep 11, 2024
1 parent 112dc69 commit adddd92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util.gd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ static func bbcode_strip(p_text: String) -> String:
static func get_method_info(p_callable: Callable) -> Dictionary:
var method_info: Dictionary
var method_list: Array[Dictionary]
method_list = p_callable.get_object().get_method_list()
if p_callable.get_object() is GDScript:
method_list = p_callable.get_object().get_script_method_list()
else:
method_list = p_callable.get_object().get_method_list()
for m in method_list:
if m.name == p_callable.get_method():
method_info = m
Expand Down

0 comments on commit adddd92

Please sign in to comment.