refactor: style and micro performance improvements

This commit is contained in:
2025-02-28 22:32:40 -05:00
parent 3e74399e5b
commit bf9891247f
2 changed files with 8 additions and 7 deletions

View File

@@ -46,12 +46,11 @@ async fn main() -> anyhow::Result<()> {
console_subscriber::init();
let args = arguments::Arguments::parse();
let script_path = args.script.unwrap_or(PathBuf::from(DEFAULT_SCRIPT_PATH));
let event_listeners = Arc::new(RwLock::new(HashMap::new()));
let lua = Lua::new();
let globals = lua.globals();
globals.set("script_path", &*script_path)?;
lua::register_functions(&lua, &globals, event_listeners.clone())?;
lua.load(