comparison orpg/main.py @ 98:95b5281e8d34 alpha

Traipse Alpha 'OpenRPG' {090925-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: 00: Update forwards to the 090909-02 Server code that now works. New default Lobby Map, designed for Traipse. Feel free to change it. Updates to Server GUI: * Admin can Ban from Backend. * Prework to modify Ban List in back end. * Server GUI finds your Lobby Name * New users default as Lurker unless a Role is set New Addition to Chat Die Roll commands. Math Ordering. Ex. [(X+Y)dZ]. Currently does pairs only, no nesting either. Cleaner TraipseSuiteAttention portability and clean up in Main (Beta!) 01: Die Roll Commands addition removed in favor of Core code {090925-00}: Updates to Server GUI: *Admin can Modify Ban List and Un Ban users. New About Dialog. A more uniform About Dialog.
author sirebral
date Fri, 25 Sep 2009 06:16:37 -0500
parents 65c1604e7949
children 17b64e9133e9
comparison
equal deleted inserted replaced
97:bb22f0f1a7ec 98:95b5281e8d34
577 self._mgr.Update() 577 self._mgr.Update()
578 578
579 #Help Menu #Needs a custom Dialog because it is ugly on Windows 579 #Help Menu #Needs a custom Dialog because it is ugly on Windows
580 @debugging 580 @debugging
581 def OnMB_HelpAbout(self): 581 def OnMB_HelpAbout(self):
582 582 if self.AboutORPG.IsShown() == True: self.AboutORPG.Hide()
583 description = "OpenRPG is a Virtual Game Table that allows users to connect via a network and play table\n" 583 else: self.AboutORPG.Show()
584 description += "top games with friends. 'Traipse' is an OpenRPG distro that is easy to setup and provides superb \n"
585 description += "functionality. OpenRPG is originally designed by Chris Davis. \n"
586
587 license = "OpenRPG is free software; you can redistribute it and/or modify it "
588 license += "under the terms of the GNU General Public License as published by the Free Software Foundation; \n"
589 license += "either version 2 of the License, or (at your option) any later version.\n\n"
590 license += "OpenRPG and Traipse 'OpenRPG' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; \n"
591 license += "without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \n"
592 license += "See the GNU General Public License for more details. You should have received a copy of \n"
593 license += "the GNU General Public License along with Traipse 'OpenRPG'; if not, write to \n"
594 license += "the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n"
595 license += "'Traipse' and the 'Traipse' Logo are trademarks of Mad Mathematics Laboratories."
596
597 info = wx.AboutDialogInfo()
598 info.SetIcon(wx.Icon(dir_struct["icon"]+'splash.gif', wx.BITMAP_TYPE_GIF))
599 info.SetName('Traipse')
600 info.SetVersion('OpenRPG ' + VERSION)
601 info.SetDescription(description)
602 info.SetCopyright('(C) Copyright 2009 Mad Math Labs')
603 info.SetWebSite('http://www.openrpg.com')
604 info.SetLicence(license)
605 orpg_devs = ['Thomas Baleno', 'Andrew Bennett', 'Lex Berezhny', 'Ted Berg',
606 'Bernhard Bergbauer', 'Chris Blocher', 'David Byron', 'Ben Collins-Sussman', 'Robin Cook', 'Greg Copeland',
607 'Chris Davis', 'Michael Edwards', 'Andrew Ettinger', 'Todd Faris', 'Dj Gilcrease',
608 'Christopher Hickman', 'Paul Hosking', 'Brian Manning', 'Scott Mackay', 'Jesse McConnell',
609 'Brian Osman', 'Rome Reginelli', 'Christopher Rouse', 'Dave Sanders', 'Tyler Starke', 'Mark Tarrabain']
610 for dev in orpg_devs:
611 info.AddDeveloper(dev)
612 wx.AboutBox(info)
613 584
614 @debugging 585 @debugging
615 def OnMB_HelpOnlineUserGuide(self): 586 def OnMB_HelpOnlineUserGuide(self):
616 wb = webbrowser.get() 587 wb = webbrowser.get()
617 wb.open("http://www.assembla.com/wiki/show/traipse/User_Manual") 588 wb.open("http://www.assembla.com/wiki/show/traipse/User_Manual")
648 619
649 base = etree.getroot() 620 base = etree.getroot()
650 """ 621 """
651 self.windowsmenu = wx.Menu() 622 self.windowsmenu = wx.Menu()
652 self.mainwindows = {} 623 self.mainwindows = {}
624
625 # About Window
626 self.AboutORPG = AboutORPG(self)
653 627
654 #Plugins Window 628 #Plugins Window
655 self.pluginsFrame = pluginUI.PluginFrame(self) 629 self.pluginsFrame = pluginUI.PluginFrame(self)
656 component.add("plugins", self.get_activeplugins()) 630 component.add("plugins", self.get_activeplugins())
657 component.add("startplugs", self.get_startplugins()) 631 component.add("startplugs", self.get_startplugins())
662 posy = int(xml_dom.getAttribute("posy")) 636 posy = int(xml_dom.getAttribute("posy"))
663 maximized = int(xml_dom.getAttribute("maximized")) 637 maximized = int(xml_dom.getAttribute("maximized"))
664 self.SetDimensions(posx, posy, w, h) 638 self.SetDimensions(posx, posy, w, h)
665 logger.debug("Dimensions Set") 639 logger.debug("Dimensions Set")
666 640
667 #Update Manager 641 # Update Manager
668 self.manifest = manifest.ManifestChanges() 642 self.manifest = manifest.ManifestChanges()
669 self.updateMana = upmana.updatemana.updaterFrame(self, 643 self.updateMana = upmana.updatemana.updaterFrame(self,
670 "OpenRPG Update Manager Beta 0.8", component, self.manifest, True) 644 "OpenRPG Update Manager Beta 0.8", component, self.manifest, True)
671 logger.debug("Menu Created") 645 logger.debug("Menu Created")
672 h = int(xml_dom.getAttribute("height")) 646 h = int(xml_dom.getAttribute("height"))
675 posy = int(xml_dom.getAttribute("posy")) 649 posy = int(xml_dom.getAttribute("posy"))
676 maximized = int(xml_dom.getAttribute("maximized")) 650 maximized = int(xml_dom.getAttribute("maximized"))
677 self.SetDimensions(posx, posy, w, h) 651 self.SetDimensions(posx, posy, w, h)
678 logger.debug("Dimensions Set") 652 logger.debug("Dimensions Set")
679 653
680 #Update Manager 654 # Debug Console
681 self.manifest = manifest.ManifestChanges()
682 self.debugger = orpg.tools.orpg_log.DebugConsole(self) 655 self.debugger = orpg.tools.orpg_log.DebugConsole(self)
683 logger.debug("Menu Created") 656 logger.debug("Menu Created")
684 h = int(xml_dom.getAttribute("height")) 657 h = int(xml_dom.getAttribute("height"))
685 w = int(xml_dom.getAttribute("width")) 658 w = int(xml_dom.getAttribute("width"))
686 posx = int(xml_dom.getAttribute("posx")) 659 posx = int(xml_dom.getAttribute("posx"))
1170 dlg.Destroy() 1143 dlg.Destroy()
1171 logger.general("Server killed:", True) 1144 logger.general("Server killed:", True)
1172 except Exception: 1145 except Exception:
1173 pass 1146 pass
1174 1147
1148 ########################################
1149 ## About Dialog class
1150 ########################################
1151 class AboutORPG(wx.Frame):
1152 def __init__(self, parent):
1153 super(AboutORPG, self).__init__(parent, -1, "About 'Traipse' OpenRPG")
1154 icon = None
1155 icon = wx.Icon(dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO)
1156 self.SetIcon( icon )
1157 sizer = wx.GridBagSizer(hgap=1, vgap=1)
1158 height = 425; width = 350
1159 self.About = wx.TextCtrl(self, -1, size=wx.DefaultSize, style=wx.TE_MULTILINE | wx.TE_READONLY)
1160 img = wx.Image(dir_struct['icon']+'splash.gif', wx.BITMAP_TYPE_ANY).ConvertToBitmap()
1161 image = wx.StaticBitmap(self, -1, img, size=wx.DefaultSize)
1162 sizer.Add(image, (0,0), flag=wx.ALIGN_CENTER_HORIZONTAL|wx.ALL|wx.ADJUST_MINSIZE)
1163 sizer.Add(self.About, (1,0), flag=wx.EXPAND)
1164 self.SetSizer(sizer)
1165 self.SetAutoLayout(True)
1166 self.SetSize((width, height))
1167 sizer.AddGrowableCol(0)
1168 sizer.AddGrowableCol(1)
1169 sizer.AddGrowableRow(1)
1170 self.Bind(wx.EVT_CLOSE, self.Min)
1171 self.Min(None)
1172
1173 description = "OpenRPG is a Virtual Game Table that allows users to connect via a network and play table "
1174 description += "top games with friends. 'Traipse' is an OpenRPG distro that is easy to setup and provides superb "
1175 description += "functionality. OpenRPG is originally designed by Chris Davis."
1176
1177 license = "OpenRPG is free software; you can redistribute it and/or modify it "
1178 license += "under the terms of the GNU General Public License as published by the Free Software Foundation; "
1179 license += "either version 2 of the License, or (at your option) any later version.\n\n"
1180 license += "OpenRPG and Traipse 'OpenRPG' is distributed in the hope that it will be useful, but WITHOUT ANY "
1181 license += "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "
1182 license += "See the GNU General Public License for more details. You should have received a copy of "
1183 license += "the GNU General Public License along with Traipse 'OpenRPG'; if not, write to "
1184 license += "the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \n\n"
1185 license += "'Traipse' and the 'Traipse' Logo are trademarks of Mad Mathematics Laboratories."
1186
1187 self.About.AppendText(description+'\n\n')
1188 self.About.AppendText(license+'\n\n')
1189 self.About.AppendText('OpenRPG Developers:\n')
1190 orpg_devs = ['Thomas Baleno', 'Andrew Bennett', 'Lex Berezhny', 'Ted Berg',
1191 'Bernhard Bergbauer', 'Chris Blocher', 'David Byron', 'Ben Collins-Sussman', 'Robin Cook', 'Greg Copeland',
1192 'Chris Davis', 'Michael Edwards', 'Andrew Ettinger', 'Todd Faris', 'Dj Gilcrease',
1193 'Christopher Hickman', 'Paul Hosking', 'Brian Manning', 'Scott Mackay', 'Jesse McConnell',
1194 'Brian Osman', 'Rome Reginelli', 'Christopher Rouse', 'Dave Sanders', 'Tyler Starke', 'Mark Tarrabain']
1195 for dev in orpg_devs:
1196 self.About.AppendText(dev+'\n')
1197
1198 def Min(self, evt):
1199 self.Hide()
1175 1200
1176 ######################################## 1201 ########################################
1177 ## Application class 1202 ## Application class
1178 ######################################## 1203 ########################################
1179 class orpgSplashScreen(wx.SplashScreen): 1204 class orpgSplashScreen(wx.SplashScreen):