comparison orpg/main.py @ 115:17b64e9133e9 alpha

Traipse Alpha 'OpenRPG' {091012-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: Adds Bookmarks (Alpha) with cool Smiley Star and Plus Symbol images! Changes made to the map for increased portability. SnowDog has changes planned in Core, though. Added an initial push to the BCG. Not much to see, just shows off how it is re-writing Main code. Fix to remote admin commands Minor fix to texted based server, works in /System/ folder Some Core changes to gametree to correctly disply Pretty Print, thanks David! Fix to Splitter Nodes not being created. Added images to Plugin Control panel for Autostart feature Fix to massive amounts of images loading; from Core {091011} fix to gsclient so with_statement imports Added 'boot' command to remote admin Prep work in Pass tool for remote admin rankings and different passwords, ei, Server, Admin, Moderator, etc. {091012} 00: Remote Admin Commands more organized, more prep work. Added Confirmation window for sent nodes.
author sirebral
date Mon, 12 Oct 2009 01:11:10 -0500
parents 95b5281e8d34
children d078a8cdc1e4
comparison
equal deleted inserted replaced
114:bd6ca89e4cbb 115:17b64e9133e9
47 import orpg.networking.gsclient 47 import orpg.networking.gsclient
48 import orpg.networking.mplay_client 48 import orpg.networking.mplay_client
49 import orpg.mapper.map 49 import orpg.mapper.map
50 import orpg.mapper.images 50 import orpg.mapper.images
51 51
52 import upmana.updatemana 52 #Update Manager# Un remark if you have Mercurial installed
53 import upmana.manifest as manifest 53 #import upmana.updatemana
54 #import upmana.manifest as manifest
54 55
55 from orpg.dirpath import dir_struct 56 from orpg.dirpath import dir_struct
56 from orpg.dieroller.utils import DiceManager 57 from orpg.dieroller.utils import DiceManager
57 from orpg.tools.orpg_settings import settings 58 from orpg.tools.orpg_settings import settings
58 from orpg.tools.validate import validate 59 from orpg.tools.validate import validate
130 component.add('pluginmenu', self.pluginMenu) 131 component.add('pluginmenu', self.pluginMenu)
131 self.pluginsFrame.Start() 132 self.pluginsFrame.Start()
132 logger.debug("plugins reloaded and startup plugins launched") 133 logger.debug("plugins reloaded and startup plugins launched")
133 self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) 134 self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
134 135
135 #Load Update Manager 136 #Load Update Manager# Un remark if you have Mercurial installed
136 component.add('updatemana', self.updateMana) 137 #component.add('updatemana', self.updateMana)
137 logger.debug("update manager reloaded") 138 #logger.debug("update manager reloaded")
138 self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) 139 #self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
139 140
140 #Load Update Manager 141 #Load Debug Console
141 component.add('debugconsole', self.debugger) 142 component.add('debugconsole', self.debugger)
142 logger.debug("debugger window") 143 logger.debug("debugger window")
143 self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) 144 self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
144 145
145 @debugging 146 @debugging
262 263
263 # Traipse Suite of Additions. 264 # Traipse Suite of Additions.
264 self.traipseSuite = wx.Menu() 265 self.traipseSuite = wx.Menu()
265 self.mainmenu.Insert(5, self.traipseSuite, "&Traipse Suite") 266 self.mainmenu.Insert(5, self.traipseSuite, "&Traipse Suite")
266 267
267 mana = wx.MenuItem(self.traipseSuite, wx.ID_ANY, "Update Manager", "Update Manager") 268 #Update Manager# Un remark if you have Mercurial installed
268 self.Bind(wx.EVT_MENU, self.OnMB_UpdateManagerPanel, mana) 269 #mana = wx.MenuItem(self.traipseSuite, wx.ID_ANY, "Update Manager", "Update Manager")
269 self.traipseSuite.AppendItem(mana) 270 #self.Bind(wx.EVT_MENU, self.OnMB_UpdateManagerPanel, mana)
271 #self.traipseSuite.AppendItem(mana)
270 272
271 self.debugConsole = wx.MenuItem(self.traipseSuite, -1, "Debug Console", "Debug Console") 273 self.debugConsole = wx.MenuItem(self.traipseSuite, -1, "Debug Console", "Debug Console")
272 self.Bind(wx.EVT_MENU, self.OnMB_DebugConsole, self.debugConsole) 274 self.Bind(wx.EVT_MENU, self.OnMB_DebugConsole, self.debugConsole)
273 self.traipseSuite.AppendItem(self.debugConsole) 275 self.traipseSuite.AppendItem(self.debugConsole)
274 276
636 posy = int(xml_dom.getAttribute("posy")) 638 posy = int(xml_dom.getAttribute("posy"))
637 maximized = int(xml_dom.getAttribute("maximized")) 639 maximized = int(xml_dom.getAttribute("maximized"))
638 self.SetDimensions(posx, posy, w, h) 640 self.SetDimensions(posx, posy, w, h)
639 logger.debug("Dimensions Set") 641 logger.debug("Dimensions Set")
640 642
641 # Update Manager 643 # Update Manager # Un remark if you have Mercurial installed
642 self.manifest = manifest.ManifestChanges() 644 #self.manifest = manifest.ManifestChanges()
643 self.updateMana = upmana.updatemana.updaterFrame(self, 645 #self.updateMana = upmana.updatemana.updaterFrame(self,
644 "OpenRPG Update Manager Beta 0.8", component, self.manifest, True) 646 # "OpenRPG Update Manager Beta 0.8", component, self.manifest, True)
645 logger.debug("Menu Created") 647 #logger.debug("Menu Created")
646 h = int(xml_dom.getAttribute("height")) 648 #h = int(xml_dom.getAttribute("height"))
647 w = int(xml_dom.getAttribute("width")) 649 #w = int(xml_dom.getAttribute("width"))
648 posx = int(xml_dom.getAttribute("posx")) 650 #posx = int(xml_dom.getAttribute("posx"))
649 posy = int(xml_dom.getAttribute("posy")) 651 #posy = int(xml_dom.getAttribute("posy"))
650 maximized = int(xml_dom.getAttribute("maximized")) 652 #maximized = int(xml_dom.getAttribute("maximized"))
651 self.SetDimensions(posx, posy, w, h) 653 #self.SetDimensions(posx, posy, w, h)
652 logger.debug("Dimensions Set") 654 #logger.debug("Dimensions Set")
653 655
654 # Debug Console 656 # Debug Console
655 self.debugger = orpg.tools.orpg_log.DebugConsole(self) 657 self.debugger = orpg.tools.orpg_log.DebugConsole(self)
656 logger.debug("Menu Created") 658 logger.debug("Menu Created")
657 h = int(xml_dom.getAttribute("height")) 659 h = int(xml_dom.getAttribute("height"))
972 #recvSound = "RecvSound" # this will be the default sound. Whisper will change this below 974 #recvSound = "RecvSound" # this will be the default sound. Whisper will change this below
973 if player: display_name = self.chat.chat_display_name(player) 975 if player: display_name = self.chat.chat_display_name(player)
974 else: display_name = "Server Administrator" 976 else: display_name = "Server Administrator"
975 977
976 if data[:5] == "<tree": 978 if data[:5] == "<tree":
977 self.tree.on_receive_data(data,player) 979 ### Alpha ### Allows users to decide if they want the node or not.
978 self.chat.InfoPost(display_name + " has sent you a tree node...") 980 dlg = wx.MessageDialog(None, display_name + 'is trying to send you a tree node. Accept?', 'Question',
981 wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
982 if dlg.ShowModal() == wx.ID_YES:
983 dlg.Destroy()
984 self.tree.on_receive_data(data,player)
985 self.chat.InfoPost(display_name + " has sent you a tree node...")
979 986
980 elif data[:4] == "<map": self.map.new_data(data) 987 elif data[:4] == "<map": self.map.new_data(data)
981 988
982 elif data[:5] == "<chat": 989 elif data[:5] == "<chat":
983 msg = orpg.chat.chat_msg.chat_msg(data) 990 msg = orpg.chat.chat_msg.chat_msg(data)
1221 component.add("tabbedWindows", []) 1228 component.add("tabbedWindows", [])
1222 1229
1223 logger._set_log_level = int(settings.get_setting('LoggingLevel')) 1230 logger._set_log_level = int(settings.get_setting('LoggingLevel'))
1224 logger._set_log_to_console(False) 1231 logger._set_log_to_console(False)
1225 1232
1226 self.manifest = manifest.ManifestChanges() 1233 #Update Manager# Un remark if you have Mercurial installed
1234 #self.manifest = manifest.ManifestChanges()
1227 1235
1228 self.called = False 1236 self.called = False
1229 wx.InitAllImageHandlers() 1237 wx.InitAllImageHandlers()
1230 self.splash = orpgSplashScreen(None, dir_struct["icon"] + 'splash13.jpg', 3000, self.AfterSplash) 1238 self.splash = orpgSplashScreen(None, dir_struct["icon"] + 'splash13.jpg', 3000, self.AfterSplash)
1231 self.Bind(wx.EVT_KEY_DOWN, self.OnKeyPress) 1239 self.Bind(wx.EVT_KEY_DOWN, self.OnKeyPress)