zenyx-engine/engine/src/core/repl/mod.rs

29 lines
641 B
Rust
Raw Normal View History

2024-12-21 16:28:32 -05:00
use commands::{
ClearCommand, CounterCommand, ExecFile, ExitCommand, HelpCommand, PanicCommmand
2024-12-21 16:28:32 -05:00
};
use handler::{COMMAND_MANAGER, Category};
use zlua::ZLua;
use crate::commands;
pub mod commands;
pub mod handler;
pub mod input;
pub mod zlua;
2024-12-06 11:19:12 -05:00
pub fn setup() {
commands!(
HelpCommand,
ClearCommand,
ExitCommand,
CounterCommand,
2024-12-21 16:28:32 -05:00
PanicCommmand,
zlua::ZLua
);
let cat = Category::new("cr", "Core", "Core commands");
COMMAND_MANAGER.write().add_category(cat.clone());
COMMAND_MANAGER
.write()
.add_command_with_category(Box::new(ExecFile), cat.clone());
}