Mercurial > openrpg
changeset 514:52c273953722
simple arithmetic that gets eval-ed can now include the python-style "X if Y else Z" statement in addition to min()/max() and basic arithmetic
author | david@goon |
---|---|
date | Wed, 10 Feb 2010 20:35:53 -0600 |
parents | d2906c33d146 |
children | 52dcb3fed083 |
files | orpg/chat/chatwnd.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/orpg/chat/chatwnd.py Wed Feb 10 20:33:04 2010 -0600 +++ b/orpg/chat/chatwnd.py Wed Feb 10 20:35:53 2010 -0600 @@ -74,7 +74,7 @@ pass compiled_check_for_reference_regex = re.compile("(!@(.*?)@!)") -compiled_simple_arithmetic_regex = re.compile("^([0-9,\+\-\(\) \*\/]|max|min)+$") +compiled_simple_arithmetic_regex = re.compile("^([0-9,\+\-\(\) \*\/><=!]|max|min|if|else)+$") def log(text): filename = settings.get('GameLogPrefix')