changeset 245:682032381be8 beta

Traipse Beta 'OpenRPG' {101130-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 (Closing/Closed) New Features: New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order New to Server GUI, can now clear log New Earthdawn Dieroller New IronClaw roller, sheet, and image Updates: Update to Warhammer PC Sheet. Rollers set as macros. Should work with little maintanence. Update to Browser Server window. Display rooms with ' " & cleaner Update to Server. Handles ' " & cleaner Update to Dieroller. Cleaner, more effecient expression system Update to Hidden Die plugin, allows for non standard dice rolls Fixes: Fix to InterParse that was causing an Infernal Loop with Namespace Internal Fix to XML data, removed old Minidom and switched to Element Tree Fix to Server that was causing eternal attempt to find a Server ID, in Register Rooms thread Fix to metaservers.xml file not being created Fix to Single and Double quotes in Whiteboard text Fix to Background images not showing when using the Image Server Fix to Duplicate chat names appearing Fix to Server GUI's logging output Fix to FNB.COLORFUL_TABS bug Fix to Gametree for XSLT Sheets Fix to Gametree for locating gametree files Fix to Send to Chat from Gametree Fix to Gametree, renaming and remapping operates correctly Fix to aliaslib, prevents error caused when SafeHTML is sent None
author sirebral
date Tue, 30 Nov 2010 02:34:58 -0600
parents be04d07341f3
children 712df3d5b54c
files orpg/dieroller/rollers/ironclaw.py orpg/gametree/nodehandlers/dnd35.py orpg/orpg_version.py orpg/tools/InterParse.py orpg/tools/aliaslib.py plugins/xxooc.py
diffstat 6 files changed, 24 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/dieroller/rollers/ironclaw.py	Mon Oct 18 23:52:56 2010 -0500
+++ b/orpg/dieroller/rollers/ironclaw.py	Tue Nov 30 02:34:58 2010 -0600
@@ -292,8 +292,8 @@
                 f += 1
                 if f > t: 
                     f -= 1; cW += 1
-                    if (cW >= 6) and not tie:
-                        deathTest = self.deathTest(cW, body)
+                    if (cW >= mW-6) and not tie:
+                        deathTest = self.deathTest(cW+(12-mW), body)
                         if deathTest[0] == 'Dead': tie = True; myStr += deathTest[1]
                         if deathTest[2] in ['failure', 'riposte', 'tie', 'botch']: tie = True; myStr += deathTest[1]
                         else: myStr += deathTest[1]
@@ -302,8 +302,8 @@
             if mod > 0:
                 for x in xrange(0, mod):
                     cW += 1
-                    if (cW >= 6) and not tie:
-                        deathTest = self.deathTest(cW, body)
+                    if (cW >= mW-6) and not tie:
+                        deathTest = self.deathTest(cW+(12-mW), body)
                         if deathTest[0] == 'Dead': tie = True; myStr += deathTest[1]
                         if deathTest[2] in ['failure', 'riposte', 'tie', 'botch']: tie = True; myStr += deathTest[1]
                         else: myStr += deathTest[1]
--- a/orpg/gametree/nodehandlers/dnd35.py	Mon Oct 18 23:52:56 2010 -0500
+++ b/orpg/gametree/nodehandlers/dnd35.py	Tue Nov 30 02:34:58 2010 -0600
@@ -276,7 +276,7 @@
             nodeName = 'Languages'
             value = self.lang.GetValue()
         for node in self.n_list:
-            if node._get_tagName() == nodeName: node.text = value
+            if node.tag == nodeName: node.text = value
 
     def saveMoney(self, row, col):
         value = self.grid.GetCellValue(row, col)
--- a/orpg/orpg_version.py	Mon Oct 18 23:52:56 2010 -0500
+++ b/orpg/orpg_version.py	Tue Nov 30 02:34:58 2010 -0600
@@ -4,7 +4,7 @@
 #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed)
 DISTRO = "Traipse Beta"
 DIS_VER = "Ornery Orc"
-BUILD = "101018-01"
+BUILD = "101130-00"
 
 # This version is for network capability.
 PROTOCOL_VERSION = "1.2"
--- a/orpg/tools/InterParse.py	Mon Oct 18 23:52:56 2010 -0500
+++ b/orpg/tools/InterParse.py	Tue Nov 30 02:34:58 2010 -0600
@@ -44,9 +44,9 @@
         tab.set_colors()
         tab.Post(s, send, myself)
 
-    def ParseLogic(self, s, node):
+    def ParseLogic(self, s, node=None):
         'Nodes now parse through ParsLogic. Easily add new parse rules right here!!'
-        s = self.NameSpaceE(s)
+        if not node: s = self.NameSpaceE(s)
         s = self.NameSpaceI(s, node)
         #s = self.NodeMap(s, node)
         #s = self.NodeParent(s, node)
@@ -171,14 +171,14 @@
         for i in xrange(0,len(matches)):
             ## Build the new tree_map
             new_map = tree_map.split('::')
+            if new_map == ['']: new_map = [node.get('name')]
             find = matches[i][1].split('::')
             ## Backwards Reference the Parent Children
             node = self.get_node(new_map)
             newstr = self.LocationCheck(node, tree_map, new_map, find)
             s = s.replace(matches[i][0], newstr, 1)
             s = s.replace(u'\xa0', ' ')
-            #s = self.NodeMap(s, node)
-            #s = self.NodeParent(s, node)
+            s = self.NameSpaceI(s, node)
         return s
 
     def NameSpaceXE(self, s):
--- a/orpg/tools/aliaslib.py	Mon Oct 18 23:52:56 2010 -0500
+++ b/orpg/tools/aliaslib.py	Tue Nov 30 02:34:58 2010 -0600
@@ -473,21 +473,25 @@
         filters = xml_dom.findall("filter")
         flist = []
         self.regExList = []
-        for filter in filters:
-            flist.append(filter.get("name"))
-            rules = filter.findall("rule")
+        for f in filters:
+            flist.append(f.get("name"))
+            rules = f.findall("rule")
             sub = []
-            for rule in rules: sub.append([self.MakeSafeHTML(rule.get("match")), 
+            for rule in rules: 
+                sub.append([self.MakeSafeHTML(rule.get("match")), 
                                         self.MakeSafeHTML(rule.get("sub"))])
             self.regExList.append(sub)
         self.filterList = flist
         self.alias = 0
         self.filter = 0
 
-    def MakeSafeHTML(self, str):
-        return str.replace("&amp;", "&").replace("&lt;", "<").replace("&quot;", '"').replace("&gt;", ">").replace("&#39;", "'")
-    def MakeHTMLSafe(self, str):
-        return str.replace("&", "&amp;").replace("<", "&lt;").replace('"', "&quot;").replace(">", "&gt;").replace("'", "&#39;")
+    def MakeSafeHTML(self, s):
+        if s == None: return ''
+        return s.replace("&amp;", "&").replace("&lt;", "<").replace("&quot;", '"').replace("&gt;", ">").replace("&#39;", "'")
+
+    def MakeHTMLSafe(self, s):
+        return s.replace("&", "&amp;").replace("<", "&lt;").replace('"', "&quot;").replace(">", "&gt;").replace("'", "&#39;")
+
     def ImportFromTree(self, xml_dom):
         oldfilename = self.filename
         if xml_dom.get('name') == 'Alias Library':
--- a/plugins/xxooc.py	Mon Oct 18 23:52:56 2010 -0500
+++ b/plugins/xxooc.py	Tue Nov 30 02:34:58 2010 -0600
@@ -1,4 +1,4 @@
-import os
+from orpg.tools.InterParse import Parse
 import orpg.pluginhandler
 
 class Plugin(orpg.pluginhandler.PluginHandler):
@@ -8,7 +8,6 @@
     # !chat : instance of the chat window to write to
     def __init__(self, plugindb, parent):
         orpg.pluginhandler.PluginHandler.__init__(self, plugindb, parent)
-
         # The Following code should be edited to contain the proper information
         self.name = 'OOC Comments Tool'
         self.author = 'mDuo13'
@@ -17,16 +16,14 @@
 
     def plugin_enabled(self):
         #This is where you set any variables that need to be initalized when your plugin starts
-
         self.plugin_addcommand('/ooc', self.on_ooc, 'message - This puts (( message )) to let other players know you are talking out of character')
 
 
     def plugin_disabled(self):
         #Here you need to remove any commands you added, and anything else you want to happen when you disable the plugin
         #such as closing windows created by the plugin
-
         self.plugin_removecmd('/ooc')
 
     def on_ooc(self, cmdargs):
         #this is just an example function for a command you create create your own
-        self.chat.ParsePost('(( ' + cmdargs + ' ))', 1, 1)
+        Parse.Post('(( ' + cmdargs + ' ))', False, True, True)