@@ -4,29 +4,31 @@ var list_command_executer: Interaction
44var enter_man_command : Interaction
55
66func _init ():
7- list_command_executer = Interaction .new ()
8- list_command_executer .from_raw ("execute" , "list_commands" )
9-
10- enter_man_command = Interaction .new ()
11- enter_man_command .from_raw ("enter" , "man" )
7+ list_command_executer = Interaction .new ()
8+ list_command_executer .from_raw ("execute" , "list_commands" )
9+
10+ enter_man_command = Interaction .new ()
11+ enter_man_command .from_raw ("enter" , "man" )
1212
1313func create_command () -> Command :
14- var command = Command .new ("help" , _get_help , [], "Get help for this console" )
15- return command
14+ var command = Command .new ("help" , _get_help , [], "Get help for this console" )
15+ return command
1616
1717func _get_help () -> String :
18- var config = Console .get_plugin_config ()
19- var section = config .get_sections ()[0 ]
20- var addon_name = config .get_value (section , "name" )
21- var author_name = config .get_value (section , "author" )
22- var version = config .get_value (section , "version" )
23- var return_data = "[center][b]%s [/b] by %s [/center]\n " % [addon_name , author_name ] \
24- + "[center]%s [/center]\n " % version \
25- + _get_description () \
26- + "[center][url=%s ]List commands[/url][/center]" % list_command_executer .get_as_string ()
27- return return_data
18+ var information = Console .get_console_information ()
19+
20+ var addon_name = information .get_or_add ("name" , "UNKNOWN KEY: name" )
21+ var author_list = information .get_or_add ("authors" , "UNKNOWN KEY: author" )
22+ var version = information .get_or_add ("version" , "UNKNOWN KEY: version" )
23+
24+ var return_data = "[center][b][font_size=20]%s [/font_size][/b][/center]" % addon_name \
25+ + "[center][font_size=10]by %s [/font_size][/center]\n " % author_list \
26+ + "[center][font_size=10]Version: %s [/font_size][/center]\n " % version \
27+ + _get_description () \
28+ + "[center][url=%s ]List commands[/url][/center]" % list_command_executer .get_as_string ()
29+ return return_data
2830
2931func _get_description () -> String :
30- return "[center]This addon does allow you to run built in or custom commands for your game.\n " \
31- + " If you need help run the [url=%s ]man[/url] command followed by the command you need help with.\n " % enter_man_command .get_as_string () \
32- + " Also if text is underlined you might be able to click it, test the \" [u]List Commands[/u]\" below [/center]\n\n "
32+ return "\n [p] [center]This addon does allow you to run built in or custom commands for your game.\n " \
33+ + " If you need help run the [url=%s ]man[/url] command followed by the command you need help with.\n " % enter_man_command .get_as_string () \
34+ + " Also if text is underlined you might be able to click it, test the \" [u]List Commands[/u]\" below [/center][/p ]\n\n "
0 commit comments