Skip to content

Commit 9f05de8

Browse files
committed
adding support for season of the wish and new modes
1 parent 065f5ea commit 9f05de8

File tree

24 files changed

+125
-63
lines changed

24 files changed

+125
-63
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.5 November 28,2023
4+
5+
- Added support for Countdown Competitive (countdown_competitive), Checkmate Rumble (checkmate_control), Checkmate Clash (checkmate_clash), Checkmate Countdown (checkmate_countdown)
6+
- Added support for Season of the Wish (season_of_the_wish)
7+
38
## v0.99.4 September 22,2023
49

510
- Added support for Checkmate Survival (checkmate_survival), and Checkmate Control (checkmate_control)

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.4"
4+
version = "0.99.5"
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: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ use indicatif::{ProgressBar, ProgressState, ProgressStyle};
2929

3030
use crate::playeractivitiessummary::PlayerActivitiesSummary;
3131
use crate::utils::{
32-
format_error, CHECKMATE_CONTROL_ACTIVITY_HASH,
33-
CHECKMATE_SURVIVAL_ACTIVITY_HASH, COMPETITIVE_PVP_ACTIVITY_HASH,
34-
FREELANCE_COMPETITIVE_PVP_ACTIVITY_HASH,
32+
format_error, CHECKMATE_CLASH_ACTIVITY_HASH,
33+
CHECKMATE_CONTROL_ACTIVITY_HASHES, CHECKMATE_COUNTDOWN_ACTIVITY_HASH,
34+
CHECKMATE_RUMBLE_ACTIVITY_HASH, CHECKMATE_SURVIVAL_ACTIVITY_HASH,
35+
COMPETITIVE_PVP_ACTIVITY_HASH, FREELANCE_COMPETITIVE_PVP_ACTIVITY_HASH,
3536
};
3637
use crate::{
3738
crucible::{CrucibleActivity, Member, PlayerName, Team},
@@ -979,30 +980,58 @@ impl ActivityStoreInterface {
979980
self.add_to_modes(activity, Mode::SurvivalCompetitive);
980981
was_updated = true;
981982
}
983+
984+
if activity.activity_details.mode == Mode::Countdown {
985+
self.set_mode(activity, Mode::CountdownCompetitive);
986+
self.add_to_modes(activity, Mode::PvPCompetitive);
987+
was_updated = true;
988+
}
982989
}
983990

984991
//add support for checkmate (adding modes)
985992

986-
if activity.activity_details.director_activity_hash
987-
== CHECKMATE_CONTROL_ACTIVITY_HASH
993+
if CHECKMATE_CONTROL_ACTIVITY_HASHES
994+
.contains(&activity.activity_details.director_activity_hash)
988995
{
989996
self.set_mode(activity, Mode::CheckmateControl);
990997

991998
self.add_to_modes(activity, Mode::CheckmateAll);
992-
//self.add_to_modes(activity, Mode::CheckmateControl);
993999

9941000
self.remove_from_modes(activity, Mode::PvPQuickplay);
9951001
self.remove_from_modes(activity, Mode::ControlQuickplay);
9961002
}
9971003

9981004
if activity.activity_details.director_activity_hash
999-
== CHECKMATE_SURVIVAL_ACTIVITY_HASH
1005+
== CHECKMATE_CLASH_ACTIVITY_HASH
10001006
{
1001-
self.set_mode(activity, Mode::CheckmateSurvival);
1007+
self.set_mode(activity, Mode::CheckmateClash);
1008+
self.add_to_modes(activity, Mode::CheckmateAll);
1009+
self.remove_from_modes(activity, Mode::ClashQuickplay);
1010+
self.remove_from_modes(activity, Mode::PvPQuickplay);
1011+
}
1012+
1013+
if activity.activity_details.director_activity_hash
1014+
== CHECKMATE_COUNTDOWN_ACTIVITY_HASH
1015+
{
1016+
self.set_mode(activity, Mode::CheckmateCountdown);
1017+
self.add_to_modes(activity, Mode::CheckmateAll);
1018+
self.remove_from_modes(activity, Mode::PvPQuickplay);
1019+
}
10021020

1021+
if activity.activity_details.director_activity_hash
1022+
== CHECKMATE_RUMBLE_ACTIVITY_HASH
1023+
{
1024+
self.set_mode(activity, Mode::CheckmateRumble);
10031025
self.add_to_modes(activity, Mode::CheckmateAll);
1026+
self.remove_from_modes(activity, Mode::PvPQuickplay);
1027+
}
10041028

1005-
self.remove_from_modes(activity, Mode::PvPCompetitive)
1029+
if activity.activity_details.director_activity_hash
1030+
== CHECKMATE_SURVIVAL_ACTIVITY_HASH
1031+
{
1032+
self.set_mode(activity, Mode::CheckmateSurvival);
1033+
self.add_to_modes(activity, Mode::CheckmateAll);
1034+
self.remove_from_modes(activity, Mode::PvPCompetitive);
10061035
}
10071036

10081037
if activity.activity_details.mode == Mode::PrivateMatchesAll {

src/dcli/src/enums/mode.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,14 @@ pub enum Mode {
122122
RiftCompetitive = 700,
123123
ShowdownCompetitive = 701,
124124
SurvivalCompetitive = 702,
125+
CountdownCompetitive = 703,
125126

126127
CheckmateAll = 710,
127128
CheckmateControl = 711,
128129
CheckmateSurvival = 712,
129130
CheckmateRumble = 713,
131+
CheckmateClash = 714,
132+
CheckmateCountdown = 715,
130133
}
131134

132135
impl Mode {
@@ -221,11 +224,14 @@ impl Mode {
221224
700 => Ok(Mode::RiftCompetitive),
222225
701 => Ok(Mode::ShowdownCompetitive),
223226
702 => Ok(Mode::SurvivalCompetitive),
227+
703 => Ok(Mode::CountdownCompetitive),
224228

225229
710 => Ok(Mode::CheckmateAll),
226230
711 => Ok(Mode::CheckmateControl),
227231
712 => Ok(Mode::CheckmateSurvival),
228232
713 => Ok(Mode::CheckmateRumble),
233+
714 => Ok(Mode::CheckmateClash),
234+
715 => Ok(Mode::CheckmateCountdown),
229235

230236
_ => Err(Error::UnknownEnumValue),
231237
}
@@ -300,11 +306,14 @@ impl Mode {
300306
|| *self == Mode::RiftCompetitive
301307
|| *self == Mode::ShowdownCompetitive
302308
|| *self == Mode::SurvivalCompetitive
309+
|| *self == Mode::CountdownCompetitive
303310
|| *self == Mode::Relic
304311
|| *self == Mode::CheckmateAll
305312
|| *self == Mode::CheckmateControl
306313
|| *self == Mode::CheckmateSurvival
307314
|| *self == Mode::CheckmateRumble
315+
|| *self == Mode::CheckmateClash
316+
|| *self == Mode::CheckmateCountdown
308317
}
309318

310319
pub fn is_private(&self) -> bool {
@@ -416,12 +425,15 @@ impl FromStr for Mode {
416425
"rift_competitive" => Ok(Mode::RiftCompetitive),
417426
"showdown_competitive" => Ok(Mode::ShowdownCompetitive),
418427
"survival_competitive" => Ok(Mode::SurvivalCompetitive),
428+
"countdown_competitive" => Ok(Mode::CountdownCompetitive),
419429
"relic" => Ok(Mode::Relic),
420430

421431
"checkmate_all" => Ok(Mode::CheckmateAll),
422432
"checkmate_control" => Ok(Mode::CheckmateControl),
423433
"checkmate_survival" => Ok(Mode::CheckmateSurvival),
424434
"checkmate_rumble" => Ok(Mode::CheckmateRumble),
435+
"checkmate_clash" => Ok(Mode::CheckmateClash),
436+
"checkmate_countdown" => Ok(Mode::CheckmateCountdown),
425437

426438
_ => Err("Unknown Mode type"),
427439
}
@@ -518,12 +530,15 @@ impl fmt::Display for Mode {
518530
Mode::RiftCompetitive => "Rift Competitive",
519531
Mode::ShowdownCompetitive => "Showdown Competitive",
520532
Mode::SurvivalCompetitive => "Survival Competitive",
533+
Mode::CountdownCompetitive => "Countdown Competitive",
521534
Mode::Relic => "Relic",
522535

523536
Mode::CheckmateAll => "All Checkmate",
524537
Mode::CheckmateControl => "Checkmate Control",
525538
Mode::CheckmateSurvival => "Checkmate Survival",
526539
Mode::CheckmateRumble => "Checkmate Rumble",
540+
Mode::CheckmateClash => "Checkmate Clash",
541+
Mode::CheckmateCountdown => "Checkmate Countdown",
527542
};
528543

529544
write!(f, "{}", out)

src/dcli/src/enums/moment.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ pub enum Moment {
7676
SeasonOfDefiance,
7777
SeasonOfTheDeep,
7878
SeasonOfTheWitch,
79+
SeasonOfTheWish,
7980
}
8081

8182
impl Moment {
@@ -176,6 +177,10 @@ impl Moment {
176177
Moment::SeasonOfTheWitch => {
177178
Utc.with_ymd_and_hms(2023, 8, 22, 17, 0, 0).unwrap()
178179
}
180+
181+
Moment::SeasonOfTheWish => {
182+
Utc.with_ymd_and_hms(2023, 11, 28, 17, 0, 0).unwrap()
183+
}
179184
}
180185
}
181186
}
@@ -229,6 +234,7 @@ impl FromStr for Moment {
229234
"season_of_defiance" => Ok(Moment::SeasonOfDefiance),
230235
"season_of_the_deep" => Ok(Moment::SeasonOfTheDeep),
231236
"season_of_the_witch" => Ok(Moment::SeasonOfTheWitch),
237+
"season_of_the_wish" => Ok(Moment::SeasonOfTheWish),
232238

233239
_ => Err("Unknown Moment type"),
234240
}
@@ -279,6 +285,7 @@ impl fmt::Display for Moment {
279285
Moment::SeasonOfDefiance => "Season of Defiance",
280286
Moment::SeasonOfTheDeep => "Season of the Deep",
281287
Moment::SeasonOfTheWitch => "Season of the Witch",
288+
Moment::SeasonOfTheWish => "Season of the Wish",
282289
};
283290

284291
write!(f, "{}", out)

src/dcli/src/utils.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,14 @@ pub const TSV_DELIM: &str = "\t";
4747
pub const COMPETITIVE_PVP_ACTIVITY_HASH: u32 = 2754695317;
4848
pub const FREELANCE_COMPETITIVE_PVP_ACTIVITY_HASH: u32 = 2607135461;
4949

50-
pub const CHECKMATE_CONTROL_ACTIVITY_HASH: u32 = 3374318171;
50+
//pub const CHECKMATE_CONTROL_ACTIVITY_HASH: u32 = 3374318171;
51+
//480175362let my_array: [i32; 2] = [1, 2];
52+
pub const CHECKMATE_CONTROL_ACTIVITY_HASHES: [u32; 2] = [480175362, 2461220411];
53+
54+
pub const CHECKMATE_CLASH_ACTIVITY_HASH: u32 = 1251966208;
55+
pub const CHECKMATE_COUNTDOWN_ACTIVITY_HASH: u32 = 2344293485;
5156
pub const CHECKMATE_RUMBLE_ACTIVITY_HASH: u32 = 2461220411;
57+
5258
pub const CHECKMATE_SURVIVAL_ACTIVITY_HASH: u32 = 3876264582;
5359

5460
const VERSION: &str = env!("CARGO_PKG_VERSION");

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.4"
4+
version = "0.99.5"
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.4"
4+
version = "0.99.5"
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: 4 additions & 4 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, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival [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 [default: all_pvp]
7171
-n, --name <name>
7272
Bungie name for player
7373
@@ -77,9 +77,9 @@ OPTIONS:
7777
The number of weapons to display details for [default: 5]
7878
```
7979

80-
| ARGUMENT | OPTIONS |
81-
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
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, checkmate_all, checkmate_control, checkmate_rumble, checkmate_survival |
80+
| ARGUMENT | OPTIONS |
81+
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
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 |
8383

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

0 commit comments

Comments
 (0)