diff --git a/Cargo.toml b/Cargo.toml index 68fc013..35f4c81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,13 +15,7 @@ cgmath = "0.17.0" lazy_static = "1.1" simple_logger = "1.0.1" threadpool = "1.0" -rhai = "0.9.0" +rhai = "0.19.8" smallvec = "0.6.5" - -[dependencies.conrod] -git = "https://github.com/Litecrafty/conrod" -features = ["glium", "winit"] - -[dependencies.glium] -git = "https://github.com/Litecrafty/glium" -features = ["icon_loading"] \ No newline at end of file +conrod = { git = "https://github.com/Litecrafty/conrod", features = ["glium", "winit"] } +glium = { git = "https://github.com/Litecrafty/glium", features = ["icon_loading"] } diff --git a/docs/README.md b/docs/README.md index 1ee5c66..1331db6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -29,7 +29,7 @@ - Clone the repository. - Download and install [Rust](https://rustup.rs/) nightly. - Open Minecraft 1.13 jar file using any zip extractor, and copy `assets/minecraft` to Litecraft `resources` folder, or use our Launcher in developer's mode. - - Build and run with `cargo run` + - Build and run with `cargo +nightly run` - Profit! # 🎉 F.A.Q diff --git a/src/core/camera/mod.rs b/src/core/camera/mod.rs index 7726f8e..ee554c5 100644 --- a/src/core/camera/mod.rs +++ b/src/core/camera/mod.rs @@ -15,7 +15,6 @@ use cgmath::prelude::*; use cgmath::{ortho, perspective, Deg, Euler, Matrix4, Point3, Quaternion, Vector3}; -use std::f32; const YAW: f32 = -90.0; const PITCH: f32 = 0.0; @@ -106,8 +105,6 @@ impl Camera { /// Get perspective matrix pub fn perspective(&self) -> Matrix4 { - use std::f32; - let zfar = 1024.0; let znear = 1.0; diff --git a/src/core/resource_manager/mod.rs b/src/core/resource_manager/mod.rs index 9a965dd..1e98972 100644 --- a/src/core/resource_manager/mod.rs +++ b/src/core/resource_manager/mod.rs @@ -85,7 +85,7 @@ impl ResourceManager { } /// Get and load a font file - pub fn font(resource: &Resource) -> Result> { + pub fn font(resource: &Resource) -> Result> { use conrod::text::FontCollection; info!("Loading font file '{}'", resource); diff --git a/src/core/resource_manager/resource.rs b/src/core/resource_manager/resource.rs index 18315b7..c0074b9 100644 --- a/src/core/resource_manager/resource.rs +++ b/src/core/resource_manager/resource.rs @@ -29,7 +29,7 @@ use std::io::{Error, ErrorKind}; use std::path::{Path, PathBuf}; use zip::read::ZipArchive; -type Result = std::result::Result>; +type Result = std::result::Result>; #[derive(PartialEq, Eq, Hash)] /// Represents a resource URI and allows loading resource data @@ -157,7 +157,7 @@ impl Resource { let mut zipfile = ZipArchive::new(zipfile)?; // Read resource from ZIP - let mut file = zipfile.by_name(&self.folder("assets")); + let file = zipfile.by_name(&self.folder("assets")); // If file exist in zip if let Ok(mut file) = file { diff --git a/src/core/resource_manager/shader_manager.rs b/src/core/resource_manager/shader_manager.rs index bfc8984..a113b7d 100644 --- a/src/core/resource_manager/shader_manager.rs +++ b/src/core/resource_manager/shader_manager.rs @@ -22,7 +22,7 @@ use glium::Program; use std::collections::HashMap; use std::error::Error; -type Result = std::result::Result>; +type Result = std::result::Result>; pub struct ShaderManager { shaders: HashMap<&'static str, Program>, diff --git a/src/gfx/canvas.rs b/src/gfx/canvas.rs index 48b62c8..21b310d 100644 --- a/src/gfx/canvas.rs +++ b/src/gfx/canvas.rs @@ -81,7 +81,7 @@ impl Canvas { let resource_manager = ResourceManager::new(&display, &settings); // Create default scene - let mut scene: Box = Box::new(LoadingScene::new()); + let mut scene: Box = Box::new(LoadingScene::new()); info!("Starting script engine!"); diff --git a/src/gfx/scene.rs b/src/gfx/scene.rs index ef91184..e0c2b71 100644 --- a/src/gfx/scene.rs +++ b/src/gfx/scene.rs @@ -18,7 +18,7 @@ use glium::Frame; pub enum SceneAction { None, - ChangeScene(Box), + ChangeScene(Box), Quit, } diff --git a/src/gfx/shapes.rs b/src/gfx/shapes.rs index 5f65764..273ca68 100644 --- a/src/gfx/shapes.rs +++ b/src/gfx/shapes.rs @@ -42,7 +42,7 @@ pub struct Shapes { } impl Shapes { - pub fn new(display: &Display) -> Result> { + pub fn new(display: &Display) -> Result> { Ok(Shapes { quad: { (