Skip to content

Commit

Permalink
Update arcdps bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Zerthox committed Dec 14, 2023
1 parent 8de09f9 commit c5b491d
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 70 deletions.
89 changes: 54 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "arcdps_buddy"
version = "0.6.1"
version = "0.6.2"
edition = "2021"
authors = ["Zerthox"]
repository = "https://github.com/zerthox/arcdps-buddy"

[dependencies]
arc_util = { git = "https://github.com/zerthox/arcdps-utils", features = ["serde", "settings", "update"] }
arcdps = { git = "https://github.com/zerthox/arcdps-bindings", features = ["log", "serde", "strum", "unwind"] }
arcdps = { git = "https://github.com/zerthox/arcdps-rs", features = ["log", "serde", "strum", "unwind"] }
log = { version = "0.4.18", features = ["release_max_level_info"] }
num_enum = "0.7.1"
once_cell = "1.17.2"
Expand Down
4 changes: 2 additions & 2 deletions src/combat/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ impl Target {
}
}

impl From<&Agent<'_>> for Target {
impl From<&Agent> for Target {
fn from(agent: &Agent) -> Self {
let kind = agent.kind();
let name = match agent.name {
let name = match agent.name() {
Some(name) if !name.is_empty() => name.into(),
_ => match kind {
AgentKind::Player => format!("Player:{}", agent.id),
Expand Down
2 changes: 1 addition & 1 deletion src/combat/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub struct Hit {
pub target: u32,
}

impl From<&Agent<'_>> for Hit {
impl From<&Agent> for Hit {
fn from(target: &Agent) -> Self {
Self {
target: match target.kind() {
Expand Down
2 changes: 1 addition & 1 deletion src/history/fight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl<T> Fight<T> {
if species > 2 {
self.target = Some(species);
self.name = agent
.and_then(|agent| agent.name)
.and_then(|agent| agent.name())
.filter(|name| !name.is_empty())
.map(Into::into);
} else {
Expand Down
Loading

0 comments on commit c5b491d

Please sign in to comment.