Skip to content

Commit

Permalink
Fixing dice roll ordering.
Browse files Browse the repository at this point in the history
It really was that easy.

Also adding "denomination" names for coins.
  • Loading branch information
walterw9000 committed Feb 21, 2019
1 parent 18e8fb8 commit 6e73f98
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
3 changes: 2 additions & 1 deletion botdice.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import random
import re
import shelve
from collections import OrderedDict

dbname = 'data/macros'

Expand Down Expand Up @@ -42,7 +43,7 @@ def roll_command(user, command):
except KeyError:
pass
command = command.replace(' ', '')
results = {}
results = OrderedDict()
for com in command.split(','):
key = com
iterator = 0
Expand Down
28 changes: 27 additions & 1 deletion genConfig/coin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@ root:
quantity: coin.quantity
material: jewelry.material
shape: coin.shapeDescriptor
- text: '{quantity} {shape} {material} {denomination}'
quantity: coin.quantity
material: jewelry.material
shape: coin.shapeDescriptor
denomination: coin.denomination
- text: '{quantity} {shape} {material} coins engraved with a {animal}'
quantity: coin.quantity
material: jewelry.material
animal: beast.species
shape: coin.shapeDescriptor
- text: '{quantity} {shape} {material} {denomination} engraved with a {animal}'
quantity: coin.quantity
material: jewelry.material
animal: beast.species
shape: coin.shapeDescriptor
denomination: coin.denomination
- text: 'a single {shape} {material} coin'
material: jewelry.material
shape: coin.shapeDescriptor
Expand Down Expand Up @@ -46,4 +57,19 @@ shapeDescriptor:
- text: diamond-shaped
- text: heart-shaped
- text: crescent-shaped
- text: semicircular
- text: semicircular
denomination:
- text: pennies
- text: drabs
- text: pawns
- text: farthings
- text: sterlings
- text: marks
- text: dinars
- text: shillings
- text: sovereigns
- text: florins
- text: guilders
- text: alms
- text: cents
- text: pence
1 change: 1 addition & 0 deletions genConfig/jewelry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ material:
species: beast.species
- text: '{wood} wood'
wood: wand.wood
- text: coral
article:
- text: ring
- text: bracelet
Expand Down

0 comments on commit 6e73f98

Please sign in to comment.