diff orpg/gametree/nodehandlers/core.py @ 160:52100f68dfe1 beta

Traipse Beta 'OpenRPG' {091126-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 (Beta) New Features: Added Bookmarks Added 'boot' command to remote admin Added confirmation window for sent nodes Minor changes to allow for portability to an OpenSUSE linux OS Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG Zoom Mouse plugin added Images added to Plugin UI Switching to Element Tree Map efficiency, from FlexiRPG Added Status Bar to Update Manager New TrueDebug Class in orpg_log (See documentation for usage) Portable Mercurial Tip of the Day added, from Core and community New Reference Syntax added for custom PC sheets New Child Reference for gametree New Gametree Recursion method, mapping, context sensitivity, and effeciency.. New Features node with bonus nodes and Node Referencing help added Fixes: Fix to Text based Server Fix to Remote Admin Commands Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core Fix to Map from gametree not showing to all clients Fix to gametree about menus Fix to Password Manager check on startup Fix to PC Sheets from tool nodes. They now use the tabber_panel Fixed Whiteboard ID to prevent random line or text deleting. Modified ID's to prevent non updated clients from ruining the fix. *Whiteboard from Core not showing* default_manifest.xml renamed to default_upmana.xml Fix to Update Manager; cleaner clode for saved repositories
author sirebral
date Thu, 26 Nov 2009 14:25:47 -0600
parents 3b6888bb53b5
children 0d9b746b5751
line wrap: on
line diff
--- a/orpg/gametree/nodehandlers/core.py	Wed Nov 25 14:25:25 2009 -0600
+++ b/orpg/gametree/nodehandlers/core.py	Thu Nov 26 14:25:47 2009 -0600
@@ -53,9 +53,9 @@
     def __init__(self,xml,tree_node):
         self.xml = xml
         self.mytree_node = tree_node
-        self.tree = open_rpg.get_component('tree')
-        self.frame = open_rpg.get_component('frame')
-        self.chat = open_rpg.get_component('chat')
+        self.tree = component.get('tree')
+        self.frame = component.get('frame')
+        self.chat = component.get('chat')
         self.drag = True
         self.myeditor = None # designing
         self.myviewer = None # prett print
@@ -381,7 +381,7 @@
     def __init__(self,xml,tree_node):
         node_handler.__init__(self,xml,tree_node)
         self.file_node = self.xml[0]
-        self.frame = open_rpg.get_component('frame')
+        self.frame = component.get('frame')
 
     def on_ldclick(self,evt):
         file_name = self.file_node.get("name")
@@ -413,7 +413,7 @@
     def __init__(self,xml,tree_node):
         node_handler.__init__(self,xml,tree_node)
         self.file_node = self.xml[0]
-        self.frame = open_rpg.get_component('frame')
+        self.frame = component.get('frame')
 
     def on_ldclick(self,evt):
         file_name = self.file_node.get("url")
@@ -444,9 +444,14 @@
     """
     def __init__(self,xml,tree_node):
         node_handler.__init__(self,xml,tree_node)
-        self.map = open_rpg.get_component('map')
-        self.mapdata = self.xml[0]
+        self.map = component.get('map')
+        self.mapdata = self.xml.find('map')
 
     def on_ldclick(self,evt):
+        if (component.get('session').my_role() != component.get('session').ROLE_GM):
+            component.get('chat').InfoPost("You must be a GM to use this feature")
+            return
         self.map.new_data(tostring(self.mapdata))
+        component.get('session').send(tostring(self.mapdata))
+        self.map.canvas.send_map_data()
         return 1