comparison orpg/networking/gsclient.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 f3d8101211c4
children 449a8900f9ac
comparison
equal deleted inserted replaced
65:4840657c23c5 66:c54768cffbd4
26 # Description: The file contains code for the game server browser 26 # Description: The file contains code for the game server browser
27 # 27 #
28 28
29 __version__ = "$Id: gsclient.py,v 1.53 2007/10/25 21:49:34 digitalxero Exp $" 29 __version__ = "$Id: gsclient.py,v 1.53 2007/10/25 21:49:34 digitalxero Exp $"
30 30
31 import orpg.dirpath 31 from orpg.dirpath import dir_struct
32 from orpg.orpg_windows import * 32 from orpg.orpg_windows import *
33 from orpg.orpg_xml import * 33 #from orpg.orpg_xml import *
34 import meta_server_lib 34 import meta_server_lib
35 import orpg.tools.orpg_settings 35 import orpg.tools.orpg_settings
36 import orpg.tools.rgbhex 36 import orpg.tools.rgbhex
37 from orpg.orpgCore import open_rpg 37 from orpg.orpgCore import component
38 import traceback 38 import traceback
39 39
40 gs_host = 1 40 gs_host = 1
41 gs_join = 2 41 gs_join = 2
42 # constants 42 # constants
97 97
98 class game_server_panel(wx.Panel): 98 class game_server_panel(wx.Panel):
99 def __init__(self,parent): 99 def __init__(self,parent):
100 wx.Panel.__init__(self, parent, -1) 100 wx.Panel.__init__(self, parent, -1)
101 self.parent = parent 101 self.parent = parent
102 self.log = open_rpg.get_component('log') 102 self.log = component.get('log')
103 self.log.log("Enter game_server_panel", ORPG_DEBUG) 103 self.log.log("Enter game_server_panel", ORPG_DEBUG)
104 self.password_manager = open_rpg.get_component('password_manager') # passtool --SD 8/03 104 self.password_manager = component.get('password_manager') # passtool --SD 8/03
105 self.frame = open_rpg.get_component('frame') 105 self.frame = component.get('frame')
106 self.session = open_rpg.get_component('session') 106 self.session = component.get('session')
107 self.settings = open_rpg.get_component('settings') 107 self.settings = component.get('settings')
108 self.xml = open_rpg.get_component('xml') 108 self.xml = component.get('xml')
109 self.serverNameSet = 0 109 self.serverNameSet = 0
110 self.last_motd = "" 110 self.last_motd = ""
111 self.buttons = {} 111 self.buttons = {}
112 self.texts = {} 112 self.texts = {}
113 self.svrList = [] 113 self.svrList = []
568 self.refresh_server_list() 568 self.refresh_server_list()
569 self.log.log("Exit game_server_panel->failed_connection(self)", ORPG_DEBUG) 569 self.log.log("Exit game_server_panel->failed_connection(self)", ORPG_DEBUG)
570 570
571 def do_connect(self, address): 571 def do_connect(self, address):
572 self.log.log("Enter game_server_panel->do_connect(self, address)", ORPG_DEBUG) 572 self.log.log("Enter game_server_panel->do_connect(self, address)", ORPG_DEBUG)
573 chat = open_rpg.get_component('chat') 573 chat = component.get('chat')
574 chat.InfoPost("Locating server at " + address + "...") 574 chat.InfoPost("Locating server at " + address + "...")
575 if self.session.connect(address): 575 if self.session.connect(address):
576 self.frame.start_timer() 576 self.frame.start_timer()
577 else: 577 else:
578 chat.SystemPost("Failed to connect to game server...") 578 chat.SystemPost("Failed to connect to game server...")