Mercurial > traipse_dev
comparison orpg/chat/chatwnd.py @ 171:ff48c2741fe7 beta
Traipse Beta 'OpenRPG' {091210-00}
Traipse is a distribution of OpenRPG that is designed to be easy to
setup and go. Traipse also makes it easy for developers to work on code
without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy'
and adds fixes to the code. 'Ornery-Orc's main goal is to offer more
advanced features and enhance the productivity of the user.
Update Summary (Beta)
New Features:
Added Bookmarks
Added 'boot' command to remote admin
Added confirmation window for sent nodes
Minor changes to allow for portability to an OpenSUSE linux OS
Miniatures Layer pop up box allows users to turn off Mini labels, from
FlexiRPG
Zoom Mouse plugin added
Images added to Plugin UI
Switching to Element Tree
Map efficiency, from FlexiRPG
Added Status Bar to Update Manager
New TrueDebug Class in orpg_log (See documentation for usage)
Portable Mercurial
Tip of the Day added, from Core and community
New Reference Syntax added for custom PC sheets
New Child Reference for gametree
New Gametree Recursion method, mapping, context sensitivity, and
effeciency..
New Features node with bonus nodes and Node Referencing help added
Added 7th Sea die roller method; ie [7k3] =
[7d10.takeHighest(3).open(10)]
New 'Mythos' System die roller added
Added new vs. die roller method for WoD; ie [3v3] = [3d10.vs(3)].
Includes support for Mythos roller.
Fixes:
Fix to Text based Server
Fix to Remote Admin Commands
Fix to Pretty Print, from Core
Fix to Splitter Nodes not being created
Fix to massive amounts of images loading, from Core
Fix to Map from gametree not showing to all clients
Fix to gametree about menus
Fix to Password Manager check on startup
Fix to PC Sheets from tool nodes. They now use the tabber_panel
Fixed Whiteboard ID to prevent random line or text deleting.
Modified ID's to prevent non updated clients from ruining the fix.
default_manifest.xml renamed to default_upmana.xml
Fix to Update Manager; cleaner clode for saved repositories
Fixes made to Settings Panel and no reactive settings when Ok is
pressed.
author | sirebral |
---|---|
date | Thu, 10 Dec 2009 22:30:40 -0600 |
parents | e3714f232f2f |
children | 0d9b746b5751 |
comparison
equal
deleted
inserted
replaced
165:e4a803df4c88 | 171:ff48c2741fe7 |
---|---|
1790 newstr = newstr[1:] | 1790 newstr = newstr[1:] |
1791 qmode = 2 | 1791 qmode = 2 |
1792 try: newstr = component.get('DiceManager').proccessRoll(newstr) | 1792 try: newstr = component.get('DiceManager').proccessRoll(newstr) |
1793 except: pass | 1793 except: pass |
1794 if qmode == 1: | 1794 if qmode == 1: |
1795 s = s.replace("[" + matches[i] + "]", "<!-- Official Roll [" + newstr1 + "] => " + newstr + "-->" + newstr, 1) | 1795 s = s.replace("[" + matches[i] + "]", |
1796 "<!-- Official Roll [" + newstr1 + "] => " + newstr + "-->" + newstr, 1) | |
1796 elif qmode == 2: | 1797 elif qmode == 2: |
1797 s = s.replace("[" + matches[i] + "]", newstr[len(newstr)-2:-1], 1) | 1798 s = s.replace("[" + matches[i] + "]", newstr[len(newstr)-2:-1], 1) |
1798 else: s = s.replace("[" + matches[i] + "]", "[" + newstr1 + "<!-- Official Roll -->] => " + newstr, 1) | 1799 else: s = s.replace("[" + matches[i] + "]", |
1800 "[" + newstr1 + "<!-- Official Roll -->] => " + newstr, 1) | |
1799 return s | 1801 return s |
1800 | 1802 |
1801 def PraseUnknowns(self, s): | 1803 def PraseUnknowns(self, s): |
1802 # Uses a tuple. Usage: ?Label}dY. If no Label is assigned then use ?}DY | 1804 # Uses a tuple. Usage: ?Label}dY. If no Label is assigned then use ?}DY |
1803 newstr = "0" | 1805 newstr = "0" |
1846 def replace_quotes(self, s): | 1848 def replace_quotes(self, s): |
1847 in_tag = 0 | 1849 in_tag = 0 |
1848 i = 0 | 1850 i = 0 |
1849 rs = s[:] | 1851 rs = s[:] |
1850 for c in s: | 1852 for c in s: |
1851 if c == "<": | 1853 if c == "<": in_tag += 1 |
1852 in_tag += 1 | |
1853 elif c == ">": | 1854 elif c == ">": |
1854 if in_tag: | 1855 if in_tag: in_tag -= 1 |
1855 in_tag -= 1 | |
1856 elif c == '"': | 1856 elif c == '"': |
1857 if in_tag: | 1857 if in_tag: rs = rs[:i] + "'" + rs[i+1:] |
1858 rs = rs[:i] + "'" + rs[i+1:] | |
1859 i += 1 | 1858 i += 1 |
1860 return rs | 1859 return rs |
1861 | 1860 |
1862 def resolve_loop(self, node, path, step, depth): | 1861 def resolve_loop(self, node, path, step, depth): |
1863 if step == depth: | 1862 if step == depth: |
1894 if node_class not in ('d20char_handler', "SWd20char_handler"): ab = node.find('character').find('abilities') | 1893 if node_class not in ('d20char_handler', "SWd20char_handler"): ab = node.find('character').find('abilities') |
1895 else: ab = node.find('abilities') | 1894 else: ab = node.find('abilities') |
1896 ab_list = ab.findall('stat'); pc_stats = {} | 1895 ab_list = ab.findall('stat'); pc_stats = {} |
1897 | 1896 |
1898 for ability in ab_list: | 1897 for ability in ab_list: |
1899 pc_stats[ability.get('name')] = ( str(ability.get('base')), str((int(ability.get('base'))-10)/2) ) | 1898 pc_stats[ability.get('name')] = ( |
1900 pc_stats[ability.get('abbr')] = ( str(ability.get('base')), str((int(ability.get('base'))-10)/2) ) | 1899 str(ability.get('base')), |
1900 str((int(ability.get('base'))-10)/2) ) | |
1901 pc_stats[ability.get('abbr')] = ( | |
1902 str(ability.get('base')), | |
1903 str((int(ability.get('base'))-10)/2) ) | |
1901 | 1904 |
1902 if node_class not in ('d20char_handler', "SWd20char_handler"): ab = node.find('character').find('saves') | 1905 if node_class not in ('d20char_handler', "SWd20char_handler"): ab = node.find('character').find('saves') |
1903 else: ab = node.find('saves') | 1906 else: ab = node.find('saves') |
1904 ab_list = ab.findall('save') | 1907 ab_list = ab.findall('save') |
1905 for save in ab_list: | 1908 for save in ab_list: |
1979 """Parses player input for embedded nodes rolls""" | 1982 """Parses player input for embedded nodes rolls""" |
1980 cur_loc = 0 | 1983 cur_loc = 0 |
1981 reg = re.compile("(!!(.*?)!!)") | 1984 reg = re.compile("(!!(.*?)!!)") |
1982 matches = reg.findall(s) | 1985 matches = reg.findall(s) |
1983 for i in xrange(0,len(matches)): | 1986 for i in xrange(0,len(matches)): |
1984 newstr = txt = '!@' + node.get('map') + '::' + matches[i][1] + '@!' | 1987 tree_map = node.get('map') + '::' + matches[i][1] |
1988 newstr = '!@'+ tree_map +'@!' | |
1989 s = s.replace(matches[i][0], newstr, 1) | |
1990 s = self.ParseNode(s) | |
1991 s = self.ParseParent(s, tree_map) | |
1992 return s | |
1993 | |
1994 def ParseParent(self, s, tree_map): | |
1995 """Parses player input for embedded nodes rolls""" | |
1996 cur_loc = 0 | |
1997 reg = re.compile("(!#(.*?)#!)") | |
1998 matches = reg.findall(s) | |
1999 for i in xrange(0,len(matches)): | |
2000 ## Build the new tree_map | |
2001 new_map = tree_map.split('::') | |
2002 del new_map[len(new_map)-1] | |
2003 parent_map = matches[i][1].split('::') | |
2004 ## Find an index or use 1 for ease of use. | |
2005 try: index = new_map.index(parent_map[0]) | |
2006 except: index = 1 | |
2007 ## Just replace the old tree_map from the index. | |
2008 new_map[index:len(new_map)] = parent_map | |
2009 newstr = '::'.join(new_map) | |
2010 newstr = '!@'+ newstr +'@!' | |
1985 s = s.replace(matches[i][0], newstr, 1) | 2011 s = s.replace(matches[i][0], newstr, 1) |
1986 s = self.ParseNode(s) | 2012 s = self.ParseNode(s) |
1987 return s | 2013 return s |
1988 | 2014 |
1989 def resolve_nodes(self, s): | 2015 def resolve_nodes(self, s): |