# HG changeset patch # User sirebral # Date 1272310216 18000 # Node ID fcd6aafbe232376c2ce7b77cd0f53033c47609de # Parent 0bc44a57ae6cc0eacf138aee80fd9dfbe59785d2 Traipse Alpha 'OpenRPG' {100426-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 (Patch-2) New Features: New Namespace method with two new syntaxes New Namespace Internal is context sensitive, always! New Namespace External is 'as narrow as you make it' New Namespace FutureCheck helps ensure you don't receive an incorrect node New PluginDB access for URL2Link plugin New to Forms, they now show their content in Design Mode Fixes: Fix to Server GUI startup errors Fix to Server GUI Rooms tab updating Fix to Chat and Settings if non existant die roller is picked Fix to Dieroller and .open() used with .vs(). Successes are correctly calculated Fix to Alias Lib's Export to Tree, Open, Save features Fix to alias node, now works properly Fix to Splitter node, minor GUI cleanup Fix to Backgrounds not loading through remote loader Fix to Node name errors Fix to rolling dice in chat Whispers Fix to Splitters Sizing issues diff -r 0bc44a57ae6c -r fcd6aafbe232 orpg/orpg_version.py --- a/orpg/orpg_version.py Sun Apr 25 23:26:55 2010 -0500 +++ b/orpg/orpg_version.py Mon Apr 26 14:30:16 2010 -0500 @@ -4,7 +4,7 @@ #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed) DISTRO = "Traipse Alpha" DIS_VER = "Ornery Orc" -BUILD = "100425-00" +BUILD = "100426-00" # This version is for network capability. PROTOCOL_VERSION = "1.2" diff -r 0bc44a57ae6c -r fcd6aafbe232 orpg/tools/InterParse.py --- a/orpg/tools/InterParse.py Sun Apr 25 23:26:55 2010 -0500 +++ b/orpg/tools/InterParse.py Mon Apr 26 14:30:16 2010 -0500 @@ -127,6 +127,18 @@ dlg.Destroy() return s + def LocationCheck(self, x, roots, root_list, tree_map): + roots.append(tree_map[x]) + root_list.append(self.get_node(roots)) + namespace = root_list[x].getiterator('nodehandler') + return namespace + + def FutureCheck(self, node, next): + future = node.getiterator('nodehandler') + for advance in future: + if next == advance.get('name'): return True + return False + def NameSpaceI(self, s, node): reg = re.compile("(!=(.*?)=!)") matches = reg.findall(s) @@ -135,17 +147,22 @@ tree_map = node.get('map').split('::') roots = []; root_list = [] find = matches[i][1].split('::') + node = self.get_node([tree_map[0]]) for x in xrange(0, len(tree_map)): - roots.append(tree_map[x]) - root_list.append(self.get_node(roots)) - namespace = root_list[x].getiterator('nodehandler') - for node in namespace: - if find[0] == node.get('name'): - if node.get('class') == 'rpg_grid_handler': - newstr = self.NameSpaceGrid(find[1], node); break - else: - newstr = str(node.find('text').text); break - if not newstr: newstr = 'Invalid Reference!'; break + namespace = self.LocationCheck(x, roots, root_list, tree_map) + for x in xrange(0, len(find)): + namespace = node.getiterator('nodehandler') + for node in namespace: + if find[x] == node.get('name'): + if node.get('class') == 'rpg_grid_handler': + newstr = self.NameSpaceGrid(find[x+1], node); break + try: + if self.FutureCheck(node, find[x+1]): break + else: continue + except: + if x == len(find)-1: newstr = str(node.find('text').text); break + else: break + if not newstr: newstr = 'Invalid Reference!'; break s = s.replace(matches[i][0], newstr, 1) s = self.ParseLogic(s, node) return s @@ -153,25 +170,27 @@ def NameSpaceE(self, s): reg = re.compile("(!&(.*?)&!)") matches = reg.findall(s) - newstr = 'False'; x = 0 + newstr = False for i in xrange(0,len(matches)): find = matches[i][1].split('::') - node = self.get_node([find[0]]) - last = find[len(find)-1] + node = component.get('tree').xml_root if not iselement(node): s = s.replace(matches[i][0], 'Invalid Reference!', 1); s = self.NameSpaceE(s) return s - while newstr == 'False': - namespace = node.getiterator('nodehandler'); x += 1 + for x in xrange(0, len(find)): + namespace = node.getiterator('nodehandler') for node in namespace: if find[x] == node.get('name'): - if node.get('class') == 'map_miniature_handler': continue - elif node.get('class') == 'rpg_grid_handler': - newstr = self.NameSpaceGrid(last, node); break - elif x == len(find)-1: newstr = str(node.find('text').text); break - else: break - else: newstr = 'Invalid Reference!'; break + if node.get('class') == 'rpg_grid_handler': + newstr = self.NameSpaceGrid(find[x+1], node); break + try: + if self.FutureCheck(node, find[x+1]): break + else: continue + except: + if x == len(find)-1: newstr = str(node.find('text').text); break + else: break + if not newstr: newstr = 'Invalid Reference!' s = s.replace(matches[i][0], newstr, 1) s = self.ParseLogic(s, node) return s