import sys
import logging
import pyramid.httpexceptions
+import pyramid.url
import re
from colorsys import rgb_to_hls, hls_to_rgb
from cgi import escape as html_escape
log = logging.getLogger(__name__)
+# Map of old weapons codes to new ones
+weapon_map = {
+ "grenadelauncher": "mortar",
+ "laser": "blaster",
+ "minstanex": "vaporizer",
+ "nex": "vortex",
+ "rocketlauncher": "devastator",
+ "uzi": "machinegun",
+}
+
+
# Map of special chars to ascii from Darkplace's console.c.
_qfont_ascii_table = [
'\0', '#', '#', '#', '#', '.', '#', '#',
u'\u005F', u'\u2747', u'\u2020', u'\u00B7',
u'\U0001F52B', u'\u0020', u'\u0020', u'\u25A0',
u'\u2022', u'\u2192', u'\u2748', u'\u2748',
- u'\u005B', u'\u005D', u'\U0001F47D', u'\U0001F60F',
+ u'\u005B', u'\u005D', u'\U0001F47D', u'\U0001F603',
u'\U0001F61E', u'\U0001F635', u'\U0001F615', u'\U0001F60A',
u'\u00AB', u'\u00BB', u'\u2022', u'\u203E',
u'\u2748', u'\u25AC', u'\u25AC', u'\u25AC',
u'\u00A1', u'\u004F', u'\u0055', u'\u0049',
u'\u0043', u'\u00A9', u'\u00AE', u'\u25A0',
u'\u00BF', u'\u25B6', u'\u2748', u'\u2748',
- u'\u2772', u'\u2773', u'\U0001F47D', u'\U0001F60F',
+ u'\u2772', u'\u2773', u'\U0001F47D', u'\U0001F603',
u'\U0001F61E', u'\U0001F635', u'\U0001F615', u'\U0001F60A',
u'\u00AB', u'\u00BB', u'\u2747', u'\u0078',
u'\u2748', u'\u2014', u'\u2014', u'\u2014',
def page_url(page):
- return current_route_url(request, page=page, _query=request.GET)
+ return pyramid.url.current_route_url(request, page=page, _query=request.GET)
def pretty_date(time=False):