Skip to content

Commit

Permalink
Adding support for Iron Banner Fortress
Browse files Browse the repository at this point in the history
  • Loading branch information
mikechambers committed Jan 26, 2024
1 parent c2e1af6 commit abf6b13
Show file tree
Hide file tree
Showing 22 changed files with 53 additions and 36 deletions.
4 changes: 4 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# dcli Release Notes

## v0.99.7 January 26, 2024

- Added support for Iron Banner Fortress (iron_banner_fortress)

## v0.99.6 December 5,2023

- Added support for Iron Banner Tribute (iron_banner_tribute)
Expand Down
18 changes: 9 additions & 9 deletions src/Cargo.lock

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

2 changes: 1 addition & 1 deletion src/dcli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dcli"
#version
version = "0.99.6"
version = "0.99.7"
authors = ["Mike Chambers <[email protected]>"]
edition = "2018"
description = "Library for the dcli collection of command line tools for Destiny 2."
Expand Down
9 changes: 8 additions & 1 deletion src/dcli/src/activitystoreinterface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use crate::utils::{
CHECKMATE_CONTROL_ACTIVITY_HASHES, CHECKMATE_COUNTDOWN_ACTIVITY_HASH,
CHECKMATE_RUMBLE_ACTIVITY_HASH, CHECKMATE_SURVIVAL_ACTIVITY_HASH,
COMPETITIVE_PVP_ACTIVITY_HASH, FREELANCE_COMPETITIVE_PVP_ACTIVITY_HASH,
IRON_BANNER_TRIBUTE_ACTIVITY_HASH,
IRON_BANNER_FORTRESS_ACTIVITY_HASH, IRON_BANNER_TRIBUTE_ACTIVITY_HASH,
};
use crate::{
crucible::{CrucibleActivity, Member, PlayerName, Team},
Expand Down Expand Up @@ -996,6 +996,13 @@ impl ActivityStoreInterface {
self.remove_from_modes(activity, Mode::IronBannerSupremacy);
}

if activity.activity_details.director_activity_hash
== IRON_BANNER_FORTRESS_ACTIVITY_HASH
{
self.set_mode(activity, Mode::IronBannerFortress);
self.remove_from_modes(activity, Mode::IronBannerZoneControl);
}

//add support for checkmate (adding modes)

if CHECKMATE_CONTROL_ACTIVITY_HASHES
Expand Down
5 changes: 5 additions & 0 deletions src/dcli/src/enums/mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ pub enum Mode {
CheckmateCountdown = 715,

IronBannerTribute = 800,
IronBannerFortress = 801,
}

impl Mode {
Expand Down Expand Up @@ -235,6 +236,7 @@ impl Mode {
714 => Ok(Mode::CheckmateClash),
715 => Ok(Mode::CheckmateCountdown),
800 => Ok(Mode::IronBannerTribute),
801 => Ok(Mode::IronBannerFortress),

_ => Err(Error::UnknownEnumValue),
}
Expand Down Expand Up @@ -318,6 +320,7 @@ impl Mode {
|| *self == Mode::CheckmateClash
|| *self == Mode::CheckmateCountdown
|| *self == Mode::IronBannerTribute
|| *self == Mode::IronBannerFortress
}

pub fn is_private(&self) -> bool {
Expand Down Expand Up @@ -439,6 +442,7 @@ impl FromStr for Mode {
"checkmate_clash" => Ok(Mode::CheckmateClash),
"checkmate_countdown" => Ok(Mode::CheckmateCountdown),
"iron_banner_tribute" => Ok(Mode::IronBannerTribute),
"iron_banner_fortress" => Ok(Mode::IronBannerFortress),

_ => Err("Unknown Mode type"),
}
Expand Down Expand Up @@ -545,6 +549,7 @@ impl fmt::Display for Mode {
Mode::CheckmateClash => "Checkmate Clash",
Mode::CheckmateCountdown => "Checkmate Countdown",
Mode::IronBannerTribute => "Iron Banner Tribute",
Mode::IronBannerFortress => "Iron Banner Fortress",
};

write!(f, "{}", out)
Expand Down
1 change: 1 addition & 0 deletions src/dcli/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub const CHECKMATE_COUNTDOWN_ACTIVITY_HASH: u32 = 2344293485;
pub const CHECKMATE_RUMBLE_ACTIVITY_HASH: u32 = 2461220411;

pub const IRON_BANNER_TRIBUTE_ACTIVITY_HASH: u32 = 2955009825;
pub const IRON_BANNER_FORTRESS_ACTIVITY_HASH: u32 = 2888503916;

pub const CHECKMATE_SURVIVAL_ACTIVITY_HASH: u32 = 3876264582;

Expand Down
2 changes: 1 addition & 1 deletion src/dclia/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dclia"
#version
version = "0.99.6"
version = "0.99.7"
authors = ["Mike Chambers <[email protected]>"]
description = "Command line tool for retrieving information on current activity for specified player character."
homepage = "https://www.mikechambers.com"
Expand Down
2 changes: 1 addition & 1 deletion src/dcliad/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dcliad"
#version
version = "0.99.6"
version = "0.99.7"
authors = ["Mike Chambers <[email protected]>"]
edition = "2018"
description = "Command line tool for viewing Destiny 2 activity details."
Expand Down
8 changes: 4 additions & 4 deletions src/dcliad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ OPTIONS:
Addition values available are crimsom_doubles, supremacy, survival, countdown, all_doubles, doubles,
private_clash, private_control, private_survival, private_rumble, showdown_competitive, survival_competitive, rift_competitive, showdown, lockdown, scorched, rift, iron_banner_rift, zone_control, iron_banner_zone_control
scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute [default: all_pvp]
scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute, iron_banner_fortress [default: all_pvp]
-n, --name <name>
Bungie name for player
Expand All @@ -77,9 +77,9 @@ OPTIONS:
The number of weapons to display details for [default: 5]
```

| ARGUMENT | OPTIONS |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| --mode | all_pvp (default), control, clash, elimination, mayhem, iron_banner, all_private, rumble, pvp_competitive, quickplay and trials_of_osiris, crimsom_doubles, supremacy, survival, countdown, all_doubles, doubles private_clash, private_control, private_survival, private_rumble, showdown_competitive, survival_competitive, rift_competitive, showdown, lockdown, scorched, rift, iron_banner_rift, zone_control, iron_banner_zone_control, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute |
| ARGUMENT | OPTIONS |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| --mode | all_pvp (default), control, clash, elimination, mayhem, iron_banner, all_private, rumble, pvp_competitive, quickplay and trials_of_osiris, crimsom_doubles, supremacy, survival, countdown, all_doubles, doubles private_clash, private_control, private_survival, private_rumble, showdown_competitive, survival_competitive, rift_competitive, showdown, lockdown, scorched, rift, iron_banner_rift, zone_control, iron_banner_zone_control, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute, iron_banner_fortress |

Manifest can be downloaded and synced with from [dclim](https://github.com/mikechambers/dcli/tree/main/src/dclim).

Expand Down
2 changes: 1 addition & 1 deletion src/dcliad/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ struct Opt {
/// private_survival, private_rumble, showdown_competitive, survival_competitive,
/// rift_competitive, showdown, lockdown, iron_banner_rift,
/// zone_control, iron_banner_zone_control, rift,
/// scorched, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute
/// scorched, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute, iron_banner_fortress
#[structopt(long = "mode", short = "M",
parse(try_from_str=parse_and_validate_mode), default_value = "all_pvp")]
mode: Mode,
Expand Down
2 changes: 1 addition & 1 deletion src/dcliah/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dcliah"
#version
version = "0.99.6"
version = "0.99.7"
authors = ["Mike Chambers <[email protected]>"]
edition = "2018"
description = "Command line tool for viewing Destiny 2 activity history."
Expand Down
2 changes: 1 addition & 1 deletion src/dcliah/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ OPTIONS:
rumble, pvp_competitive, quickplay and trials_of_osiris.
Addition values available are crimsom_doubles, supremacy, survival, countdown, all_doubles, doubles,
private_clash, private_control, private_survival, private_rumble, showdown_competitive, survival_competitive, rift_competitive, showdown, lockdown, scorched, rift, iron_banner_rift,zone_control, iron_banner_zone_control, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute [default: all_pvp]
private_clash, private_control, private_survival, private_rumble, showdown_competitive, survival_competitive, rift_competitive, showdown, lockdown, scorched, rift, iron_banner_rift,zone_control, iron_banner_zone_control, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute, iron_banner_fortress [default: all_pvp]
-T, --moment <moment>
Start moment from which to pull activities from
Expand Down
2 changes: 1 addition & 1 deletion src/dcliah/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ struct Opt {
/// private_survival, private_rumble, showdown_competitive, survival_competitive,
/// rift_competitive, showdown, lockdown, iron_banner_rift,
/// zone_control, iron_banner_zone_control, rift,
/// scorched, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute
/// scorched, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute, iron_banner_fortress
#[structopt(long = "mode", short = "M",
parse(try_from_str=parse_and_validate_crucible_mode), default_value = "all_pvp")]
mode: Mode,
Expand Down
2 changes: 1 addition & 1 deletion src/dclif/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dclif"
#version
version = "0.99.6"
version = "0.99.7"
authors = ["Mike Chambers <[email protected]>"]
edition = "2018"
description = "Command line tool for querying specific Destiny 2 pvp stats."
Expand Down
2 changes: 1 addition & 1 deletion src/dclif/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ struct Opt {
/// private_survival, private_rumble, showdown_competitive, survival_competitive,
/// rift_competitive, showdown, lockdown, iron_banner_rift,
/// zone_control, iron_banner_zone_control, rift,
/// scorched, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute
/// scorched, scorched_team, breakthrough, clash_quickplay, trials_of_the_nine, relic, countdown_competitive, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival, checkmate_rumble, checkmate_clash, checkmate_countdown, iron_banner_tribute, iron_banner_fortress
#[structopt(long = "mode", short = "M",
parse(try_from_str=parse_and_validate_crucible_mode), default_value = "all_pvp")]
mode: Mode,
Expand Down
2 changes: 1 addition & 1 deletion src/dclim/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dclim"
#version
version = "0.99.6"
version = "0.99.7"
authors = ["Mike Chambers <[email protected]>"]
edition = "2018"
description = "Command line tool for managing and syncing the remote Destiny 2 API manifest database."
Expand Down
2 changes: 1 addition & 1 deletion src/dclistat/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dclistat"
#version
version = "0.99.6"
version = "0.99.7"
authors = ["Mike Chambers <[email protected]>"]
edition = "2018"
description = "Command line tool for querying specific Destiny 2 pvp stats."
Expand Down
Loading

0 comments on commit abf6b13

Please sign in to comment.