Fully add a lua api #11

Merged
antifallobst merged 19 commits from commands into master 2023-07-21 18:57:04 +00:00
1 changed files with 10 additions and 2 deletions
Showing only changes of commit 2a2c173683 - Show all commits

View File

@ -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,
}