changeset 238:b44dad398833 beta

Traipse Beta 'OpenRPG' {100619-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 (Closing/Closed) New Features: New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order New to Server GUI, can now clear log Updates: Update to Warhammer PC Sheet. Rollers set as macros. Should work with little maintanence. Update to Browser Server window. Display rooms with ' " & cleaner Update to Server. Handles ' " & cleaner. Fixes: Fix to InterParse that was causing an Infernal Loop with Namespace Internal Fix to XML data, removed old Minidom and switched to Element Tree Fix to Server that was causing eternal attempt to find a Server ID, in Register Rooms thread Fix to metaservers.xml file not being created Fix to Single and Double quotes in Whiteboard text Fix to Background images not showing when using the Image Server Fix to Duplicate chat names appearing Fix to Server GUI's logging output Fix to FNB.COLORFUL_TABS bug Fix to Gametree for XSLT Sheets
author sirebral
date Sat, 19 Jun 2010 10:17:24 -0500
parents 42f4809ad8a8
children 56c1f2729413
files orpg/dieroller/rollers/d20.py orpg/dieroller/rollers/std.py orpg/gametree/gametree.py orpg/networking/meta_server_lib.py orpg/orpg_version.py orpg/tools/InterParse.py
diffstat 6 files changed, 28 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/dieroller/rollers/d20.py	Wed Jun 16 03:11:55 2010 -0500
+++ b/orpg/dieroller/rollers/d20.py	Sat Jun 19 10:17:24 2010 -0500
@@ -41,7 +41,6 @@
 class d20dc(std):
     def __init__(self,source=[],DC=10,mod=0):
         std.__init__(self,source)
-        print "Source", source
         self.DC = DC
         self.mod = mod
         #self.append(static_di(mod))
--- a/orpg/dieroller/rollers/std.py	Wed Jun 16 03:11:55 2010 -0500
+++ b/orpg/dieroller/rollers/std.py	Sat Jun 19 10:17:24 2010 -0500
@@ -38,7 +38,7 @@
             if self.data[i].lastroll() >= num:
                 self.data[i].extraroll()
                 done = 0
-        if done: print self; return self
+        if done: return self
         else: return self.open(num)
 
     def minroll(self,min):
--- a/orpg/gametree/gametree.py	Wed Jun 16 03:11:55 2010 -0500
+++ b/orpg/gametree/gametree.py	Sat Jun 19 10:17:24 2010 -0500
@@ -700,6 +700,8 @@
     
     def load_xml(self, xml_element, parent_node, prev_node=None, drag_drop=False):
         if parent_node == self.root:
+            name = xml_element.get('name').replace(u'\xa0', ' ') #Required for XSLT sheets
+            xml_element.set('name', name)
             self.tree_map[xml_element.get('name')] = {}
             self.tree_map[xml_element.get('name')]['node'] = xml_element
             xml_element.set('map', '')
--- a/orpg/networking/meta_server_lib.py	Wed Jun 16 03:11:55 2010 -0500
+++ b/orpg/networking/meta_server_lib.py	Sat Jun 19 10:17:24 2010 -0500
@@ -134,8 +134,10 @@
         #get the server's xml from the current meta
         bad_meta = 0
         #print "Getting server list from " + meta + "..."
-        try: xml_dom = get_server_dom(data, meta.get('url'))
-        except: bad_meta = 1; print "Trouble getting servers from " + meta.get('url') + "..."
+        try: meta_path = meta.get('url'); xml_dom = get_server_dom(data, meta_path)
+        except:
+            if meta_path == None: meta_path = 'No URL available'
+            bad_meta = 1; print "Trouble getting servers from " +meta_path+ "..."
         if bad_meta: continue
         node_list = xml_dom.findall('server')
         if len(node_list): 
@@ -151,9 +153,6 @@
                 n.set('meta',meta)
                 end_point = str(address) + ":" + str(port)
                 if return_hash.has_key(end_point):
-                    print end_point
-                    print n
-                    
                     if META_DEBUG: print "Replacing duplicate server entry at " + end_point
                 return_hash[end_point] = n
     server_list = Element('servers')
@@ -363,9 +362,9 @@
                                         "act":"unregister"} )
             for path in getMetaServerList():
                 try: # this POSTS the request and returns the result
-                    etreeEl = get_server_dom(data, path.get('url'))
+                    etreeEl = get_server_dom(data, self.path)
                     if etreeEl.get("errmsg") != None:
-                        print "Error durring unregistration:  " + etreeEl.get("errmsg")
+                        print "Error durring unregistration:  " +etreeEl.get("errmsg")
                 except Exception, e:
                     if META_DEBUG: print "Problem talking to Meta.  Will go ahead and die, letting Meta remove us."
                     if META_DEBUG: print e
@@ -448,7 +447,7 @@
             if etreeEl != None:
                 #  If there's an error, echo it to the console
                 if etreeEl.get("errmsg") != None:
-                    print "Error durring registration at: " +path.get('url')+ " Error: " +etreeEl.get("errmsg")
+                    print "Error durring registration at: " +self.path+ " Error: " +etreeEl.get("errmsg")
                     if META_DEBUG: print data
                     if META_DEBUG: print
                 """
--- a/orpg/orpg_version.py	Wed Jun 16 03:11:55 2010 -0500
+++ b/orpg/orpg_version.py	Sat Jun 19 10:17:24 2010 -0500
@@ -4,7 +4,7 @@
 #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed)
 DISTRO = "Traipse Beta"
 DIS_VER = "Ornery Orc"
-BUILD = "100616-01"
+BUILD = "100619-00"
 
 # This version is for network capability.
 PROTOCOL_VERSION = "1.2"
--- a/orpg/tools/InterParse.py	Wed Jun 16 03:11:55 2010 -0500
+++ b/orpg/tools/InterParse.py	Sat Jun 19 10:17:24 2010 -0500
@@ -48,8 +48,8 @@
         'Nodes now parse through ParsLogic. Easily add new parse rules right here!!'
         s = self.NameSpaceE(s)
         s = self.NameSpaceI(s, node)
-        s = self.NodeMap(s, node)
-        s = self.NodeParent(s, node)
+        #s = self.NodeMap(s, node)
+        #s = self.NodeParent(s, node)
         return s
 
     def Normalize(self, s, tab):
@@ -158,7 +158,13 @@
         anyone. Using !" :: "! will allow you to use an internal namespace from within another internal 
         namespace -- TaS, Prof. Ebral"""
         reg2 = re.compile("(!=(.*?)=!)")
-        matches = reg1.findall(s) + reg2.findall(s)
+        """Adding the Parent and Child references to Namespace Internal. Namespace 2.0 is powerful enough it
+        should be able to handle them with no problem. For future reference, if you are paying attention, Namespace
+        will include two methods for Internal and External. !@ :: @! and !& :: @! for External and !" :: "! and != :: =!
+        for Internal. See above Easter Egg for reasoning."""
+        reg3 = re.compile("(!!(.*?)!!)")
+        reg4 = re.compile("(!#(.*?)#!)")
+        matches = reg1.findall(s) + reg2.findall(s) + reg3.findall(s) + reg4.findall(s)
         try: tree_map = node.get('map')
         except: return node
         for i in xrange(0,len(matches)):
@@ -169,8 +175,9 @@
             node = self.get_node(new_map)
             newstr = self.LocationCheck(node, tree_map, new_map, find)
             s = s.replace(matches[i][0], newstr, 1)
-            s = self.NodeMap(s, node)
-            s = self.NodeParent(s, node)
+            s = s.replace(u'\xa0', ' ')
+            #s = self.NodeMap(s, node)
+            #s = self.NodeParent(s, node)
         return s
 
     def NameSpaceE(self, s):
@@ -206,6 +213,7 @@
                             else: break
             if not newstr: newstr = 'Invalid Reference!'
             s = s.replace(matches[i][0], newstr, 1)
+            s = s.replace(u'\xa0', ' ') #Required for XSLT sheets
             s = self.ParseLogic(s, node)
         return s
 
@@ -226,11 +234,12 @@
         matches = reg.findall(s)
         for i in xrange(0,len(matches)):
             tree_map = node.get('map')
-            tree_map = tree_map + '::' + matches[i][1]
-            newstr = '!@'+ tree_map +'@!'
+            tree_map = str(tree_map + '::' + matches[i][1])
+            if tree_map[:2] == '::': tree_map = tree_map[2:]
+            newstr = '!@'+ str(tree_map) +'@!'
             s = s.replace(matches[i][0], newstr, 1)
             s = self.Node(s)
-            s = self.NodeParent(s, tree_map)
+            s = self.NodeParent(s, node)
         return s
 
     def NodeParent(self, s, node):