forked from projectmoon/tenebrous-dicebot
parent
2a6dff3e07
commit
090ce9be45
|
@ -3190,7 +3190,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tenebrous-dicebot"
|
name = "tenebrous-dicebot"
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"barrel",
|
"barrel",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tenebrous-dicebot"
|
name = "tenebrous-dicebot"
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
rust-version = "1.68"
|
rust-version = "1.68"
|
||||||
authors = ["projectmoon <projectmoon@agnos.is>", "Taylor C. Richberger <taywee@gmx.com>"]
|
authors = ["projectmoon <projectmoon@agnos.is>", "Taylor C. Richberger <taywee@gmx.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
|
@ -6,6 +6,9 @@ pub fn parse_help_topic(input: &str) -> Option<HelpTopic> {
|
||||||
"dicepool" => Some(HelpTopic::DicePool),
|
"dicepool" => Some(HelpTopic::DicePool),
|
||||||
"dice" => Some(HelpTopic::RollingDice),
|
"dice" => Some(HelpTopic::RollingDice),
|
||||||
"cthulhu" => Some(HelpTopic::Cthulhu),
|
"cthulhu" => Some(HelpTopic::Cthulhu),
|
||||||
|
"variables" => Some(HelpTopic::Variables),
|
||||||
|
"var" => Some(HelpTopic::Variables),
|
||||||
|
"variable" => Some(HelpTopic::Variables),
|
||||||
"" => Some(HelpTopic::General),
|
"" => Some(HelpTopic::General),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
|
@ -16,6 +19,7 @@ pub enum HelpTopic {
|
||||||
DicePool,
|
DicePool,
|
||||||
Cthulhu,
|
Cthulhu,
|
||||||
RollingDice,
|
RollingDice,
|
||||||
|
Variables,
|
||||||
General,
|
General,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,6 +105,34 @@ Note: If !cthadv is given a variable, and the roll is successful, it will
|
||||||
update the variable with the new skill.
|
update the variable with the new skill.
|
||||||
"};
|
"};
|
||||||
|
|
||||||
|
const VARIABLES_HELP: &'static str = indoc! {"
|
||||||
|
Variables
|
||||||
|
|
||||||
|
Commands: !get, !set, !variables
|
||||||
|
|
||||||
|
Manage variables that can be substituted into roll commands.
|
||||||
|
|
||||||
|
Examples: !get myvar, !set myvar 10
|
||||||
|
|
||||||
|
!get <variable> = show variable of the given name
|
||||||
|
!set <variable> <num> = set a variable to a number
|
||||||
|
|
||||||
|
The !variables command will list all variables for the room. The
|
||||||
|
variables command cna be used in a secure room to avoid spamming the
|
||||||
|
actual room that the variable is set in.
|
||||||
|
|
||||||
|
Variable names can be used in all types of dice rolls:
|
||||||
|
|
||||||
|
!pool myvar + 3
|
||||||
|
!roll myvar
|
||||||
|
|
||||||
|
There are some limitations on variables: they cannot themselves be
|
||||||
|
dice expressions (i.e. can only be numbers), and they must be uniquely
|
||||||
|
parseable in an expression (i.e 'myvard6' does not work for the !roll
|
||||||
|
command).
|
||||||
|
|
||||||
|
"};
|
||||||
|
|
||||||
const GENERAL_HELP: &'static str = indoc! {"
|
const GENERAL_HELP: &'static str = indoc! {"
|
||||||
General Help
|
General Help
|
||||||
|
|
||||||
|
@ -117,6 +149,7 @@ impl HelpTopic {
|
||||||
HelpTopic::DicePool => DICEPOOL_HELP,
|
HelpTopic::DicePool => DICEPOOL_HELP,
|
||||||
HelpTopic::Cthulhu => CTHULHU_HELP,
|
HelpTopic::Cthulhu => CTHULHU_HELP,
|
||||||
HelpTopic::RollingDice => DICE_HELP,
|
HelpTopic::RollingDice => DICE_HELP,
|
||||||
|
HelpTopic::Variables => VARIABLES_HELP,
|
||||||
HelpTopic::General => GENERAL_HELP,
|
HelpTopic::General => GENERAL_HELP,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue