Starting to fix prototype diffs which don't work right

This commit is contained in:
Griatch 2018-09-14 08:47:46 +02:00
parent ff5ffa8d0e
commit c4f501123a
3 changed files with 202 additions and 35 deletions

View file

@ -36,7 +36,7 @@ prototype key (this value must be possible to serialize in an Attribute).
"""
from ast import literal_eval
from random import randint as base_randint, random as base_random
from random import randint as base_randint, random as base_random, choice as base_choice
from evennia.utils import search
from evennia.utils.utils import justify as base_justify, is_iter, to_str
@ -101,6 +101,16 @@ def center_justify(*args, **kwargs):
return ""
def choice(*args, **kwargs):
"""
Usage: $choice(val, val, val, ...)
Returns one of the values randomly
"""
if args:
return base_choice(args)
return ""
def full_justify(*args, **kwargs):
"""