zenyx-engine/engine/src/core/repl/mod.rs
Cazdotsys dba07c4adf
polish repl (#17)
* add less daunting panic message on release builds
2024-12-21 14:35:55 -05:00

23 lines
585 B
Rust

use commands::{ClearCommand, CounterCommand, ExecFile, ExitCommand, HelpCommand, PanicCommmand};
use handler::{COMMAND_MANAGER, Category};
use crate::commands;
pub mod commands;
pub mod handler;
pub mod input;
pub fn setup() {
commands!(
HelpCommand,
ClearCommand,
ExitCommand,
CounterCommand,
PanicCommmand
);
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());
}