Merge branch 'main' into renovate/openvr-0.x
This commit is contained in:
commit
208a1d34b6
15 changed files with 29 additions and 17 deletions
|
@ -14,7 +14,7 @@ chrono = { version = "0.4.35", features = ["serde"] }
|
||||||
anyhow = { version = "1.0.86", features = ["backtrace"] }
|
anyhow = { version = "1.0.86", features = ["backtrace"] }
|
||||||
indexmap = { version = "2.2.6", features = ["rayon"] }
|
indexmap = { version = "2.2.6", features = ["rayon"] }
|
||||||
shaderc = { version = "0.8.3", features = ["build-from-source"] }
|
shaderc = { version = "0.8.3", features = ["build-from-source"] }
|
||||||
rusqlite = { version = "0.32.0", features = ["bundled"] }
|
rusqlite = { version = "0.33.0", features = ["bundled"] }
|
||||||
cgmath = "0.18.0"
|
cgmath = "0.18.0"
|
||||||
http = "1.1.0"
|
http = "1.1.0"
|
||||||
iterchunks = "0.5.0"
|
iterchunks = "0.5.0"
|
||||||
|
@ -36,7 +36,7 @@ sdl2 = { version = "0.37.0" }
|
||||||
syn = { version = "2.0.67", features = ["extra-traits", "full"] }
|
syn = { version = "2.0.67", features = ["extra-traits", "full"] }
|
||||||
quote = "1.0.35"
|
quote = "1.0.35"
|
||||||
proc-macro2 = "1.0.86"
|
proc-macro2 = "1.0.86"
|
||||||
downcast-rs = "1.2.1"
|
downcast-rs = "2.0.0"
|
||||||
|
|
||||||
utilities = { git = "https://gavania.de/hodasemi/utilities.git" }
|
utilities = { git = "https://gavania.de/hodasemi/utilities.git" }
|
||||||
vulkan-rs = { git = "https://gavania.de/hodasemi/vulkan_lib.git" }
|
vulkan-rs = { git = "https://gavania.de/hodasemi/vulkan_lib.git" }
|
||||||
|
|
|
@ -6,7 +6,7 @@ mod page_content;
|
||||||
mod traits;
|
mod traits;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use downcast_rs::{impl_downcast, Downcast};
|
use downcast_rs::{Downcast, impl_downcast};
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
use rpg_components::{
|
use rpg_components::{
|
||||||
components::{
|
components::{
|
||||||
|
@ -21,8 +21,8 @@ use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
ops::{Deref, DerefMut},
|
ops::{Deref, DerefMut},
|
||||||
sync::{
|
sync::{
|
||||||
atomic::{AtomicUsize, Ordering::SeqCst},
|
|
||||||
Arc, Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard,
|
Arc, Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard,
|
||||||
|
atomic::{AtomicUsize, Ordering::SeqCst},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,19 +125,19 @@ pub struct CharacterWindow {
|
||||||
|
|
||||||
tabs: RwLock<[Box<dyn Page>; 3]>,
|
tabs: RwLock<[Box<dyn Page>; 3]>,
|
||||||
tab: AtomicUsize,
|
tab: AtomicUsize,
|
||||||
|
|
||||||
engine: Arc<Engine>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CharacterWindow {
|
impl CharacterWindow {
|
||||||
pub fn new<A: Ability + 'static>(
|
pub fn new<A: Ability + 'static>(
|
||||||
engine: Arc<Engine>,
|
world: &World,
|
||||||
hero: Entity,
|
hero: Entity,
|
||||||
name: &str,
|
name: &str,
|
||||||
close: Box<dyn FutureStateChange>,
|
close: Box<dyn FutureStateChange>,
|
||||||
) -> Result<Arc<Self>> {
|
) -> Result<Arc<Self>> {
|
||||||
let menu_gui =
|
let menu_gui = GuiBuilder::from_str(
|
||||||
GuiBuilder::from_str(engine.gui_handler(), include_str!("../resources/menu.xml"))?;
|
world.resources.get::<Arc<GuiHandler>>(),
|
||||||
|
include_str!("../resources/menu.xml"),
|
||||||
|
)?;
|
||||||
|
|
||||||
let content_grid = menu_gui.element("tab_content")?;
|
let content_grid = menu_gui.element("tab_content")?;
|
||||||
let open_character_page: Arc<Button> = menu_gui.element("open_statistics")?;
|
let open_character_page: Arc<Button> = menu_gui.element("open_statistics")?;
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
use anyhow::bail;
|
use anyhow::bail;
|
||||||
use engine::prelude::{image::RgbaImage, *};
|
use engine::prelude::{image::RgbaImage, *};
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use std::{cmp::Ordering, slice::Iter, str::FromStr};
|
use std::{cmp::Ordering, slice::Iter, str::FromStr};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config::attributes::{AttributeColorSettings, StartingAttributes},
|
config::attributes::{AttributeColorSettings, StartingAttributes},
|
||||||
items::{ability_book::Ability, ItemSystem},
|
items::{ItemSystem, ability_book::Ability},
|
||||||
};
|
};
|
||||||
|
|
||||||
generate_stat!(Agility, u32, "Agility");
|
generate_stat!(Agility, u32, "Agility");
|
||||||
|
|
|
@ -2,6 +2,7 @@ use std::time::Duration;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use super::statistics::*;
|
use super::statistics::*;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
|
||||||
use paste::paste;
|
use paste::paste;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::{config::save_game::SaveGame, items::Rarities};
|
use crate::{config::save_game::SaveGame, items::Rarities};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
@ -540,7 +541,7 @@ impl std::str::FromStr for StatisticType {
|
||||||
return Err(anyhow::Error::msg(format!(
|
return Err(anyhow::Error::msg(format!(
|
||||||
"Failed parsing StatisticTypes from {}",
|
"Failed parsing StatisticTypes from {}",
|
||||||
s
|
s
|
||||||
)))
|
)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config::{
|
config::{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
use assetpath::AssetPath;
|
use assetpath::AssetPath;
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
create_settings_section!(
|
create_settings_section!(
|
||||||
AbilityIcons,
|
AbilityIcons,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::components::npc_type::NPCType;
|
use crate::components::npc_type::NPCType;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
|
|
||||||
|
@ -31,7 +32,7 @@ impl std::str::FromStr for DamageType {
|
||||||
return Err(anyhow::Error::msg(format!(
|
return Err(anyhow::Error::msg(format!(
|
||||||
"Failed parsing DamageType from {}",
|
"Failed parsing DamageType from {}",
|
||||||
s
|
s
|
||||||
)))
|
)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assetpath::AssetPath;
|
use assetpath::AssetPath;
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
fmt,
|
fmt,
|
||||||
|
|
|
@ -2,6 +2,7 @@ use anyhow::Result;
|
||||||
use assetpath::AssetPath;
|
use assetpath::AssetPath;
|
||||||
use cgmath::{Vector2, Vector3};
|
use cgmath::{Vector2, Vector3};
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use std::{fmt::Debug, str::FromStr, sync::Arc, time::Duration};
|
use std::{fmt::Debug, str::FromStr, sync::Arc, time::Duration};
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ use crate::{
|
||||||
config::items::ItemSettings,
|
config::items::ItemSettings,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{ability_book::Ability, ItemSlots, ItemSystem, Jewel, Rarities, Tooltip};
|
use super::{ItemSlots, ItemSystem, Jewel, Rarities, Tooltip, ability_book::Ability};
|
||||||
|
|
||||||
const ITEM_SNIPPETS: [&'static str; 8] = [
|
const ITEM_SNIPPETS: [&'static str; 8] = [
|
||||||
include_str!("../../resources/items/slots_0.xml"),
|
include_str!("../../resources/items/slots_0.xml"),
|
||||||
|
@ -314,7 +314,7 @@ impl Item {
|
||||||
None => {
|
None => {
|
||||||
socket_icon.set_icon(
|
socket_icon.set_icon(
|
||||||
&Image::from_slice(include_bytes!("../../resources/circle.png"))?
|
&Image::from_slice(include_bytes!("../../resources/circle.png"))?
|
||||||
.attach_sampler(Sampler::pretty_sampler().build(gui_handler.device())?)
|
.attach_pretty_sampler(gui_handler.device())?
|
||||||
.build(gui_handler.device(), gui_handler.queue())?,
|
.build(gui_handler.device(), gui_handler.queue())?,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assetpath::AssetPath;
|
use assetpath::AssetPath;
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use std::{fmt, slice::Iter};
|
use std::{fmt, slice::Iter};
|
||||||
|
|
||||||
|
@ -91,7 +92,7 @@ impl std::str::FromStr for ItemSlots {
|
||||||
return Err(anyhow::Error::msg(format!(
|
return Err(anyhow::Error::msg(format!(
|
||||||
"Failed parsing ItemSlots from {}",
|
"Failed parsing ItemSlots from {}",
|
||||||
s
|
s
|
||||||
)))
|
)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,13 @@ use anyhow::Result;
|
||||||
use engine::prelude::*;
|
use engine::prelude::*;
|
||||||
|
|
||||||
use image::RgbaImage;
|
use image::RgbaImage;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use std::{fmt, slice::Iter};
|
use std::{fmt, slice::Iter};
|
||||||
|
|
||||||
use crate::config::items::{ItemSettings, RarityColorSettings};
|
use crate::config::items::{ItemSettings, RarityColorSettings};
|
||||||
|
|
||||||
use super::{ability_book::Ability, ItemSystem};
|
use super::{ItemSystem, ability_book::Ability};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
pub enum Rarities {
|
pub enum Rarities {
|
||||||
|
@ -114,7 +115,7 @@ impl std::str::FromStr for Rarities {
|
||||||
return Err(anyhow::Error::msg(format!(
|
return Err(anyhow::Error::msg(format!(
|
||||||
"Failed parsing Rarities from {}",
|
"Failed parsing Rarities from {}",
|
||||||
s
|
s
|
||||||
)))
|
)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue