comparison orpg/gametree/gametree.py @ 119:9314d63c0941 alpha

Traipse Alpha 'OpenRPG' {091029-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: Adds Bookmarks (Alpha) with cool Smiley Star and Plus Symbol images! Changes made to the map for increased portability. SnowDog has changes planned in Core, though. Added an initial push to the BCG. Not much to see, just shows off how it is re-writing Main code. Fix to remote admin commands Minor fix to texted based server, works in /System/ folder Some Core changes to gametree to correctly disply Pretty Print, thanks David! Fix to Splitter Nodes not being created. Added images to Plugin Control panel for Autostart feature Fix to massive amounts of images loading; from Core fix to gsclient so with_statement imports Added 'boot' command to remote admin Prep work in Pass tool for remote admin rankings and different passwords, ei, Server, Admin, Moderator, etc. Remote Admin Commands more organized, more prep work. Added Confirmation window for sent nodes. Minor changes to allow for portability to an OpenSUSE linux OS (hopefully without breaking) {091028} 00: Made changes to gametree to start working with Element Tree, mostly from Core Minor changes to Map to start working with Element Tree, from Core Preliminary changes to map efficiency, from FlexiRPG Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG Changes to main.py to start working with Element Tree {091029} 00: Changes made to server to start working with Element Tree. Changes made to Meta Server Lib. Prepping test work for a multi meta network page. Minor bug fixed with mini to gametree Zoom Mouse plugin added. Known Issue: Disconnecting causes an server side error. XML data is not being passed correctly.
author sirebral
date Thu, 29 Oct 2009 20:35:28 -0500
parents 217fb049bd00
children ed4c3606ad1f
comparison
equal deleted inserted replaced
118:217fb049bd00 119:9314d63c0941
175 evt.Skip() 175 evt.Skip()
176 176
177 @debugging 177 @debugging
178 def on_char(self, evt): 178 def on_char(self, evt):
179 key_code = evt.GetKeyCode() 179 key_code = evt.GetKeyCode()
180 curSelection = self.GetSelection() # Get the current selection 180 curSelection = self.GetSelection() # Get the current selection
181 if evt.ShiftDown() and ((key_code == wx.WXK_UP) or (key_code == wx.WXK_DOWN)) and not self.dragging: 181 if evt.ShiftDown() and ((key_code == wx.WXK_UP) or (key_code == wx.WXK_DOWN)) and not self.dragging:
182 curSelection = self.GetSelection() 182 curSelection = self.GetSelection()
183 obj = self.GetPyData(curSelection) 183 obj = self.GetPyData(curSelection)
184 self.SelectItem(curSelection) 184 self.SelectItem(curSelection)
185 if(isinstance(obj,core.node_handler)): 185 if(isinstance(obj,core.node_handler)):
236 self.xml_root = tree.getroot() 236 self.xml_root = tree.getroot()
237 except: 237 except:
238 f.close() 238 f.close()
239 self.xml_root = None 239 self.xml_root = None
240 ### Alpha ### Doing some work on Gametree to add Element Tree, slowly at first. 240 ### Alpha ### Doing some work on Gametree to add Element Tree, slowly at first.
241
242 try:
243 logger.info("Reading Gametree file: " + filename + "...", True)
244 xml_doc = xml.parseXml(tostring(self.xml_root))
245 if xml_doc == None: pass
246 else: xml_dom = xml_doc._get_documentElement()
247 logger.info("done.", True)
248 except: pass
249 241
250 if not self.xml_root: 242 if not self.xml_root:
251 os.rename(filename,filename+".corrupt") 243 os.rename(filename,filename+".corrupt")
252 emsg = "Your gametree is being regenerated.\n\n"\ 244 emsg = "Your gametree is being regenerated.\n\n"\
253 "To salvage a recent version of your gametree\n"\ 245 "To salvage a recent version of your gametree\n"\