2023-03-22 10:20:47 +00:00
|
|
|
use mlua::prelude::*;
|
|
|
|
|
|
|
|
use crate::shared::classes::add_class_restricted_method;
|
|
|
|
|
|
|
|
use super::Instance;
|
|
|
|
|
2023-03-22 10:29:11 +00:00
|
|
|
pub const CLASS_NAME: &str = "DataModel";
|
|
|
|
|
2023-03-22 10:20:47 +00:00
|
|
|
pub fn add_methods<'lua, M: LuaUserDataMethods<'lua, Instance>>(methods: &mut M) {
|
|
|
|
add_class_restricted_method(
|
|
|
|
methods,
|
2023-03-22 10:29:11 +00:00
|
|
|
CLASS_NAME,
|
2023-03-22 10:20:47 +00:00
|
|
|
"GetService",
|
|
|
|
|_, _, _service_name: String| Ok(()),
|
|
|
|
);
|
|
|
|
add_class_restricted_method(
|
|
|
|
methods,
|
2023-03-22 10:29:11 +00:00
|
|
|
CLASS_NAME,
|
2023-03-22 10:20:47 +00:00
|
|
|
"FindService",
|
|
|
|
|_, _, _service_name: String| Ok(()),
|
|
|
|
);
|
|
|
|
}
|