# HG changeset patch
# User sirebral
# Date 1257044875 18000
# Node ID 36919b8a3ef9a62a6f7a657e06cc9f09f0130426
# Parent 496dbf12a6cb4e7aa1443e9bcbe8dbe6adc2bd17
Traipse Alpha 'OpenRPG' {091031-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
Mercurial's hgweb folder is ported to upmana
Happy Halloween!
diff -r 496dbf12a6cb -r 36919b8a3ef9 orpg/mapper/background_msg.py
--- a/orpg/mapper/background_msg.py Fri Oct 30 22:21:40 2009 -0500
+++ b/orpg/mapper/background_msg.py Sat Oct 31 22:07:55 2009 -0500
@@ -27,7 +27,8 @@
#
__version__ = "$Id: background_msg.py,v 1.8 2006/11/04 21:24:21 digitalxero Exp $"
-from base_msg import *
+from base_msg import map_element_msg_base
+from xml.etree.ElementTree import ElementTree
class bg_msg(map_element_msg_base):
diff -r 496dbf12a6cb -r 36919b8a3ef9 orpg/mapper/base_msg.py
--- a/orpg/mapper/base_msg.py Fri Oct 30 22:21:40 2009 -0500
+++ b/orpg/mapper/base_msg.py Sat Oct 31 22:07:55 2009 -0500
@@ -30,15 +30,15 @@
from threading import RLock
from orpg.networking.mplay_client import *
-from xml.etree.ElementTree import XML
+from xml.etree.ElementTree import XML, fromstring, parse
class map_element_msg_base:
# This is a base class
def __init__(self,reentrant_lock_object = None):
- if not hasattr(self,"tagname"):
- raise Exception, "This is a virtual class that cannot be directly instantiated. Set self.tagname in derived class."
+ if not self.tagname:
+ raise Exception, "This is a virtual class that cannot be directly instantiated. Set self.tagname in derived class."; exit()
self._props = {}
# This is a dictionary that holds (value,changed) 2-tuples, indexed by attribute
@@ -202,36 +202,33 @@
if xml.tag == self.tagname:
if xml.keys():
for k in xml.keys():
- prop_func(k,xml.get(k))
+ prop_func(k, xml.get(k))
else:
self.p_lock.release()
raise Exception, "Error attempting to modify a " + self.tagname + " from a non-<" + self.tagname + "/> element"
self.p_lock.release()
- def init_from_dom(self,xml):
+ def init_from_dom(self, xml):
# xml must be pointing to an empty tag. Override in a derived class for and other similar tags.
self._from_dom(xml,self.init_prop)
- def set_from_dom(self,xml):
+ def set_from_dom(self, xml):
# xml must be pointing to an empty tag. Override in a derived class for and other similar tags
- self._from_dom(xml,self.set_prop)
+ self._from_dom(xml, self.set_prop)
- def init_from_xml(self,xmlString):
- tree = XML(xmlString)
+ def init_from_xml(self, tree):
+ #tree = XML(xmlString)
node_list = tree.findall(self.tagname)
- if len(node_list) < 1:
- print "Warning: no <" + self.tagname + "/> elements found in DOM."
+ if len(node_list) < 1: print "Warning: no <" + self.tagname + "/> elements found in DOM."
else:
while len(node_list):
self.init_from_dom(node_list.pop())
- def set_from_xml(self,xmlString):
- tree = XML(xmlString)
+ def set_from_xml(self, tree):
+ #tree = XML(xmlString)
node_list = tree.findall(self.tagname)
- if len(node_list) < 1:
- print "Warning: no <" + self.tagname + "/> elements found in DOM."
+ if len(node_list) < 1: print "Warning: no <" + self.tagname + "/> elements found in DOM."
else:
- while len(node_list):
- self.set_from_dom(node_list.pop())
+ while len(node_list): self.set_from_dom(node_list.pop())
# XML importers end
#########################################
diff -r 496dbf12a6cb -r 36919b8a3ef9 orpg/mapper/fog_msg.py
--- a/orpg/mapper/fog_msg.py Fri Oct 30 22:21:40 2009 -0500
+++ b/orpg/mapper/fog_msg.py Sat Oct 31 22:07:55 2009 -0500
@@ -27,13 +27,14 @@
from base_msg import *
from region import *
-from orpg.minidom import Element
+#from orpg.minidom import Element
import string
+from xml.etree.ElementTree import ElementTree
class fog_msg(map_element_msg_base):
def __init__(self,reentrant_lock_object = None):
- self.tagname = "fog"
+ self.tag = "fog"
map_element_msg_base.__init__(self,reentrant_lock_object)
self.use_fog = 0
self.fogregion=IRegion()
@@ -41,16 +42,16 @@
def get_line(self,outline,action,output_act):
elem = Element( "poly" )
- if ( output_act ): elem.setAttribute( "action", action )
- if ( outline == 'all' ) or ( outline == 'none' ): elem.setAttribute( "outline", outline )
+ if ( output_act ): elem.set( "action", action )
+ if ( outline == 'all' ) or ( outline == 'none' ): elem.set( "outline", outline )
else:
- elem.setAttribute( "outline", "points" )
+ elem.set( "outline", "points" )
for pair in string.split( outline, ";" ):
p = string.split( pair, "," )
point = Element( "point" )
- point.setAttribute( "x", p[ 0 ] )
- point.setAttribute( "y", p[ 1 ] )
- elem.appendChild( point )
+ point.set( "x", p[ 0 ] )
+ point.set( "y", p[ 1 ] )
+ elem.append( point )
str = elem.toxml()
elem.unlink()
return str
@@ -94,11 +95,11 @@
def interpret_dom(self,xml_dom):
self.use_fog=1
#print 'fog_msg.interpret_dom called'
- children = xml_dom._get_childNodes()
+ children = xml_dom.getchildren()
#print "children",children
for l in children:
- action = l.getAttribute("action")
- outline = l.getAttribute("outline")
+ action = l.get("action")
+ outline = l.get("outline")
#print "action/outline",action, outline
if (outline=="all"):
polyline=[]
@@ -109,9 +110,9 @@
self.fogregion.Clear()
else:
polyline=[]
- list = l._get_childNodes()
+ list = l.getchildren()
for node in list:
- polyline.append( IPoint().make( int(node.getAttribute("x")), int(node.getAttribute("y")) ) )
+ polyline.append( IPoint().make( int(node.get("x")), int(node.get("y")) ) )
# pointarray = outline.split(";")
# for m in range(len(pointarray)):
# pt=pointarray[m].split(",")
diff -r 496dbf12a6cb -r 36919b8a3ef9 orpg/mapper/grid_msg.py
--- a/orpg/mapper/grid_msg.py Fri Oct 30 22:21:40 2009 -0500
+++ b/orpg/mapper/grid_msg.py Sat Oct 31 22:07:55 2009 -0500
@@ -30,8 +30,10 @@
from base_msg import map_element_msg_base
#from base_msg import * ## ?? import all? Deprecated!?
+from xml.etree.ElementTree import ElementTree
+
class grid_msg(map_element_msg_base):
def __init__(self,reentrant_lock_object = None):
self.tagname = "grid"
- map_element_msg_base.__init__(self,reentrant_lock_object)
+ map_element_msg_base.__init__(self, reentrant_lock_object)
diff -r 496dbf12a6cb -r 36919b8a3ef9 orpg/mapper/map_msg.py
--- a/orpg/mapper/map_msg.py Fri Oct 30 22:21:40 2009 -0500
+++ b/orpg/mapper/map_msg.py Sat Oct 31 22:07:55 2009 -0500
@@ -27,13 +27,18 @@
#
__version__ = "$Id: map_msg.py,v 1.16 2007/03/09 14:11:55 digitalxero Exp $"
-#from base import *
+from base import *
from base_msg import *
from background_msg import *
from grid_msg import *
from miniatures_msg import *
from whiteboard_msg import *
from fog_msg import *
+import traceback
+from orpg.dirpath import dir_struct
+
+from xml.etree.ElementTree import ElementTree, Element, iselement
+from xml.etree.ElementTree import fromstring, tostring, parse
"""