Crate dsmsg

Source
Expand description

DSMSG: Random generator for Messages that would be found in the Dark Souls series.

Structs§

MessageDkS1
A complete Hint Message that could be found in Dark Souls I. Consists of either one or two strings. One is a Template, and the other, if present, is a Fill phrase.
MessageDkS2
A complete Hint Message that could be found in Dark Souls II. Consists of either one or two parts. If there are two, there will also be a Conjunction string to join them.
MessageDkS3
A complete Hint Message that could be found in Dark Souls III. Consists of either one or two parts. If there are two, there will also be a Conjunction string to join them.

Constants§

GENERATORS
A constant slice of small closures that each return a Box<dyn DsMsg> of a random generation of their respective messages.

Traits§

DsMsg
Indicates that a Struct can be used to generate and represent a Message.
DsMulti
A special case of DsMsg which may contain a second segment. The two parts will be joined by a Conjunction string.

Functions§

random_message
Randomly select from the GENERATORS slice, and run it, producing a random message from a random source.

Type Aliases§

Generator
A Closure that takes an RNG State and returns a dynamic type that implements DsMsg.