Skip to content

Commit eecd9e0

Browse files
committed
Fix bugs with comp mode data. Support for collision_competitive
1 parent def08f3 commit eecd9e0

File tree

21 files changed

+76
-28
lines changed

21 files changed

+76
-28
lines changed

RELEASE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# dcli Release Notes
22

3+
## v0.99.9 November 12, 2024
4+
5+
- Fix API issues for competitive matches.
6+
- Added Mode support for CollisionCompetitive (collision_competitive)
7+
38
## v0.99.8 January 26, 2024
49

510
- Fixed crash when adding player with no player profiles.

src/Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dcli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dcli"
33
#version
4-
version = "0.99.8"
4+
version = "0.99.9"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Library for the dcli collection of command line tools for Destiny 2."

src/dcli/src/activitystoreinterface.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,42 @@ impl ActivityStoreInterface {
964964
|| activity.activity_details.director_activity_hash
965965
== FREELANCE_COMPETITIVE_PVP_ACTIVITY_HASH
966966
{
967+
968+
/*
969+
out.activityDetails.addToModes(mode: Mode.competitive.rawValue);
970+
971+
if out.activityDetails.mode == Mode.zoneControl.rawValue {
972+
out.activityDetails.setMode(mode: Mode.competitiveCollision.rawValue)
973+
974+
//fix generic activity hash set (competitive)
975+
out.activityDetails.setDirectorActivityHash(hash: collisionActivityHash)
976+
}
977+
978+
if out.activityDetails.mode == Mode.clashQuickplay.rawValue {
979+
out.activityDetails.removeFromModes(mode: Mode.clashQuickplay.rawValue)
980+
out.activityDetails.removeFromModes(mode: Mode.quickplay.rawValue)
981+
out.activityDetails.setMode(mode: Mode.competitiveClash.rawValue)
982+
983+
//fix generic activity hash set (competitive)
984+
out.activityDetails.setDirectorActivityHash(hash: clashActivityHash)
985+
}
986+
*/
987+
988+
989+
if activity.activity_details.mode == Mode::ZoneControl {
990+
self.set_mode(activity, Mode::CollisionCompetitive);
991+
self.add_to_modes(activity, Mode::PvPCompetitive);
992+
was_updated = true;
993+
}
994+
995+
if activity.activity_details.mode == Mode::ClashQuickplay {
996+
self.remove_from_modes(activity, Mode::ClashQuickplay);
997+
self.remove_from_modes(activity, Mode::PvPQuickplay);
998+
self.set_mode(activity, Mode::ClashCompetitive);
999+
self.add_to_modes(activity, Mode::PvPCompetitive);
1000+
was_updated = true;
1001+
}
1002+
9671003
if activity.activity_details.mode == Mode::Rift {
9681004
self.set_mode(activity, Mode::RiftCompetitive);
9691005
self.add_to_modes(activity, Mode::RiftCompetitive);

src/dcli/src/enums/mode.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ pub enum Mode {
123123
ShowdownCompetitive = 701,
124124
SurvivalCompetitive = 702,
125125
CountdownCompetitive = 703,
126+
CollisionCompetitive = 704,
126127

127128
CheckmateAll = 710,
128129
CheckmateControl = 711,
@@ -228,6 +229,7 @@ impl Mode {
228229
701 => Ok(Mode::ShowdownCompetitive),
229230
702 => Ok(Mode::SurvivalCompetitive),
230231
703 => Ok(Mode::CountdownCompetitive),
232+
704 => Ok(Mode::CollisionCompetitive),
231233

232234
710 => Ok(Mode::CheckmateAll),
233235
711 => Ok(Mode::CheckmateControl),
@@ -319,6 +321,7 @@ impl Mode {
319321
|| *self == Mode::CheckmateRumble
320322
|| *self == Mode::CheckmateClash
321323
|| *self == Mode::CheckmateCountdown
324+
|| *self == Mode::CollisionCompetitive
322325
|| *self == Mode::IronBannerTribute
323326
|| *self == Mode::IronBannerFortress
324327
}
@@ -441,6 +444,8 @@ impl FromStr for Mode {
441444
"checkmate_rumble" => Ok(Mode::CheckmateRumble),
442445
"checkmate_clash" => Ok(Mode::CheckmateClash),
443446
"checkmate_countdown" => Ok(Mode::CheckmateCountdown),
447+
"collision_competitive" => Ok(Mode::CollisionCompetitive),
448+
444449
"iron_banner_tribute" => Ok(Mode::IronBannerTribute),
445450
"iron_banner_fortress" => Ok(Mode::IronBannerFortress),
446451

@@ -540,6 +545,8 @@ impl fmt::Display for Mode {
540545
Mode::ShowdownCompetitive => "Showdown Competitive",
541546
Mode::SurvivalCompetitive => "Survival Competitive",
542547
Mode::CountdownCompetitive => "Countdown Competitive",
548+
Mode::CollisionCompetitive => "Collision Competitive",
549+
543550
Mode::Relic => "Relic",
544551

545552
Mode::CheckmateAll => "All Checkmate",

src/dclia/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dclia"
33
#version
4-
version = "0.99.8"
4+
version = "0.99.9"
55
authors = ["Mike Chambers <[email protected]>"]
66
description = "Command line tool for retrieving information on current activity for specified player character."
77
homepage = "https://www.mikechambers.com"

src/dcliad/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dcliad"
33
#version
4-
version = "0.99.8"
4+
version = "0.99.9"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Command line tool for viewing Destiny 2 activity details."

src/dcliad/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ OPTIONS:
6767
6868
Addition values available are crimsom_doubles, supremacy, survival, countdown, all_doubles, doubles,
6969
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
70-
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]
70+
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, collision_competitive, iron_banner_tribute, iron_banner_fortress [default: all_pvp]
7171
-n, --name <name>
7272
Bungie name for player
7373
@@ -79,7 +79,7 @@ OPTIONS:
7979

8080
| ARGUMENT | OPTIONS |
8181
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
82-
| --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 |
82+
| --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, collision_competitive, iron_banner_tribute, iron_banner_fortress |
8383

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

src/dcliad/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ struct Opt {
508508
/// private_survival, private_rumble, showdown_competitive, survival_competitive,
509509
/// rift_competitive, showdown, lockdown, iron_banner_rift,
510510
/// zone_control, iron_banner_zone_control, rift,
511-
/// 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
511+
/// 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, collision_competitive, iron_banner_tribute, iron_banner_fortress
512512
#[structopt(long = "mode", short = "M",
513513
parse(try_from_str=parse_and_validate_mode), default_value = "all_pvp")]
514514
mode: Mode,

src/dcliah/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dcliah"
33
#version
4-
version = "0.99.8"
4+
version = "0.99.9"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Command line tool for viewing Destiny 2 activity history."

0 commit comments

Comments
 (0)