From 2a2c173683b4992942cb7dfdf40ca159fd1445c0 Mon Sep 17 00:00:00 2001 From: Soispha Date: Wed, 19 Jul 2023 06:32:19 +0200 Subject: [PATCH] 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. --- src/app/command_interface.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/command_interface.rs b/src/app/command_interface.rs index 4ed0eba..1f4b9bc 100644 --- a/src/app/command_interface.rs +++ b/src/app/command_interface.rs @@ -22,22 +22,30 @@ use super::events::event_types::Event; /// `String` and `()`). #[turn_struct_to_ci_commands] struct Commands { + /// Greets the user greet: fn(usize) -> String, - // Closes the application + /// Closes the application #[gen_default_lua_function] exit: fn(), + + /// Shows the command line #[gen_default_lua_function] command_line_show: fn(), + + /// Hides the command line #[gen_default_lua_function] command_line_hide: fn(), + /// Go to the next plane #[gen_default_lua_function] cycle_planes: fn(), + /// Go to the previous plane #[gen_default_lua_function] 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, }