refactor: rename a few things

This commit is contained in:
Ryan 2025-02-17 11:53:24 -05:00
parent 93348835ac
commit 2373d6500e
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3
21 changed files with 7 additions and 7 deletions

View File

@ -9,7 +9,7 @@ for _, module in
"utils",
}
do
module = "lua/" .. module
module = "lib/" .. module
package.loaded[module] = nil
require(module)
end

View File

@ -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,

View File

@ -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),
},
)?;

View File

@ -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};

View File

@ -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);