tenebrous-dicebot/Cargo.toml

52 lines
1.5 KiB
TOML
Raw Permalink Normal View History

2020-04-17 05:20:54 +00:00
[package]
2020-08-23 21:19:38 +00:00
name = "chronicle-dicebot"
2020-10-17 07:01:29 +00:00
version = "0.7.0"
2020-08-23 21:19:38 +00:00
authors = ["Taylor C. Richberger <taywee@gmx.com>", "projectmoon <projectmoon@agnos.is>"]
2020-04-17 05:20:54 +00:00
edition = "2018"
2020-04-22 04:34:50 +00:00
license = 'MIT'
description = 'A simple async Matrix dicebot'
readme = 'README.md'
2020-08-23 21:19:38 +00:00
repository = 'https://github.com/ProjectMoon/matrix-dicebot'
2020-04-22 04:34:50 +00:00
keywords = ["games", "dice", "matrix", "bot"]
categories = ["games"]
2020-04-17 05:20:54 +00:00
[dependencies]
2020-08-28 00:13:01 +00:00
log = "0.4"
env_logger = "0.7"
2020-04-20 06:32:57 +00:00
toml = "0.5"
nom = "5"
2020-04-20 16:02:26 +00:00
rand = "0.7"
thiserror = "1.0"
itertools = "0.9"
async-trait = "0.1"
url = "2.1"
dirs = "3.0"
indoc = "1.0"
actix = "0.10"
actix-rt = "1.1"
Dice pool and command parser rewrite to prepare for user variables. This commit refactors the parsing and rolling for the dice pool system to prepare for support of user variables. The nom parser was dropped in favor of the easier-to-understand combine parser in most parts of the code. A breaking change was introduced into the dice pool syntax to allow for proper expressions and variables. The syntax is now "modifiers:pool-amount", e.g. "n:gnosis+8". The simple single-number syntax with no modifiers is also still understood. Dice pool expressions are translated into a Vec of "Amount" objects, stored by the DicePool struct. They have an operator (+ or -) and either a number or variable name. When the dice pool is rolled, this list of Amonuts are is collapsed into a single number that is rolled, as it was before the refactor. The following changes were made to the dice rolling code: - Store Vec<Amount> on DicePool instead of single number to roll. - New struct RolledDicePool to store result of a dice pool roll. - Remove Display trait from DicePool, move it over to RolledDicePool. - Separate extra dice pool info into DicePoolModifiers. - DicePoolModifiers is shared between DicePool and RolledDicePool. - Dice parsing and rolling now return standard Result objects. This commit does NOT enable support of actually using variables. Any dice pool roll containing a variable will result in an eror. The command parser was also rewritten to use combine and rely on the standard Result pattern.
2020-10-04 21:32:50 +00:00
combine = "4.3"
sled = "0.34"
zerocopy = "0.3"
byteorder = "1.3"
futures = "0.3"
# The versioning of the matrix SDK follows its Cargo.toml. The SDK and
# macros are on master, but it imports the common and base from 0.1.0.
# https://github.com/matrix-org/matrix-rust-sdk/blob/master/matrix_sdk/Cargo.toml
matrix-sdk = { git = "https://github.com/matrix-org/matrix-rust-sdk", rev = "master" }
matrix-sdk-common-macros = { git = "https://github.com/matrix-org/matrix-rust-sdk", rev = "master" }
matrix-sdk-common = { git = "https://github.com/matrix-org/matrix-rust-sdk", rev = "0.1.0" }
matrix-sdk-base = { git = "https://github.com/matrix-org/matrix-rust-sdk", rev = "0.1.0", default_features = false }
2020-04-17 05:20:54 +00:00
[dependencies.serde]
2020-04-20 06:32:57 +00:00
version = "1"
2020-04-17 05:20:54 +00:00
features = ['derive']
[dependencies.tokio]
2020-04-20 06:32:57 +00:00
version = "0.2"
features = ["rt-core", "rt-util", "macros", "time", "signal"]
2020-10-16 21:20:17 +00:00
[dev-dependencies]
tempfile = "3.1"