Mercurial > traipse_dev
changeset 142:2345c12d93a7 beta
Traipse Beta 'OpenRPG' {091123-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 (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 | Mon, 23 Nov 2009 12:20:51 -0600 |
parents | e842a5f1b775 |
children | 9babc183fa47 |
files | orpg/chat/chatwnd.py orpg/gametree/nodehandlers/forms.py orpg/main.py orpg/orpg_version.py orpg/tools/orpg_log.py upmana/updatemana.py |
diffstat | 6 files changed, 86 insertions(+), 146 deletions(-) [+] |
line wrap: on
line diff
--- a/orpg/chat/chatwnd.py Mon Nov 23 03:36:26 2009 -0600 +++ b/orpg/chat/chatwnd.py Mon Nov 23 12:20:51 2009 -0600 @@ -1882,8 +1882,8 @@ def resolve_cust_loop(self, node, path, step, depth): node_class = node.get('class') - if step == depth: - self.resolution(node) + ## Code needs clean up. Either choose .lower() or .title(), then reset the path list's content ## + if step == depth: self.resolution(node) ##Build Abilities dictionary## if node_class not in ('d20char_handler', "SWd20char_handler"): ab = node.find('character').find('abilities') else: ab = node.find('abilities') @@ -1936,12 +1936,12 @@ bonus_text = '(Melee)' bonus = node.find('attacks') bonus = bonus.find('melee') - bonus = bonus.attrib; d = 0 + bonus = bonus.attrib; d = int(pc_stats['Str'][1]) elif path[step+1].lower() == 'ranged' or path[step+1].lower() == 'r': bonus_text = '(Ranged)' bonus = node.find('attacks') bonus = bonus.find('ranged') - bonus = bonus.attrib; d = 0 + bonus = bonus.attrib; d = int(pc_stats['Dex'][1]) for b in bonus: d += int(bonus[b]) bonus = str(d) @@ -1953,10 +1953,10 @@ if path[step+2].lower() == child.get('name').lower(): self.data = '<b>Attack: '+bonus_text+'</b> '+child.get('name')+' [1d20+'+bonus+'] ' + 'Damage: ['+child.get('damage')+']' return - elif pc_stats.has_key(path[step]): - if step+1 == depth: self.data = pc_stats[path[step]][0] + ' +('+pc_stats[path[step]][1]+')' - elif path[step+1].lower() == 'mod': self.data = pc_stats[path[step]][1] - elif path[step+1].lower() == 'check': self.data = '<b>'+path[step]+' Check:</b> [1d20+'+str(pc_stats[path[step]][1])+']' + elif pc_stats.has_key(path[step].title()): + if step+1 == depth: self.data = pc_stats[path[step].title()][0] + ' +('+pc_stats[path[step].title()][1]+')' + elif path[step+1].title() == 'Mod': self.data = pc_stats[path[step].title()][1] + elif path[step+1].title() == 'Check': self.data = '<b>'+path[step].title()+' Check:</b> [1d20+'+str(pc_stats[path[step].title()][1])+']' return def resolution(self, node):
--- a/orpg/gametree/nodehandlers/forms.py Mon Nov 23 03:36:26 2009 -0600 +++ b/orpg/gametree/nodehandlers/forms.py Mon Nov 23 12:20:51 2009 -0600 @@ -381,10 +381,9 @@ node_handler.__init__(self,xml,tree_node) self.list = self.xml.find('list') self.options = self.list.findall('option') - if self.list.get("send_button") == "": - self.list.set("send_button","0") - if self.list.get("hide_title") == "": - self.list.set("hide_title","0") + if self.list.get("send_button") == "": self.list.set("send_button","0") + if self.list.get("hide_title") == "": self.list.set("hide_title","0") + if self.list.get("raw_mode") == "": self.list.set("raw_mode","0") def get_design_panel(self,parent): return listbox_edit_panel(parent,self) @@ -399,7 +398,10 @@ self.list.set("type",str(type)) def is_hide_title(self): - return int(self.list.get("hide_title", 0)) + return int(self.list.get("hide_title", 0)) + + def is_raw_send(self): + return int(self.list.get("raw_mode",0)) # single selection methods def get_selected_node(self): @@ -410,52 +412,43 @@ def get_selected_index(self): i = 0 for opt in self.options: - if opt.get("selected") == "1": - return i + if opt.get("selected") == "1": return i i += 1 return 0 def get_selected_text(self): node = self.get_selected_node() - if node: - return node.text - else: - return "" - + if node: return node.text + else: return "" # mult selection methods def get_selections(self): opts = [] for opt in self.options: - if opt.get("selected") == "1": - opts.append(opt) + if opt.get("selected") == "1": opts.append(opt) return opts def get_selections_text(self): opts = [] for opt in self.options: - if opt.get("selected") == "1": - opts.append(opt.text) + if opt.get("selected") == "1": opts.append(opt.text) return opts def get_selections_index(self): opts = [] i = 0 for opt in self.options: - if opt.get("selected") == "1": - opts.append(i) + if opt.get("selected") == "1": opts.append(i) i += 1 return opts # setting selection method def set_selected_node(self,index,selected=1): - if self.get_type() != L_CHECK: - self.clear_selections() + if self.get_type() != L_CHECK: self.clear_selections() self.options[index].set("selected", str(bool2int(selected))) def clear_selections(self): - for opt in self.options: - opt.set("selected","0") + for opt in self.options: opt.set("selected","0") # misc methods def get_options(self): @@ -498,7 +491,24 @@ return text def get_value(self): - return "\n".join(self.get_selections_text()) + return "\n".join(self.get_selections_text()) + + def on_send_to_chat(self, evt): + txt = self.get_selected_text() + txt = self.chat.ParseMap(txt, self.xml) + if not self.is_raw_send(): + self.chat.ParsePost(self.tohtml(), True, True) + return 1 + actionlist = self.get_selections_text() + for line in actionlist: + line = self.chat.ParseMap(line, self.xml) + if(line != ""): + if line[0] != "/": ## it's not a slash command + self.chat.ParsePost(line, True, True) + else: + action = line + self.chat.chat_cmds.docmd(action) + return 1 F_LIST = wx.NewId() @@ -520,25 +530,17 @@ if self.list.GetSize()[0] > 200: self.list.Destroy() self.list = wx.ComboBox(self, F_LIST, cur_opt, size=(200, -1), choices=opts, style=wx.CB_READONLY) - elif type == L_LIST: - self.list = wx.ListBox(self,F_LIST,choices=opts) - elif type == L_RADIO: - self.list = wx.RadioBox(self,F_LIST,label,choices=opts,majorDimension=3) + elif type == L_LIST: self.list = wx.ListBox(self,F_LIST,choices=opts) + elif type == L_RADIO: self.list = wx.RadioBox(self,F_LIST,label,choices=opts,majorDimension=3) elif type == L_CHECK: self.list = wx.CheckListBox(self,F_LIST,choices=opts) self.set_checks() for i in handler.get_selections_text(): - if type == L_DROP: - self.list.SetValue( i ) - else: - self.list.SetStringSelection( i ) - - if type == L_DROP: - sizer = wx.BoxSizer(wx.HORIZONTAL) - - else: - sizer = wx.BoxSizer(wx.VERTICAL) + if type == L_DROP: self.list.SetValue( i ) + else: self.list.SetStringSelection( i ) + if type == L_DROP: sizer = wx.BoxSizer(wx.HORIZONTAL) + else: sizer = wx.BoxSizer(wx.VERTICAL) if type != L_RADIO: sizer.Add(wx.StaticText(self, -1, label+": "), 0, wx.EXPAND) @@ -557,30 +559,20 @@ parent.SetSize(self.GetBestSize()) - if type == L_DROP: - self.Bind(wx.EVT_COMBOBOX, self.on_change, id=F_LIST) - elif type == L_LIST: - self.Bind(wx.EVT_LISTBOX, self.on_change, id=F_LIST) - elif type == L_RADIO: - self.Bind(wx.EVT_RADIOBOX, self.on_change, id=F_LIST) - elif type == L_CHECK: - self.Bind(wx.EVT_CHECKLISTBOX, self.on_check, id=F_LIST) - - + if type == L_DROP: self.Bind(wx.EVT_COMBOBOX, self.on_change, id=F_LIST) + elif type == L_LIST: self.Bind(wx.EVT_LISTBOX, self.on_change, id=F_LIST) + elif type == L_RADIO: self.Bind(wx.EVT_RADIOBOX, self.on_change, id=F_LIST) + elif type == L_CHECK:self.Bind(wx.EVT_CHECKLISTBOX, self.on_check, id=F_LIST) self.type = type - def on_change(self,evt): self.handler.set_selected_node(self.list.GetSelection()) def on_check(self,evt): - for i in xrange(self.list.GetCount()): - self.handler.set_selected_node(i, bool2int(self.list.IsChecked(i))) + for i in xrange(self.list.GetCount()): self.handler.set_selected_node(i, bool2int(self.list.IsChecked(i))) def set_checks(self): - for i in self.handler.get_selections_index(): - self.list.Check(i) - + for i in self.handler.get_selections_index(): self.list.Check(i) BUT_ADD = wx.NewId() @@ -604,7 +596,10 @@ self.type_radios.SetSelection(handler.get_type()) self.send_button = wx.CheckBox(self, F_SEND_BUTTON, " Send Button") - self.send_button.SetValue(handler.has_send_button()) + self.send_button.SetValue(handler.has_send_button()) + + self.raw_send = wx.CheckBox(self, F_RAW_SEND, " Send as Macro") + self.raw_send.SetValue(handler.is_raw_send()) self.hide_title = wx.CheckBox(self, F_NO_TITLE, " Hide Title") self.hide_title.SetValue(handler.is_hide_title()) @@ -622,7 +617,8 @@ sizer.Add(self.type_radios, 0, wx.EXPAND) sizer.Add(wx.Size(10,10)) sizer.Add(self.send_button, 0 , wx.EXPAND) - sizer.Add(self.hide_title, 0, wx.EXPAND) + sizer.Add(self.hide_title, 0, wx.EXPAND) + sizer.Add(self.raw_send, 0, wx.EXPAND) sizer.Add(wx.Size(10,10)) sizer.Add(wx.StaticText(self, -1, "Options:"), 0, wx.EXPAND) sizer.Add(self.listbox,1,wx.EXPAND); @@ -639,7 +635,8 @@ self.Bind(wx.EVT_BUTTON, self.on_add, id=BUT_ADD) self.Bind(wx.EVT_RADIOBOX, self.on_type, id=F_TYPE) self.Bind(wx.EVT_CHECKBOX, self.on_hide_button, id=F_NO_TITLE) - self.Bind(wx.EVT_CHECKBOX, self.on_send_button, id=F_SEND_BUTTON) + self.Bind(wx.EVT_CHECKBOX, self.on_send_button, id=F_SEND_BUTTON) + self.Bind(wx.EVT_CHECKBOX, self.on_raw_button, id=F_RAW_SEND) def on_type(self,evt): self.handler.set_type(evt.GetInt()) @@ -684,7 +681,10 @@ self.handler.list.set("send_button", str( bool2int(evt.Checked()) )) def on_hide_button(self,evt): - self.handler.list.set("hide_title", str( bool2int(evt.Checked()) )) + self.handler.list.set("hide_title", str( bool2int(evt.Checked()) )) + + def on_raw_button(self,evt): + self.handler.list.set("raw_mode",str(bool2int(evt.Checked()))) ###############################
--- a/orpg/main.py Mon Nov 23 03:36:26 2009 -0600 +++ b/orpg/main.py Mon Nov 23 12:20:51 2009 -0600 @@ -97,8 +97,7 @@ "on_status_event":self.on_status_event, "on_password_signal":self.on_password_signal, "orpgFrame":self} - self.settings = component.get('settings') #Arbitrary until settings updated with Core. - self.session = orpg.networking.mplay_client.mplay_client(self.settings.get("player"), call_backs) + self.session = orpg.networking.mplay_client.mplay_client(settings.get("player"), call_backs) self.poll_timer = wx.Timer(self, wx.NewId()) self.Bind(wx.EVT_TIMER, self.session.poll, self.poll_timer) self.poll_timer.Start(100) @@ -300,11 +299,10 @@ self.traipseSuite.AppendItem(self.debugConsole) def TraipseSuiteWarn(self, menuitem): - ### Beta ### Allows for the reuse of the 'Attention' menu. + ### Allows for the reuse of the 'Attention' menu. ### component.get('frame').TraipseSuiteWarn('item') ### Portable self.mainmenu.Remove(8) self.mainmenu.Insert(8, self.traipseSuite, "&Traipse Suite!") - #self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite!') if menuitem == 'debug': if self.debugger.IsShown() == True: self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite') @@ -314,11 +312,10 @@ self.traipseSuite.AppendItem(self.debugConsole) def TraipseSuiteWarnCleanup(self, menuitem): - ### Beta ### Allows for portable cleanup of the 'Attention' menu. + ### Allows for portable cleanup of the 'Attention' menu. ### component.get('frame').TraipseSuiteWarnCleanup('item') ### Portable self.mainmenu.Remove(8) self.mainmenu.Insert(8, self.traipseSuite, "&Traipse Suite") - #self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite') if menuitem == 'debug': self.traipseSuite.RemoveItem(self.debugConsole) self.debugConsole.SetBitmap(wx.Bitmap(dir_struct["icon"] + 'clear.gif')) @@ -410,7 +407,6 @@ graidentTo=wx.Color(0, 128, 255), graidentFrom=wx.WHITE, textColor=wx.BLACK) else: self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedAqua", True) - def OnMB_OpenRPGTabStylesSlantedCustom(self): if self.mainmenu.GetMenuState("OpenRPGTabStylesSlantedCustom"): settings.change('TabTheme', 'customslant') @@ -427,7 +423,6 @@ textColor=wx.Color(tred, tgreen, tblue)) else: self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedCustom", True) - def OnMB_OpenRPGTabStylesFlatBlackandWhite(self): if self.mainmenu.GetMenuState("OpenRPGTabStylesFlatBlackandWhite"): settings.change('TabTheme', 'flat&bw') @@ -435,7 +430,6 @@ graidentTo=wx.WHITE, graidentFrom=wx.WHITE, textColor=wx.BLACK) else: self.mainmenu.SetMenuState("OpenRPGTabStylesFlatBlackandWhite", True) - def OnMB_OpenRPGTabStylesFlatAqua(self): if self.mainmenu.GetMenuState("OpenRPGTabStylesFlatAqua"): settings.change('TabTheme', 'flat&aqua') @@ -443,7 +437,6 @@ graidentTo=wx.Color(0, 128, 255), graidentFrom=wx.WHITE, textColor=wx.BLACK) else: self.mainmenu.SetMenuState("OpenRPGTabStylesFlatAqua", True) - def OnMB_OpenRPGTabStylesFlatCustom(self): if self.mainmenu.GetMenuState("OpenRPGTabStylesFlatCustom"): settings.change('TabTheme', 'customflat') @@ -461,7 +454,6 @@ else: self.mainmenu.SetMenuState("OpenRPGTabStylesFlatCustom", True) #Window Menu - def OnMB_WindowsMenu(self, event): menuid = event.GetId() name = self.mainwindows[menuid] @@ -474,7 +466,6 @@ self._mgr.Update() #OpenRPG Menu - def OnMB_OpenRPGSettings(self): dlg = orpg.tools.orpg_settings.orpgSettingsWnd(self) dlg.Centre() @@ -484,18 +475,15 @@ self.OnCloseWindow(0) #Game Server Menu - def OnMB_GameServerBrowseServers(self): if self._mgr.GetPane("Browse Server Window").IsShown() == True: self._mgr.GetPane("Browse Server Window").Hide() else: self._mgr.GetPane("Browse Server Window").Show() self._mgr.Update() - def OnMB_GameServerServerHeartbeat(self): if self.mainmenu.GetMenuState("GameServerServerHeartbeat"): settings.change('Heartbeat', '1') else: settings.change('Heartbeat', '0') - def OnMB_GameServerStartServer(self): start_dialog = wx.ProgressDialog( "Server Loading", "Server Loading, Please Wait...", 1, self ) # Spawn the new process and close the stdout handle from it @@ -514,23 +502,19 @@ start_dialog.Destroy() # Tools Menu - def OnMB_PluginControlPanel(self, evt): if self.pluginsFrame.IsShown() == True: self.pluginsFrame.Hide() else: self.pluginsFrame.Show() - def OnMB_UpdateManagerPanel(self, evt): if self.updateMana.IsShown() == True: self.updateMana.Hide() else: self.updateMana.Show() - def OnMB_DebugConsole(self, evt): self.TraipseSuiteWarnCleanup('debug') ### Beta ### if self.debugger.IsShown() == True: self.debugger.Hide() else: self.debugger.Show() - def OnMB_ToolsLoggingLevelDebug(self): lvl = logger.log_level if self.mainmenu.GetMenuState("ToolsLoggingLevelDebug"): lvl |= ORPG_DEBUG @@ -538,7 +522,6 @@ logger.log_level = lvl settings.set('LoggingLevel', lvl) - def OnMB_ToolsLoggingLevelNote(self): lvl = logger.log_level if self.mainmenu.GetMenuState("ToolsLoggingLevelNote"): lvl |= ORPG_DEBUG @@ -546,7 +529,6 @@ logger.log_level = lvl settings.set('LoggingLevel', lvl) - def OnMB_ToolsLoggingLevelInfo(self): lvl = logger.log_level if self.mainmenu.GetMenuState("ToolsLoggingLevelInfo"): lvl |= ORPG_INFO @@ -554,7 +536,6 @@ logger.log_level = lvl settings.set('LoggingLevel', lvl) - def OnMB_ToolsLoggingLevelGeneral(self): lvl = logger.log_level if self.mainmenu.GetMenuState("ToolsLoggingLevelGeneral"): lvl |= ORPG_GENERAL @@ -562,12 +543,10 @@ logger.log_level = lvl settings.set('LoggingLevel', lvl) - def OnMB_ToolsPasswordManager(self): if self.mainmenu.GetMenuState("ToolsPasswordManager"): self.password_manager.Enable() else: self.password_manager.Disable() - def OnMB_ToolsStatusBar(self): if self._mgr.GetPane("Status Window").IsShown() == True: self.mainmenu.SetMenuState("ToolsStatusBar", False) @@ -577,7 +556,6 @@ self._mgr.GetPane("Status Window").Show() self._mgr.Update() - def OnMB_ToolsSoundToolbar(self): if self._mgr.GetPane("Sound Control Toolbar").IsShown() == True: self.mainmenu.SetMenuState("ToolsSoundToolbar", False) @@ -587,7 +565,6 @@ self._mgr.GetPane("Sound Control Toolbar").Show() self._mgr.Update() - def OnMB_ToolsDiceBar(self): if self._mgr.GetPane("Dice Tool Bar").IsShown() == True: self.mainmenu.SetMenuState("ToolsDiceBar", False) @@ -597,7 +574,6 @@ self._mgr.GetPane("Dice Tool Bar").Show() self._mgr.Update() - def OnMB_ToolsMapBar(self): if self._mgr.GetPane("Map Tool Bar").IsShown() == True: self.mainmenu.SetMenuState("ToolsMapBar", False) @@ -608,22 +584,18 @@ self._mgr.Update() #Help Menu #Needs a custom Dialog because it is ugly on Windows - def OnMB_HelpAbout(self): if self.AboutORPG.IsShown() == True: self.AboutORPG.Hide() else: self.AboutORPG.Show() - def OnMB_HelpOnlineUserGuide(self): wb = webbrowser.get() wb.open("http://www.assembla.com/wiki/show/traipse/User_Manual") - def OnMB_HelpChangeLog(self): wb = webbrowser.get() wb.open("http://www.assembla.com/spaces/milestones/index/traipse?spaces_tool_id=Milestones") - def OnMB_HelpReportaBug(self): wb = webbrowser.get() wb.open("http://www.assembla.com/spaces/tickets/index/traipse_dev?spaces_tool_id=Tickets") @@ -663,9 +635,9 @@ logger.debug("Dimensions Set") # Update Manager - self.manifest = manifest.ManifestChanges() + #self.manifest = manifest.ManifestChanges() self.updateMana = upmana.updatemana.updaterFrame(self, - "OpenRPG Update Manager Beta 0.8", component, self.manifest, True) + "OpenRPG Update Manager (final beta)", component, manifest, True) logger.debug("Menu Created") h = int(xml_dom.get("height")) w = int(xml_dom.get("width")) @@ -776,9 +748,7 @@ #Load the layout if one exists layout = xml_dom.find("DockLayout") - try: - self._mgr.LoadPerspective(layout.text) - except: pass + self._mgr.LoadPerspective(layout.text) logger.debug("Perspective Loaded") self._mgr.GetPane("Browse Server Window").Hide() self._mgr.Update() @@ -786,7 +756,6 @@ logger.debug("GUI is all created") self.Thaw() - def do_tab_window(self, xml_dom, parent_wnd): # if container window loop through childern and do a recursive call temp_wnd = orpgTabberWnd(parent_wnd, style=FNB.FNB_ALLOW_FOREIGN_DND) @@ -798,7 +767,6 @@ temp_wnd.AddPage(wnd, name, False) return temp_wnd - def build_window(self, xml_dom, parent_wnd): name = xml_dom.tag if name == "DockLayout" or name == "dock": return @@ -911,30 +879,21 @@ xml_dom.append(elem) layout.write(filename) - """ - temp_file = open(filename, "w") - temp_file.write(tostring(xml_dom)) - temp_file.close()""" - def build_hotkeys(self): self.mainmenu.accel.xaccel.extend(self.chat.get_hot_keys()) self.mainmenu.accel.xaccel.extend(self.map.get_hot_keys()) - def start_timer(self): self.poll_timer.Start(100) - s = component.get('settings') - if s.get("Heartbeat") == "1": + if settings.get("Heartbeat") == "1": self.ping_timer.Start(1000*60) logger.debug("starting heartbeat...", True) - def kill_mplay_session(self): self.game_name = "" self.session.start_disconnect() - def quit_game(self, evt): dlg = wx.MessageDialog(self,"Exit gaming session?","Game Session",wx.YES_NO) if dlg.ShowModal() == wx.ID_YES: @@ -942,13 +901,11 @@ dlg.Destroy() self.kill_mplay_session() - def on_status_event(self, evt): id = evt.get_id() status = evt.get_data() if id == orpg.networking.mplay_client.STATUS_SET_URL: self.status.set_url(status) - def on_player_event(self, evt): id = evt.get_id() player = evt.get_data() @@ -964,7 +921,6 @@ self.players.update_player(player) self.players.Refresh() - def on_group_event(self, evt): id = evt.get_id() data = evt.get_data() @@ -974,7 +930,6 @@ self.gs.del_room(data) elif id == orpg.networking.mplay_client.GROUP_UPDATE: self.gs.update_room(data) - def on_receive(self, data, player): # see if we are ignoring this user (ignore_id, ignore_name) = self.session.get_ignore_list() @@ -984,11 +939,9 @@ # ok we are not ignoring this message #recvSound = "RecvSound" # this will be the default sound. Whisper will change this below - ### Alpha ### etreeEl = Element('msg') try: etreeEl.append(fromstring(data)) except: etreeEl.text = data - ### Remove after Element Tree is integrated further ### if player: display_name = self.chat.chat_display_name(player) else: display_name = "Server Administrator" @@ -996,13 +949,12 @@ for child in etreeEl.getchildren(): if child.tag == 'tree': - ### Alpha ### Allows users to decide if they want the node or not. dlg = wx.MessageDialog(None, display_name + ' is trying to send you a tree node. Accept?', 'Question', wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION) if dlg.ShowModal() == wx.ID_YES: dlg.Destroy() debug(child) - self.tree.on_receive_data(tostring(child)) #Removed player object because it was unused. + self.tree.on_receive_data(tostring(child)) self.chat.InfoPost(display_name + " has sent you a tree node...") elif child.tag == 'map': #TODO: Fix map to accepts elements @@ -1028,7 +980,6 @@ ####Begin changes for Custom Exit Message by mDuo13###### elif id == orpg.networking.mplay_client.MPLAY_DISCONNECTING: - settings = component.get('settings') custom_msg = settings.get("dcmsg") custom_msg=custom_msg[:80] if custom_msg[:3]=="/me": self.chat.send_chat_message(custom_msg[3:], 3) @@ -1043,14 +994,12 @@ elif id == orpg.networking.mplay_client.MPLAY_GROUP_CHANGE_F: self.chat.SystemPost("Room access denied!") - def OnCloseWindow(self, event): dlg = wx.MessageDialog(self, "Quit OpenRPG?", "OpenRPG", wx.YES_NO) if dlg.ShowModal() == wx.ID_YES: dlg.Destroy() self.closed_confirmed() - def closed_confirmed(self): self.activeplugins = component.get('plugins') self.aliaslib.OnMB_FileSave(None) @@ -1067,11 +1016,9 @@ try: settings.save() except Exception: logger.general("[WARNING] Error saving 'settings' component", True) - try: self.map.pre_exit_cleanup() except Exception: logger.general("[WARNING] Map error pre_exit_cleanup()", True) - try: save_tree = string.upper(settings.get("SaveGameTreeOnExit")) if (save_tree != "0") and (save_tree != "False") and (save_tree != "NO"): @@ -1196,9 +1143,6 @@ component.add('validate', validate) component.add("tabbedWindows", []) - #Update Manager - self.manifest = manifest.ManifestChanges() - self.called = False wx.InitAllImageHandlers() self.splash = orpgSplashScreen(None, dir_struct["icon"] + 'splash13.jpg', 3000, self.AfterSplash) @@ -1207,13 +1151,11 @@ wx.Yield() return True - def OnKeyPress(self, evt): #Event handler if evt.AltDown() and evt.CmdDown() and evt.KeyCode == ord('I'): self.ShowShell() else: evt.Skip() - def ShowShell(self): #Show the PyCrust window. if not self._crust: @@ -1223,7 +1165,6 @@ self._crust.shell.interp.locals['win'] = win self._crust.Show() - def AfterSplash(self,evt): if not self.called: self.splash.Hide() @@ -1238,7 +1179,6 @@ wx.CallAfter(self.splash.Close) return True - def OnExit_CleanUp(self): logger.debug("Preforming cleanup\n") try: del os.environ["OPENRPG_BASE"] @@ -1248,7 +1188,6 @@ try: os.remove(os.environ["OPENRPG_BASE"] + os.sep + 'orpg' + os.sep + 'dirpath' + os.sep + 'approot.pyc') except: pass - def OnExit(self): self.OnExit_CleanUp() #Exit
--- a/orpg/orpg_version.py Mon Nov 23 03:36:26 2009 -0600 +++ b/orpg/orpg_version.py Mon Nov 23 12:20:51 2009 -0600 @@ -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 = "091123-00" +BUILD = "091123-01" # This version is for network capability. PROTOCOL_VERSION = "1.2"
--- a/orpg/tools/orpg_log.py Mon Nov 23 03:36:26 2009 -0600 +++ b/orpg/tools/orpg_log.py Mon Nov 23 12:20:51 2009 -0600 @@ -58,14 +58,13 @@ logger.info("Printed out crash-report.txt in your System folder", True) class Term2Win(object): - # A stdout redirector. Allows the messages from Mercurial to be seen in the Install Window + # A stdout redirector. To be implemented later. def write(self, text): - #logger.stdout(text) + logger.stdout(text) wx.Yield() - sys.__stdout__.write(text) + #sys.__stdout__.write(text) class TrueDebug(object): - ### Alpha ### """A simple debugger. Add debug() to a function and it prints the function name and any objects included. Add an object or a group of objects in ()'s. Adding True to locale prints the file name where the function is. Adding False to log turns the log off. Adding True to parents will print out the parent functions, starting from TrueDebug. @@ -96,6 +95,7 @@ def __init__(self, parent): super(DebugConsole, self).__init__(parent, -1, "Debug Console") icon = wx.Icon(dir_struct["icon"]+'note.ico', wx.BITMAP_TYPE_ICO) + self.parent = parent self.SetIcon(icon) self.console = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE | wx.TE_READONLY) self.bt_clear = wx.Button(self, wx.ID_CLEAR) @@ -123,7 +123,7 @@ self.console.SetValue('') def bug_report(self, evt): - pass + self.parent.OnMB_HelpReportaBug() class orpgLog(object): _log_level = 7 @@ -150,6 +150,7 @@ 'log_string': 'ERROR'}, 1: {'colorizer': {'bold': True, 'red': True}, 'log_string': 'EXCEPTION'}} + if not self.log_name: self.log_name = home_dir + filename + time.strftime('%m-%d-%Y.txt', time.localtime(time.time())) @@ -166,8 +167,10 @@ def general(self, msg, to_console=False): self.log(msg, ORPG_GENERAL, to_console) + def stdout(self, msg, to_console=True): + self.log(msg, ORPG_INFO, to_console) + def exception(self, msg, to_console=True): - ### Beta ### Every 'Critical' exception will draw attention to the Debug Console component.get('frame').TraipseSuiteWarn('debug') self.log(msg, ORPG_CRITICAL, to_console)
--- a/upmana/updatemana.py Mon Nov 23 03:36:26 2009 -0600 +++ b/upmana/updatemana.py Mon Nov 23 12:20:51 2009 -0600 @@ -15,7 +15,7 @@ def write(self, text): statbar.SetStatusText(text) wx.Yield() - sys.__stdout__.write(text) + #sys.__stdout__.write(text) class Updater(wx.Panel): @debugging @@ -292,8 +292,6 @@ if repo not in self.repolist: appendlist.append(repo) self.repolist = repolist - #wx.Yeild() For future refrence. - for repo in appendlist: self.id += 1 #Build Constructs @@ -345,7 +343,7 @@ def AddRepo(self, event): repo = self.texts['reponame'].GetValue(); repo = repo.replace(' ', '_'); repo = 'repo-' + repo - manifest.SetString('updaterepo', repo, '') #; self.repo = repo.split(',') + manifest.SetString('updaterepo', repo, '') self.BuildRepoList(None) def DelRepo(self, event): @@ -648,7 +646,7 @@ logger._set_log_to_console(False) logger.note("Updater Start") component.add('validate', validate) - self.updater = updaterFrame(self, "OpenRPG Update Manager 0.8 (open beta)", + self.updater = updaterFrame(self, "OpenRPG Update Manager 0.9 (final beta)", component, manifest, self.main) if manifest.GetString("updatemana", "auto_update", "") == 'on' and self.main == False: self.AutoUpdate(); self.OnExit()