diff orpg/networking/mplay_server_gui.py @ 66:c54768cffbd4 ornery-dev

Traipse Dev 'OpenRPG' {090818-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: *Unstable* 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(). This version has known bugs, specifically with the gametree and nodes. I think the XML files where not removed during testing of Core and switching back.
author sirebral
date Tue, 18 Aug 2009 06:33:37 -0500
parents 27e58b0483e7
children 449a8900f9ac
line wrap: on
line diff
--- a/orpg/networking/mplay_server_gui.py	Mon Aug 17 06:56:31 2009 -0500
+++ b/orpg/networking/mplay_server_gui.py	Tue Aug 18 06:33:37 2009 -0500
@@ -13,7 +13,7 @@
 import sys
 import time
 import types
-import orpg.dirpath
+from orpg.dirpath import dir_struct
 import orpg.systempath
 from orpg.orpg_wx import *
 import webbrowser
@@ -89,7 +89,7 @@
 
     def __init__(self, owner ): 
         """ Loads default configuration settings."""
-        userPath = orpg.dirpath.dir_struct["user"] 
+        userPath = dir_struct["user"] 
         validate = orpg.tools.validate.Validate(userPath) 
         validate.config_file( "server_ini.xml", "default_server_ini.xml" ) 
         configDom = minidom.parse(userPath + 'server_ini.xml') 
@@ -150,9 +150,9 @@
         self.main = main
         self.roomList = { 0 : "Lobby" }
         self._imageList = wx.ImageList( 16, 16, False )
-        img = wx.Image(orpg.dirpath.dir_struct["icon"]+"player.gif", wx.BITMAP_TYPE_GIF).ConvertToBitmap()
+        img = wx.Image(dir_struct["icon"]+"player.gif", wx.BITMAP_TYPE_GIF).ConvertToBitmap()
         self._imageList.Add( img )
-        img = wx.Image(orpg.dirpath.dir_struct["icon"]+"player-whisper.gif", wx.BITMAP_TYPE_GIF).ConvertToBitmap()
+        img = wx.Image(dir_struct["icon"]+"player-whisper.gif", wx.BITMAP_TYPE_GIF).ConvertToBitmap()
         self._imageList.Add( img )
         self.SetImageList( self._imageList, wx.IMAGE_LIST_SMALL )
 
@@ -296,8 +296,8 @@
 
     def __init__(self, parent, id, title):
         wx.Frame.__init__(self, parent, id, title, size = (760, 560) )
-        if wx.Platform == '__WXMSW__': icon = wx.Icon( orpg.dirpath.dir_struct["icon"]+'WAmisc9.ico', wx.BITMAP_TYPE_ICO )
-        else: icon = wx.Icon( orpg.dirpath.dir_struct["icon"]+'connect.gif', wx.BITMAP_TYPE_GIF )
+        if wx.Platform == '__WXMSW__': icon = wx.Icon( dir_struct["icon"]+'WAmisc9.ico', wx.BITMAP_TYPE_ICO )
+        else: icon = wx.Icon( dir_struct["icon"]+'connect.gif', wx.BITMAP_TYPE_GIF )
         self.SetIcon(icon)
         self.serverName = "Server Name"
         self.bootPwd = ""
@@ -480,7 +480,7 @@
         if self.STATUS == SERVER_STOPPED:
             # see if we already have name specified 
             try:
-                userPath = orpg.dirpath.dir_struct["user"] 
+                userPath = dir_struct["user"] 
                 validate = orpg.tools.validate.Validate(userPath) 
                 validate.config_file( "server_ini.xml", "default_server_ini.xml" ) 
                 configDom = minidom.parse(userPath + 'server_ini.xml') 
@@ -494,7 +494,7 @@
                 if serverNameEntry.ShowModal() == wx.ID_OK: self.serverName = serverNameEntry.GetValue()
             # see if we already have password specified 
             try: 
-                userPath = orpg.dirpath.dir_struct["user"] 
+                userPath = dir_struct["user"] 
                 validate = orpg.tools.validate.Validate(userPath) 
                 validate.config_file( "server_ini.xml", "default_server_ini.xml" ) 
                 configDom = minidom.parse(userPath + 'server_ini.xml') 
@@ -586,7 +586,7 @@
     def OnInit(self):
         # Make sure our image handlers are loaded before we try to display anything
         wx.InitAllImageHandlers()
-        self.splash = wx.SplashScreen(wx.Bitmap(orpg.dirpath.dir_struct["icon"]+'splash.gif'),
+        self.splash = wx.SplashScreen(wx.Bitmap(dir_struct["icon"]+'splash.gif'),
                               wx.SPLASH_CENTRE_ON_SCREEN|wx.SPLASH_TIMEOUT,
                               2000,
                               None)