Fix(command_interface): Use comments to generate the help function

The generation part is yet to be done, but the comments itself are
supposed to be the way of documentation.
This commit is contained in:
Benedikt Peetz 2023-07-19 06:32:19 +02:00
parent fbd1672d03
commit 2a2c173683
Signed by: bpeetz
GPG Key ID: A5E94010C3A642AD
1 changed files with 10 additions and 2 deletions

View File

@ -22,22 +22,30 @@ use super::events::event_types::Event;
/// `String` and `()`). /// `String` and `()`).
#[turn_struct_to_ci_commands] #[turn_struct_to_ci_commands]
struct Commands { struct Commands {
/// Greets the user
greet: fn(usize) -> String, greet: fn(usize) -> String,
// Closes the application /// Closes the application
#[gen_default_lua_function] #[gen_default_lua_function]
exit: fn(), exit: fn(),
/// Shows the command line
#[gen_default_lua_function] #[gen_default_lua_function]
command_line_show: fn(), command_line_show: fn(),
/// Hides the command line
#[gen_default_lua_function] #[gen_default_lua_function]
command_line_hide: fn(), command_line_hide: fn(),
/// Go to the next plane
#[gen_default_lua_function] #[gen_default_lua_function]
cycle_planes: fn(), cycle_planes: fn(),
/// Go to the previous plane
#[gen_default_lua_function] #[gen_default_lua_function]
cycle_planes_rev: fn(), cycle_planes_rev: fn(),
//// sends a message to the current room /// Send a message to the current room
/// The send message is interpreted literally.
room_message_send: fn(String) -> String, room_message_send: fn(String) -> String,
} }