diff orpg/chat/chatwnd.py @ 132:fe4dc5817d5e alpha

Traipse Alpha 'OpenRPG' {091005-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 (Cleaning up for Beta) Added Bookmarks Fix to Remote Admin Commands Minor fix to text based Server Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core 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 default_manifest.xml renamed to default_upmana.xml Cleaner clode for saved repositories New TrueDebug Class in orpg_log (See documentation for usage) Mercurial's hgweb folder is ported to upmana **Pretty important update that can help remove thousands of dead children from your gametree. **Children, <forms />, <group_atts />, <horizontal />, <cols />, <rows />, <height />, etc... are all tags now. Check your gametree and look for dead children!! **New Gamtree Recusion method, mapping, and context sensitivity. !!Alpha - Watch out for infinite loops!! Dead Node Children, now that's a O O -v-v- Happy Halloween!
author sirebral
date Thu, 05 Nov 2009 12:15:19 -0600
parents d54e1328dbb1
children 37d26a98883f
line wrap: on
line diff
--- a/orpg/chat/chatwnd.py	Tue Nov 03 21:30:36 2009 -0600
+++ b/orpg/chat/chatwnd.py	Thu Nov 05 12:15:19 2009 -0600
@@ -1836,7 +1836,6 @@
     def ParseFilter(self, s):
         s = self.GetFilteredText(s)
         return s
-
     
     def ParseNode(self, s):
         """Parses player input for embedded nodes rolls"""
@@ -1957,7 +1956,20 @@
             else: self.data = 'Nodehandler for '+ node.get('class') + ' not done!' or 'No Data!'
         else:
             self.data = ''
-            pass
+            pass
+        self.data = self.ParseMap(self.data, node)
+
+    def ParseMap(self, s, node):
+        """Parses player input for embedded nodes rolls"""
+        cur_loc = 0
+        reg = re.compile("(!!(.*?)!!)")
+        matches = reg.findall(s)
+        print matches
+        for i in xrange(0,len(matches)):
+            newstr = txt = '!@' + node.get('map') + '::' + matches[i][1] + '@!'
+            s = s.replace(matches[i][0], newstr, 1)
+            s = self.ParseNode(s)
+        return s
 
     def resolve_nodes(self, s):
         self.passed = False