Skip to content

Commit

Permalink
Implement Remnant Messages from Sekiro
Browse files Browse the repository at this point in the history
When did they add this feature???
  • Loading branch information
Yaulendil committed Dec 16, 2020
1 parent 0dc09ca commit d05d665
Show file tree
Hide file tree
Showing 8 changed files with 502 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dsmsg"
description = "Randomly generate online messages from Dark Souls, Demon's Souls, and Bloodborne."
version = "1.5.1"
description = "Randomly generate online messages from Dark Souls, Demon's Souls Bloodborne, and Sekiro."
version = "1.6.0"

authors = ["Yaulendil <davarice@protonmail.com>"]
repository = "https://github.com/yaulendil/dsmsg"
Expand Down Expand Up @@ -44,6 +44,8 @@ ds2 = []
ds3 = []
# Include messages from Bloodborne.
bloodborne = []
# Include messages from Sekiro.
sekiro = []

# Include all available message sets.
all-sets = ["ds1", "ds2", "ds3", "bloodborne", "demons"]
all-sets = ["ds1", "ds2", "ds3", "bloodborne", "demons", "sekiro"]
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
![docs.rs](https://docs.rs/dsmsg/badge.svg?style=for-the-badge)
](https://docs.rs/dsmsg)

##### Random generator for online messages from Dark Souls, Demon's Souls, and Bloodborne.
##### Random generator for online messages from Dark Souls, Demon's Souls, Bloodborne, and Sekiro.

Generates messages in the format of one of any of the three in the series, chosen randomly. Messages from Dark Souls II and III may have a second part, in which case the two parts will be joined by a conjunction.
Generates messages in the format of one of any game in the series, chosen randomly. Messages from the more recent titles may have a second part, in which case the two parts will be joined by a conjunction.

## Installation

Expand All @@ -39,7 +39,7 @@ cargo install dsmsg --features "newline"
## Optional Message Sets

Messages from Bloodborne and Demon's Souls are also available via compile options. To enable output from all available message groups:
Messages from Bloodborne, Demon's Souls, and Sekiro are also available via compile options. To enable output from all available message groups:

```
cargo install dsmsg --features "all-sets"
Expand All @@ -57,6 +57,7 @@ This will first **disable** all three Dark Souls message groups (including `ds3`
- `ds1`
- `ds2`
- `ds3`
- `sekiro`


---
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#[cfg(not(any(
feature = "bloodborne", feature = "demons",
feature = "ds1", feature = "ds2", feature = "ds3",
feature = "sekiro",
)))]
compile_error!("Cannot compile without any Message Sets enabled.");

Expand All @@ -22,6 +23,8 @@ mod ds1;
mod ds2;
#[cfg(feature = "ds3")]
mod ds3;
#[cfg(feature = "sekiro")]
mod sek;

#[cfg(feature = "bloodborne")]
pub use bb::MessageBB;
Expand All @@ -33,6 +36,8 @@ pub use ds1::MessageDkS1;
pub use ds2::MessageDkS2;
#[cfg(feature = "ds3")]
pub use ds3::MessageDkS3;
#[cfg(feature = "sekiro")]
pub use sek::MessageSek;

use rand::prelude::{Rng, SliceRandom, thread_rng, ThreadRng};
use std::fmt::Display;
Expand Down Expand Up @@ -97,6 +102,8 @@ pub const GENERATORS: &[Generator] = &[
|r| Box::new(MessageDkS2::random(r)),
#[cfg(feature = "ds3")]
|r| Box::new(MessageDkS3::random(r)),
#[cfg(feature = "sekiro")]
|r| Box::new(MessageSek::random(r)),
];


Expand Down
6 changes: 6 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ struct CommandOpts {
#[cfg(feature = "ds3")]
#[argh(switch)]
ds3: bool,

/// generate a message from Sekiro
#[cfg(feature = "sekiro")]
#[argh(switch)]
sek: bool,
}


Expand All @@ -59,6 +64,7 @@ impl From<CommandOpts> for Vec<bool> {
#[cfg(feature = "ds1")] opt.ds1,
#[cfg(feature = "ds2")] opt.ds2,
#[cfg(feature = "ds3")] opt.ds3,
#[cfg(feature = "sekiro")] opt.sek,
]
}
}
Expand Down
Loading

0 comments on commit d05d665

Please sign in to comment.