refactor: rename a few things
This commit is contained in:
parent
93348835ac
commit
2373d6500e
@ -9,7 +9,7 @@ for _, module in
|
||||
"utils",
|
||||
}
|
||||
do
|
||||
module = "lua/" .. module
|
||||
module = "lib/" .. module
|
||||
package.loaded[module] = nil
|
||||
require(module)
|
||||
end
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
State,
|
||||
scripting::{eval, exec, reload},
|
||||
lua::{eval, exec, reload},
|
||||
};
|
||||
use azalea::{
|
||||
GameProfileComponent, brigadier::prelude::*, chat::ChatPacket, entity::metadata::Player,
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::{State, commands::CommandSource, http::serve, scripting};
|
||||
use crate::{State, commands::CommandSource, http::serve, lua};
|
||||
use azalea::prelude::*;
|
||||
use hyper::{server::conn::http1, service::service_fn};
|
||||
use hyper_util::rt::TokioIo;
|
||||
@ -53,7 +53,7 @@ pub async fn handle_event(client: Client, event: Event, state: State) -> anyhow:
|
||||
|
||||
globals.set(
|
||||
"client",
|
||||
scripting::client::Client {
|
||||
lua::client::Client {
|
||||
inner: Some(client),
|
||||
},
|
||||
)?;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
State,
|
||||
scripting::{eval, exec, reload},
|
||||
lua::{eval, exec, reload},
|
||||
};
|
||||
use http_body_util::{BodyExt, Empty, Full, combinators::BoxBody};
|
||||
use hyper::{Method, Request, Response, StatusCode, body::Bytes};
|
||||
|
@ -4,7 +4,7 @@ mod arguments;
|
||||
mod commands;
|
||||
mod events;
|
||||
mod http;
|
||||
mod scripting;
|
||||
mod lua;
|
||||
|
||||
use azalea::{brigadier::prelude::CommandDispatcher, prelude::*};
|
||||
use clap::Parser;
|
||||
@ -34,7 +34,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
let username = globals.get::<String>("USERNAME")?;
|
||||
|
||||
globals.set("script_path", script_path)?;
|
||||
scripting::register_functions(&lua, &globals)?;
|
||||
lua::register_functions(&lua, &globals)?;
|
||||
|
||||
let mut commands = CommandDispatcher::new();
|
||||
register(&mut commands);
|
||||
|
Loading…
x
Reference in New Issue
Block a user