From 54164c517b71c6ca4b3327cdd96eeb57b591d56a Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Wed, 15 Oct 2025 02:09:28 +0200 Subject: [PATCH] feat: Remove automatic automation: module prefix Instead the prefix should be manually specified if it is desired. --- automation_devices/src/lib.rs | 2 +- automation_lib/src/lib.rs | 2 +- automation_lib/src/lua/utils/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automation_devices/src/lib.rs b/automation_devices/src/lib.rs index aec4265..0e5838c 100644 --- a/automation_devices/src/lib.rs +++ b/automation_devices/src/lib.rs @@ -71,7 +71,7 @@ pub fn create_module(lua: &mlua::Lua) -> mlua::Result { Ok(devices) } -inventory::submit! {Module::new("devices", create_module)} +inventory::submit! {Module::new("automation:devices", create_module)} macro_rules! register_type { ($ty:ty) => { diff --git a/automation_lib/src/lib.rs b/automation_lib/src/lib.rs index 1cfedb4..3fa87e8 100644 --- a/automation_lib/src/lib.rs +++ b/automation_lib/src/lib.rs @@ -41,7 +41,7 @@ pub fn load_modules(lua: &mlua::Lua) -> mlua::Result<()> { for module in inventory::iter:: { debug!(name = module.get_name(), "Loading module"); let table = module.register(lua)?; - lua.register_module(&format!("automation:{}", module.get_name()), table)?; + lua.register_module(module.get_name(), table)?; } Ok(()) diff --git a/automation_lib/src/lua/utils/mod.rs b/automation_lib/src/lua/utils/mod.rs index 45f06b8..2fc67d2 100644 --- a/automation_lib/src/lua/utils/mod.rs +++ b/automation_lib/src/lua/utils/mod.rs @@ -28,4 +28,4 @@ fn create_module(lua: &mlua::Lua) -> mlua::Result { Ok(utils) } -inventory::submit! {Module::new("utils", create_module)} +inventory::submit! {Module::new("automation:utils", create_module)}