# HG changeset patch # User sirebral # Date 1250598875 18000 # Node ID c5bc2abaf7f8c1b4aa9b97d45c3217c82486d35d # Parent c54768cffbd4e3bc98b1d6bf4d6e127a949b88f6 Traipse Dev 'OpenRPG' {090818-01} 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: *Stable* This is the first wave of Code Refinement updates. Includes new material from Core Beta; new debugger material (partially implemented), beginnings of switch to etree, TerminalWriter, and a little more. open_rpg has been renamed to component; functioning now as component.get(), component.add(), component.delete(). Fixes nodehandlers to bring the dev back to a stable push. Known issue with a nodehandler and it's sub dialogs. diff -r c54768cffbd4 -r c5bc2abaf7f8 orpg/gametree/nodehandlers/StarWarsd20.py --- a/orpg/gametree/nodehandlers/StarWarsd20.py Tue Aug 18 06:33:37 2009 -0500 +++ b/orpg/gametree/nodehandlers/StarWarsd20.py Tue Aug 18 07:34:35 2009 -0500 @@ -127,7 +127,7 @@ def on_version(self,old_version): node_handler.on_version(self,old_version) if old_version == "": - tmp = open(orpg.dirpath.dir_struct["nodes"]+"StarWars_d20character.xml","r") + tmp = open(dir_struct["nodes"]+"StarWars_d20character.xml","r") xml_dom = parseXml_with_dlg(self.tree,tmp.read()) xml_dom = xml_dom._get_firstChild() tmp.close() @@ -212,7 +212,7 @@ return html_str def about(self): - html_str = "
d20 Character Tool v0.7 beta" + html_str = "
d20 Character Tool v0.7 beta" html_str += "
by Chris Davis
chris@rpgarchive.com" return html_str @@ -267,7 +267,7 @@ def about(self): - html_str = "
d20 Character Tool v0.7 beta" + html_str = "
d20 Character Tool v0.7 beta" html_str += "
by Chris Davis
chris@rpgarchive.com" return html_str @@ -305,7 +305,7 @@ if self.myeditor == None or self.myeditor.destroyed: title = self.master_dom.getAttribute('name') + " Editor" # Frame created in correctly. - self.myeditor = wx.Frame(self.frame,title,orpg.dirpath.dir_struct["icon"]+'grid.ico') + self.myeditor = wx.Frame(self.frame,title,dir_struct["icon"]+'grid.ico') wnd = self.get_design_panel(self.myeditor) self.myeditor.panel = wnd self.wnd = wnd @@ -558,7 +558,7 @@ n_list = self.master_dom._get_childNodes() html_str = "
General Information
" for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) html_str += ""+n._get_tagName().capitalize() +": " html_str += t_node._get_nodeValue() + ", " html_str = html_str[:len(html_str)-2] + "
" @@ -569,7 +569,7 @@ def get_char_name( self ): node = self.master_dom.getElementsByTagName( 'name' )[0] - t_node = safe_get_text_node( node ) + t_node = component.get('xml').safe_get_text_node( node ) return t_node._get_nodeValue() @@ -652,7 +652,7 @@ n_list = self.master_dom._get_childNodes() html_str = "
General Information
" for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) html_str += ""+n._get_tagName().capitalize() +": " html_str += t_node._get_nodeValue() + "
" html_str = html_str[:len(html_str)-2] + "
" @@ -663,7 +663,7 @@ def get_char_name( self ): node = self.master_dom.getElementsByTagName( 'name' )[0] - t_node = safe_get_text_node( node ) + t_node = component.get('xml').safe_get_text_node( node ) return t_node._get_nodeValue() class SWd20hp(SWd20_char_child): @@ -1004,7 +1004,7 @@ self.master_dom = handler.master_dom n_list = self.master_dom._get_childNodes() for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) self.sizer.AddMany([ (wx.StaticText(self, -1, t_node._get_nodeValue()), 0, wx.ALIGN_CENTER_VERTICAL), ]) self.sizer.AddGrowableCol(1) @@ -1143,7 +1143,7 @@ if row==0: self.handler.on_name_change(value) def refresh_row(self,rowi): - t_node = safe_get_text_node(self.n_list[rowi]) + t_node = component.get('xml').safe_get_text_node(self.n_list[rowi]) self.SetCellValue(rowi,0,self.n_list[rowi]._get_tagName()) self.SetReadOnly(rowi,0) self.SetCellValue(rowi,1,t_node._get_nodeValue()) @@ -1183,7 +1183,7 @@ if row==0: self.handler.on_name_change(value) def refresh_row(self,rowi): - t_node = safe_get_text_node(self.n_list[rowi]) + t_node = component.get('xml').safe_get_text_node(self.n_list[rowi]) self.SetCellValue(rowi,0,self.n_list[rowi]._get_tagName()) self.SetReadOnly(rowi,0) self.SetCellValue(rowi,1,t_node._get_nodeValue()) @@ -1439,7 +1439,7 @@ def on_add(self,evt): if not self.temp_dom: - tmp = open(orpg.dirpath.dir_struct["SWd20"]+"d20feats.xml","r") + tmp = open(dir_struct["SWd20"]+"d20feats.xml","r") xml_dom = parseXml_with_dlg(self,tmp.read()) xml_dom = xml_dom._get_firstChild() tmp.close() @@ -1609,7 +1609,7 @@ def on_add(self,evt): if not self.temp_dom: - tmp = open(orpg.dirpath.dir_struct["SWd20"]+"d20weapons.xml","r") + tmp = open(dir_struct["SWd20"]+"d20weapons.xml","r") xml_dom = parseXml_with_dlg(self,tmp.read()) xml_dom = xml_dom._get_firstChild() tmp.close() @@ -1724,7 +1724,7 @@ def on_add(self,evt): if not self.temp_dom: - tmp = open(orpg.dirpath.dir_struct["SWd20"]+"d20armor.xml","r") + tmp = open(dir_struct["SWd20"]+"d20armor.xml","r") xml_dom = parseXml_with_dlg(self,tmp.read()) xml_dom = xml_dom._get_firstChild() tmp.close() @@ -1811,7 +1811,7 @@ def on_add(self,evt): if not self.temp_dom: - tmp = open(orpg.dirpath.dir_struct["SWd20"]+"SWd20classes.xml","r") + tmp = open(dir_struct["SWd20"]+"SWd20classes.xml","r") xml_dom = parseXml_with_dlg(self,tmp.read()) xml_dom = xml_dom._get_firstChild() tmp.close() diff -r c54768cffbd4 -r c5bc2abaf7f8 orpg/gametree/nodehandlers/chatmacro.py --- a/orpg/gametree/nodehandlers/chatmacro.py Tue Aug 18 06:33:37 2009 -0500 +++ b/orpg/gametree/nodehandlers/chatmacro.py Tue Aug 18 07:34:35 2009 -0500 @@ -42,7 +42,7 @@ def __init__(self,xml_dom,tree_node): node_handler.__init__(self,xml_dom,tree_node) self.text_elem = self.master_dom.getElementsByTagName('text')[0] - self.text = safe_get_text_node(self.text_elem) + self.text = component.get('xml').safe_get_text_node(self.text_elem) def set_text(self,txt): self.text._set_nodeValue(txt) diff -r c54768cffbd4 -r c5bc2abaf7f8 orpg/gametree/nodehandlers/d20.py --- a/orpg/gametree/nodehandlers/d20.py Tue Aug 18 06:33:37 2009 -0500 +++ b/orpg/gametree/nodehandlers/d20.py Tue Aug 18 07:34:35 2009 -0500 @@ -573,7 +573,7 @@ n_list = self.master_dom._get_childNodes() html_str = "
General Information
" for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) html_str += ""+n._get_tagName().capitalize() +": " html_str += t_node._get_nodeValue() + ", " html_str = html_str[:len(html_str)-2] + "
" @@ -584,7 +584,7 @@ def get_char_name( self ): node = self.master_dom.getElementsByTagName( 'name' )[0] - t_node = safe_get_text_node( node ) + t_node = component.get('xml').safe_get_text_node( node ) return t_node._get_nodeValue() @@ -714,7 +714,7 @@ created by d20char_handler. """ def __init__(self,xml_dom,tree_node,parent): - d20_char_child.__init__(self,xml_dom,tree_node,openrpg,parent) + d20_char_child.__init__(self,xml_dom,tree_node,component,parent) node_list = self.master_dom.getElementsByTagName( 'gift' ) self.spells = {} tree = self.tree @@ -903,7 +903,7 @@ n_list = self.master_dom._get_childNodes() html_str = "
General Information
" for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) html_str += ""+n._get_tagName().capitalize() +": " html_str += t_node._get_nodeValue() + "
" html_str = html_str[:len(html_str)-2] + "
" @@ -914,7 +914,7 @@ def get_char_name( self ): node = self.master_dom.getElementsByTagName( 'name' )[0] - t_node = safe_get_text_node( node ) + t_node = component.get('xml').safe_get_text_node( node ) return t_node._get_nodeValue() class d20hp(d20_char_child): @@ -1302,7 +1302,7 @@ self.master_dom = handler.master_dom n_list = self.master_dom._get_childNodes() for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) self.sizer.AddMany([ (wx.StaticText(self, -1, t_node._get_nodeValue()), 0, wx.ALIGN_CENTER_VERTICAL), ]) self.sizer.AddGrowableCol(1) @@ -1411,7 +1411,7 @@ if row==0: self.handler.on_name_change(value) def refresh_row(self,rowi): - t_node = safe_get_text_node(self.n_list[rowi]) + t_node = component.get('xml').safe_get_text_node(self.n_list[rowi]) self.SetCellValue(rowi,0,self.n_list[rowi]._get_tagName()) self.SetReadOnly(rowi,0) self.SetCellValue(rowi,1,t_node._get_nodeValue()) @@ -1451,7 +1451,7 @@ if row==0: self.handler.on_name_change(value) def refresh_row(self,rowi): - t_node = safe_get_text_node(self.n_list[rowi]) + t_node = component.get('xml').safe_get_text_node(self.n_list[rowi]) self.SetCellValue(rowi,0,self.n_list[rowi]._get_tagName()) self.SetReadOnly(rowi,0) self.SetCellValue(rowi,1,t_node._get_nodeValue()) diff -r c54768cffbd4 -r c5bc2abaf7f8 orpg/gametree/nodehandlers/dnd35.py --- a/orpg/gametree/nodehandlers/dnd35.py Tue Aug 18 06:33:37 2009 -0500 +++ b/orpg/gametree/nodehandlers/dnd35.py Tue Aug 18 07:34:35 2009 -0500 @@ -169,7 +169,7 @@ n_list = self.master_dom._get_childNodes() html_str = "
General Information
" for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) html_str += ""+n._get_tagName().capitalize() +": " html_str += t_node._get_nodeValue() + ", " html_str = html_str[:len(html_str)-2] + "
" @@ -183,7 +183,7 @@ def get_char_name( self ): node = self.master_dom.getElementsByTagName( 'name' )[0] - t_node = safe_get_text_node( node ) + t_node = component.get('xml').safe_get_text_node( node ) return t_node._get_nodeValue() class gen_grid(wx.grid.Grid): @@ -218,7 +218,7 @@ #self.AutoSizeColumn(1) def refresh_row(self,rowi): - t_node = safe_get_text_node(self.n_list[rowi]) + t_node = component.get('xml').safe_get_text_node(self.n_list[rowi]) self.SetCellValue(rowi,0,self.n_list[rowi]._get_tagName()) self.SetReadOnly(rowi,0) @@ -244,7 +244,7 @@ n_list = self.master_dom._get_childNodes() html_str = "
Inventory
" for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) html_str += ""+n._get_tagName().capitalize() +": " html_str += t_node._get_nodeValue() + "
" html_str = html_str[:len(html_str)-2] + "
" @@ -316,12 +316,12 @@ for node in self.n_list: if node._get_tagName() == nodeName: - t_node = safe_get_text_node(node) + t_node = component.get('xml').safe_get_text_node(node) t_node._set_nodeValue(value) def saveMoney(self, row, col): value = self.grid.GetCellValue(row, col) - t_node = safe_get_text_node(self.n_list[row]) + t_node = component.get('xml').safe_get_text_node(self.n_list[row]) t_node._set_nodeValue(value) def on_cell_change(self, evt): @@ -333,7 +333,7 @@ def refresh_row(self, row): - t_node = safe_get_text_node(self.n_list[row]) + t_node = component.get('xml').safe_get_text_node(self.n_list[row]) tagname = self.n_list[row]._get_tagName() value = t_node._get_nodeValue() if tagname == 'Gear': diff -r c54768cffbd4 -r c5bc2abaf7f8 orpg/gametree/nodehandlers/dnd3e.py --- a/orpg/gametree/nodehandlers/dnd3e.py Tue Aug 18 06:33:37 2009 -0500 +++ b/orpg/gametree/nodehandlers/dnd3e.py Tue Aug 18 07:34:35 2009 -0500 @@ -387,7 +387,7 @@ self.master_dom = handler.master_dom n_list = self.master_dom._get_childNodes() for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) self.sizer.Add(wx.StaticText(self, -1, t_node._get_nodeValue()), 1, wx.EXPAND) self.SetSizer(self.sizer) self.SetAutoLayout(True) @@ -413,7 +413,7 @@ n_list = self.master_dom._get_childNodes() html_str = "
General Information
" for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) html_str += ""+n._get_tagName().capitalize() +": " html_str += t_node._get_nodeValue() + ", " html_str = html_str[:len(html_str)-2] + "
" @@ -427,7 +427,7 @@ def get_char_name( self ): node = self.master_dom.getElementsByTagName( 'name' )[0] - t_node = safe_get_text_node( node ) + t_node = component.get('xml').safe_get_text_node( node ) return t_node._get_nodeValue() class gen_grid(wx.grid.Grid): @@ -462,7 +462,7 @@ #self.AutoSizeColumn(1) def refresh_row(self,rowi): - t_node = safe_get_text_node(self.n_list[rowi]) + t_node = component.get('xml').safe_get_text_node(self.n_list[rowi]) self.SetCellValue(rowi,0,self.n_list[rowi]._get_tagName()) self.SetReadOnly(rowi,0) @@ -488,7 +488,7 @@ n_list = self.master_dom._get_childNodes() html_str = "
General Information
" for n in n_list: - t_node = safe_get_text_node(n) + t_node = component.get('xml').safe_get_text_node(n) html_str += ""+n._get_tagName().capitalize() +": " html_str += t_node._get_nodeValue() + "
" html_str = html_str[:len(html_str)-2] + "
" @@ -560,12 +560,12 @@ for node in self.n_list: if node._get_tagName() == nodeName: - t_node = safe_get_text_node(node) + t_node = component.get('xml').safe_get_text_node(node) t_node._set_nodeValue(value) def saveMoney(self, row, col): value = self.grid.GetCellValue(row, col) - t_node = safe_get_text_node(self.n_list[row]) + t_node = component.get('xml').safe_get_text_node(self.n_list[row]) t_node._set_nodeValue(value) def on_cell_change(self, evt): @@ -577,7 +577,7 @@ def refresh_row(self, row): - t_node = safe_get_text_node(self.n_list[row]) + t_node = component.get('xml').safe_get_text_node(self.n_list[row]) tagname = self.n_list[row]._get_tagName() value = t_node._get_nodeValue() if tagname == 'Gear': diff -r c54768cffbd4 -r c5bc2abaf7f8 orpg/orpg_version.py --- a/orpg/orpg_version.py Tue Aug 18 06:33:37 2009 -0500 +++ b/orpg/orpg_version.py Tue Aug 18 07:34:35 2009 -0500 @@ -4,7 +4,7 @@ #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed) DISTRO = "Traipse Dev" DIS_VER = "Ornery Orc" -BUILD = "090818-00" +BUILD = "090818-01" # This version is for network capability. PROTOCOL_VERSION = "1.2" diff -r c54768cffbd4 -r c5bc2abaf7f8 orpg/orpg_windows.py --- a/orpg/orpg_windows.py Tue Aug 18 06:33:37 2009 -0500 +++ b/orpg/orpg_windows.py Tue Aug 18 07:34:35 2009 -0500 @@ -31,7 +31,6 @@ from orpg.orpg_wx import * from orpg.orpgCore import * import orpg.tools.rgbhex -import orpg.orpg_xml from orpg.dirpath import dir_struct from orpg.tools.metamenus import MenuEx @@ -620,7 +619,7 @@ "Parse xml with progress dialog" dlg = do_progress_dlg(parent,"XML Parser","Reading Configuration Files...",2) #dlg.Update(1) - doc = orpg.orpg_xml.parseXml(s) + doc = component.get('xml').parseXml(s) dlg.Update(1,"Done.") dlg.Destroy() return doc