comparison orpg/gametree/nodehandlers/core.py @ 195:b633f4c64aae alpha

Traipse Alpha 'OpenRPG' {100219-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 (Patch-2) New Features: New Namespace method with two new syntaxes Fixes: Fix to Server GUI startup errors Fix to Server GUI Rooms tab updating Fix to Chat and Settings if non existant die roller is picked Fix to Dieroller and .open() used with .vs(). Successes are correctly calculated Fix to Alias Lib's Export to Tree, Open, Save features Fix to alias node, now works properly Fix to Splitter node, minor GUI cleanup
author sirebral
date Sat, 24 Apr 2010 08:37:20 -0500
parents 12ba14d30baa
children 24769389a7ba
comparison
equal deleted inserted replaced
182:4b2884f29a72 195:b633f4c64aae
19 # 19 #
20 # File: core.py 20 # File: core.py
21 # Author: Chris Davis 21 # Author: Chris Davis
22 # Maintainer: 22 # Maintainer:
23 # Version: 23 # Version:
24 # $Id: core.py,v 1.49 2007/12/07 20:39:48 digitalxero Exp $ 24 # $Id: core.py,v Traipse 'Ornery-Orc' prof.ebral Exp $
25 # 25 #
26 # Description: The file contains code for the core nodehanlers 26 # Description: The file contains code for the core nodehanlers
27 # 27 #
28 28
29 __version__ = "$Id: core.py,v 1.49 2007/12/07 20:39:48 digitalxero Exp $" 29 __version__ = "$Id: core.py,v Traipse 'Ornery-Orc' prof.ebral Exp $"
30 30
31 from nodehandler_version import NODEHANDLER_VERSION 31 from nodehandler_version import NODEHANDLER_VERSION
32 from orpg.tools.InterParse import Parse
32 33
33 try: 34 try:
34 from orpg.orpg_windows import * 35 from orpg.orpg_windows import *
35 from orpg.dirpath import dir_struct 36 from orpg.dirpath import dir_struct
36 from orpg.orpgCore import component 37 from orpg.orpgCore import component
52 """ Base nodehandler with virtual functions and standard implmentations """ 53 """ Base nodehandler with virtual functions and standard implmentations """
53 def __init__(self,xml,tree_node): 54 def __init__(self,xml,tree_node):
54 self.xml = xml 55 self.xml = xml
55 self.mytree_node = tree_node 56 self.mytree_node = tree_node
56 self.tree = component.get('tree') 57 self.tree = component.get('tree')
57 #self.tree = component.get('tree_fs')
58 self.frame = component.get('frame') 58 self.frame = component.get('frame')
59 self.chat = component.get('chat') 59 self.chat = component.get('chat')
60 self.drag = True 60 self.drag = True
61 self.myeditor = None # designing 61 self.myeditor = None # designing
62 self.myviewer = None # prett print 62 self.myviewer = None # prett print
280 return None 280 return None
281 281
282 def get_html_panel(self,parent): 282 def get_html_panel(self,parent):
283 html_str = "<html><body bgcolor=\"#FFFFFF\" >"+self.tohtml()+"</body></html>" 283 html_str = "<html><body bgcolor=\"#FFFFFF\" >"+self.tohtml()+"</body></html>"
284 wnd = wx.html.HtmlWindow(parent,-1) 284 wnd = wx.html.HtmlWindow(parent,-1)
285 html_str = self.chat.ParseDice(html_str) 285 html_str = Parse.Dice(html_str)
286 wnd.SetPage(html_str) 286 wnd.SetPage(html_str)
287 return wnd 287 return wnd
288 288
289 def get_size_constraint(self): 289 def get_size_constraint(self):
290 return 0 290 return 0
384 self.file_node = self.xml[0] 384 self.file_node = self.xml[0]
385 self.frame = component.get('frame') 385 self.frame = component.get('frame')
386 386
387 def on_ldclick(self,evt): 387 def on_ldclick(self,evt):
388 file_name = self.file_node.get("name") 388 file_name = self.file_node.get("name")
389 self.tree.insert_xml(open(orpg.dirpath.dir_struct["nodes"] + file_name,"r").read()) 389 try: self.tree.insert_xml(open(orpg.dirpath.dir_struct["nodes"] + file_name,"r").read())
390 except: wx.MessageBox('Invalid File', 'Error')
390 return 1 391 return 1
391 392
392 def on_design(self,evt): 393 def on_design(self,evt):
393 tlist = ['Title','File Name'] 394 tlist = ['Title','File Name']
394 vlist = [self.xml.get("name"), 395 vlist = [self.xml.get("name"),