Cosmetic enhancement for ducks and dice.

This commit is contained in:
dngfx 2018-09-01 10:52:04 +01:00
parent c284608cbd
commit 0a96a79077
2 changed files with 13 additions and 11 deletions

View file

@ -1,5 +1,5 @@
import random
import Utils
class Module(object):
def __init__(self, bot, events):
@ -38,6 +38,6 @@ class Module(object):
total = sum(results)
results = ', '.join(map(str, results))
event["stdout"].write("Rolled " + str_roll + " for a total "
+ "of " + str(total)
+ ": [" + results + "]")
event["stdout"].write("Rolled " + Utils.bold(str_roll) + " for a total "
+ "of " + Utils.bold(str(total))
+ ": " + results)

View file

@ -1,6 +1,6 @@
from operator import itemgetter
from threading import Timer
import datetime
import Utils
import random
@ -197,9 +197,10 @@ class Module(object):
grammar = "" if befriended_ducks == 0 else "s"
event["stdout"].write(
target + ", you've befriended " + str(
befriended_ducks + 1) + " duck" + grammar + " in " + event[
"target"].name)
target + ", you've befriended " + Utils.bold(str(
befriended_ducks + 1)) + " duck" + grammar + " in " +
Utils.bold(event[
"target"].name))
self.duck_loop_entry(event)
@ -225,9 +226,10 @@ class Module(object):
grammar = "" if shot_ducks == 0 else "s"
event["stdout"].write(
target + ", you've shot " + str(
shot_ducks + 1) + " duck" + grammar + " in " + event[
"target"].name)
target + ", you've shot "
+ Utils.bold(str(shot_ducks + 1)) + " duck"
+ grammar + " in "
+ Utils.bold(event["target"].name))
self.duck_loop_entry(event)