comparison orpg/mapper/base_msg.py @ 152:6081bdc2b8d5 beta

Traipse Beta 'OpenRPG' {091125-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) 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 Gametree Recursion method, mapping, and context sensitivity. !Infinite Loops return error instead of freezing the software! New Syntax added for custom PC sheets Tip of the Day added, from Core and community Fixed Whiteboard ID to prevent random line or text deleting. Modified ID's to prevent non updated clients from ruining the fix.
author sirebral
date Wed, 25 Nov 2009 06:16:35 -0600
parents e842a5f1b775
children dcae32e219f1
comparison
equal deleted inserted replaced
150:6c5f46a5924b 152:6081bdc2b8d5
105 else: 105 else:
106 self.p_lock.release() 106 self.p_lock.release()
107 return None 107 return None
108 108
109 # Access multiple properties 109 # Access multiple properties
110
111 def init_props(self,props): # same as init_prop(), but takes dictionary of props 110 def init_props(self,props): # same as init_prop(), but takes dictionary of props
112 self.p_lock.acquire() 111 self.p_lock.acquire()
113 for k in props.keys(): self._props[k] = (props[k],0) 112 for k in props.keys(): self._props[k] = (props[k],0)
114 self.p_lock.release() 113 self.p_lock.release()
115 114
118 for k in props.keys(): self._props[k] = (props[k],1) 117 for k in props.keys(): self._props[k] = (props[k],1)
119 self.p_lock.release() 118 self.p_lock.release()
120 119
121 def get_all_props(self): # returns dictionary of all properties, regardless of change 120 def get_all_props(self): # returns dictionary of all properties, regardless of change
122 self.p_lock.acquire() 121 self.p_lock.acquire()
123
124 result = {} 122 result = {}
125 for k in self._props.keys(): 123 for k in self._props.keys():
126 (p,c) = self._props[k] 124 (p,c) = self._props[k]
127 result[k] = p 125 result[k] = p
128
129 self.p_lock.release() 126 self.p_lock.release()
130 return result 127 return result
131 128
132 def get_changed_props(self): # returns dictionary of all properties that have been changed 129 def get_changed_props(self): # returns dictionary of all properties that have been changed
133 self.p_lock.acquire() 130 self.p_lock.acquire()
199 def _from_dom(self,xml_dom,prop_func): 196 def _from_dom(self,xml_dom,prop_func):
200 self.p_lock.acquire() 197 self.p_lock.acquire()
201 if iselement(xml_dom): ## Uses new Element Tree style 198 if iselement(xml_dom): ## Uses new Element Tree style
202 if xml_dom.tag == self.tagname: 199 if xml_dom.tag == self.tagname:
203 if xml_dom.attrib: 200 if xml_dom.attrib:
204 for k in xml_dom.attrib: 201 for k in xml_dom.attrib: prop_func(k,xml_dom.get(k))
205 prop_func(k,xml_dom.get(k))
206 elif not iselement(xml_dom): ## Uses old DOM style (deprecated!!) 202 elif not iselement(xml_dom): ## Uses old DOM style (deprecated!!)
207 if xml_dom.tagName == self.tagname: 203 if xml_dom.tagName == self.tagname:
208 if xml_dom.getAttributeKeys(): 204 if xml_dom.getAttributeKeys():
209 for k in xml_dom.getAttributeKeys(): 205 for k in xml_dom.getAttributeKeys(): prop_func(k,xml_dom.getAttribute(k))
210 prop_func(k,xml_dom.getAttribute(k))
211 else: 206 else:
212 self.p_lock.release() 207 self.p_lock.release()
213 raise Exception, "Error attempting to modify a " + self.tagname + " from a non-<" + self.tagname + "/> element" 208 raise Exception, "Error attempting to modify a " + self.tagname + " from a non-<" + self.tagname + "/> element"
214 self.p_lock.release() 209 self.p_lock.release()
215 210