Mercurial > traipse_dev
changeset 63:c160f26ecf65 ornery-dev
Traipse Dev 'OpenRPG' {090817-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:
Minor fixes to plugins. Hidden Die Roll no longer prints out data to the terminal. Bug fix in Simple Init; if the Auto Advance check was off and members were added, buttons would remain disabled. Added new CSS classes to Simple Init posts. Fix to Chat Log so log parses CSS classes correctly. Added Text Color button from Core; background color defaults to your settings. Fix to Alias Lib so panes have a minimum size.
author | sirebral |
---|---|
date | Mon, 17 Aug 2009 00:56:02 -0500 |
parents | e8029caed892 |
children | 5a3f8d9181eb |
files | images/b_d10.gif images/b_d100.gif images/b_d12.gif images/b_d20.gif images/b_d4.gif images/b_d6.gif images/b_d8.gif images/textcolor.gif orpg/chat/chatwnd.py orpg/orpg_version.py orpg/tools/aliaslib.py plugins/xxhiddendice.py plugins/xxsimpleinit.py |
diffstat | 13 files changed, 44 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/orpg/chat/chatwnd.py Thu Aug 13 13:01:09 2009 -0500 +++ b/orpg/chat/chatwnd.py Mon Aug 17 00:56:02 2009 -0500 @@ -102,7 +102,7 @@ htmlstripper.close() return htmlstripper.accum -def log( settings, text ): +def log( settings, c, text ): filename = settings.get_setting('GameLogPrefix') if filename > '' and filename[0] != commands.ANTI_LOG_CHAR: filename = filename + time.strftime( '-%Y-%m-%d.html', time.localtime( time.time() ) ) @@ -112,7 +112,7 @@ if settings.get_setting('TimeStampGameLog') != '1': header = '' try: f = open( orpg.dirpath.dir_struct["user"] + filename, 'a' ) - f.write( '%s%s<br />\n' % ( header, text ) ) + f.write( '<div class="'+c+'">%s%s</div>\n' % ( header, text ) ) f.close() except: print "could not open " + orpg.dirpath.dir_struct["user"] + filename + ", ignoring..." @@ -932,13 +932,13 @@ self.log.log("Enter chat_panel->build_dice(self)", ORPG_DEBUG) self.numDieText = wx.TextCtrl( self, wx.ID_ANY, "1", size= wx.Size(25, 25), validator=orpg.tools.inputValidator.MathOnlyValidator() ) self.dieModText = wx.TextCtrl( self, wx.ID_ANY, "", size= wx.Size(50, 25), validator=orpg.tools.inputValidator.MathOnlyValidator() ) - self.d4Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d4.gif', 'Roll d4', wx.ID_ANY, '#bdbdbd') - self.d6Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d6.gif', 'Roll d6', wx.ID_ANY, '#bdbdbd') - self.d8Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d8.gif', 'Roll d8', wx.ID_ANY, '#bdbdbd') - self.d10Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d10.gif', 'Roll d10', wx.ID_ANY, '#bdbdbd') - self.d12Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d12.gif', 'Roll d12', wx.ID_ANY, '#bdbdbd') - self.d20Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d20.gif', 'Roll d20', wx.ID_ANY, '#bdbdbd') - self.d100Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d100.gif', 'Roll d100', wx.ID_ANY, '#bdbdbd') + self.d4Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d4.gif', 'Roll d4', wx.ID_ANY) + self.d6Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d6.gif', 'Roll d6', wx.ID_ANY) + self.d8Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d8.gif', 'Roll d8', wx.ID_ANY) + self.d10Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d10.gif', 'Roll d10', wx.ID_ANY) + self.d12Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d12.gif', 'Roll d12', wx.ID_ANY) + self.d20Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d20.gif', 'Roll d20', wx.ID_ANY) + self.d100Button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'b_d100.gif', 'Roll d100', wx.ID_ANY) self.toolbar_sizer.Add( self.numDieText, 0, wx.ALIGN_CENTER | wx.EXPAND) self.toolbar_sizer.Add( self.d4Button, 0 ,wx.EXPAND) self.toolbar_sizer.Add( self.d6Button, 0 ,wx.EXPAND) @@ -1007,12 +1007,16 @@ # Heroman - Ideally, we would use static labels... def build_colorbutton(self): self.log.log("Enter chat_panel->build_colorbutton(self)", ORPG_DEBUG) - self.color_button = wx.Button(self, wx.ID_ANY, "C",wx.Point(0,0), wx.Size(22,0)) - self.saveButton = createMaskedButton( self, orpg.dirpath.dir_struct["icon"]+'save.bmp', 'Save the chatbuffer', wx.ID_ANY, '#c0c0c0', wx.BITMAP_TYPE_BMP ) - self.color_button.SetBackgroundColour(wx.BLACK) - self.color_button.SetForegroundColour(wx.WHITE) + self.color_button = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'textcolor.gif', + 'Text Color', wx.ID_ANY, '#bdbdbd', + wx.BITMAP_TYPE_GIF) + + self.saveButton = createMaskedButton(self, orpg.dirpath.dir_struct["icon"]+'save.bmp', + 'Save the chatbuffer', wx.ID_ANY, + '#c0c0c0', wx.BITMAP_TYPE_BMP ) + self.color_button.SetBackgroundColour(self.settings.get_setting('mytextcolor')) self.toolbar_sizer.Add(self.color_button, 0, wx.EXPAND) - self.toolbar_sizer.Add( self.saveButton, 0, wx.EXPAND ) + self.toolbar_sizer.Add(self.saveButton, 0, wx.EXPAND) self.log.log("Exit chat_panel->build_colorbutton(self)", ORPG_DEBUG) def OnMotion(self, evt): @@ -1768,11 +1772,11 @@ if self.type == WHISPER_TAB: name += " (whispering): " elif self.type == GROUP_TAB: name += self.settings.get_setting("gwtext") + ' ' elif self.sendtarget == 'gm': name += " (whispering to GM) " - newline = self.TimeIndexString() + "<div class='"+c+"'> " +name + s2 + "</div>" - log( self.settings, c+' '+name + s2 ) + newline = "<div class='"+c+"'> " + self.TimeIndexString() + name + s2 + "</div>" + log( self.settings, c, name+s2 ) else: - newline = self.TimeIndexString() + "<div class='"+c+"'> " +name + s + "</div>" - log( self.settings, c+' '+name + s ) + newline = "<div class='"+c+"'> " + self.TimeIndexString() + name + s + "</div>" + log( self.settings, c, name+s ) else: send = False newline = chat_util.strip_unicode(newline) if self.lockscroll == 0:
--- a/orpg/orpg_version.py Thu Aug 13 13:01:09 2009 -0500 +++ b/orpg/orpg_version.py Mon Aug 17 00:56:02 2009 -0500 @@ -4,7 +4,7 @@ #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed) DISTRO = "Traipse Dev" DIS_VER = "Ornery Orc" -BUILD = "090812-00" +BUILD = "090817-00" # This version is for network capability. PROTOCOL_VERSION = "1.2"
--- a/orpg/tools/aliaslib.py Thu Aug 13 13:01:09 2009 -0500 +++ b/orpg/tools/aliaslib.py Mon Aug 17 00:56:02 2009 -0500 @@ -495,7 +495,9 @@ self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnMB_FilterEdit, self.selectFilterWnd) self.textWnd = wx.TextCtrl(rightwnd, wx.ID_ANY, style=wx.TE_MULTILINE|wx.TE_BESTWRAP) leftwnd.SplitHorizontally(self.selectAliasWnd, self.selectFilterWnd) + leftwnd.SetMinimumPaneSize(75) rightwnd.SplitVertically(leftwnd, self.textWnd) + rightwnd.SetMinimumPaneSize(200) self.sizer.Add(self.topBtnSizer, 0, wx.EXPAND) self.sizer.Add(rightwnd, 1, wx.EXPAND) self.sizer.Add(self.middleBtnSizer, 0, wx.EXPAND)
--- a/plugins/xxhiddendice.py Thu Aug 13 13:01:09 2009 -0500 +++ b/plugins/xxhiddendice.py Mon Aug 17 00:56:02 2009 -0500 @@ -42,7 +42,6 @@ return text def post_msg(self, text, myself): - print "post_msg:\n\t" + text c = 0 a = text.find("(hidden roll)")
--- a/plugins/xxsimpleinit.py Thu Aug 13 13:01:09 2009 -0500 +++ b/plugins/xxsimpleinit.py Mon Aug 17 00:56:02 2009 -0500 @@ -14,8 +14,8 @@ # The Following code should be edited to contain the proper information self.name = 'Simple Init' - self.author = 'Dj Gilcrease' - self.help = 'This is a simplistic Init tool that does not relie on Chat message parsing' + self.author = 'Dj Gilcrease + Tyler Starke' + self.help = 'This is a simplistic Init tool that does not rely on Chat message parsing' #You can set variables below here. Always set them to a blank value in this section. Use plugin_enabled #to set their proper values. @@ -45,7 +45,6 @@ self.frame.Bind(wx.EVT_TIMER, self.buttonCheck, self.buttonTimer) self.buttonTimer.Start(250) self.autoAdvancePaused = False - #self.PluginMenu() def plugin_disabled(self): self.plugin_removecmd('/inittoggle') @@ -61,10 +60,8 @@ self.buttonTimer.Stop() del self.buttonTimer - try: - self.frame.Destroy() - except: - pass + try: self.frame.Destroy() + except: pass def on_init(self, cmdargs): if self.frame.IsShown(): @@ -73,7 +70,6 @@ else: self.toggle.Check(True) self.frame.Show() - print self.toggle.IsChecked() def startInit(self, evt=None): if self.frame.initList.GetItemCount() == 0: @@ -103,7 +99,7 @@ self.frame.currentInit = -1 self.round = 0 - self.chat.Post('<font color="#00ff00" size="4"><b>============ START COMBAT ============</b></font>', True, True) + self.chat.Post('<center><font color="#00ff00"><b>== START COMBAT ==</b></font></center>', True, True, c='simpleinit-combat') self.advanceInit() self.frame.Thaw() @@ -152,7 +148,7 @@ self.frame.Thaw() self.advanceTimer.Stop() - self.chat.Post('<font color="#ff0000" size="4"><b>============ END COMBAT ============</b></font>', True, True) + self.chat.Post('<center><font color="#ff0000" ><b>== END COMBAT ==</b></font></center>', True, True, c='simpleinit-combat') def advanceInit(self, evt=None): if not self.frame.nextButton.IsEnabled(): @@ -163,16 +159,16 @@ if self.frame.currentInit.type == 'Effect': newDur = str(int(self.frame.currentInit.duration)-1) self.frame.initList.SetStringItem(self.frame.initIdx, 2, newDur) - msg = '<br><table width="100%" border="1"><tr><td align="center"><center><u><b><font color="#ff0000" size="4">EFFECT NOTICE</font></b></u></center></td></tr>' - msg += '<tr><td align="center"><font color="#000000">' + self.frame.currentInit.name + ' has ' + newDur + ' rounds remaining</font></td></tr></table>' - self.chat.Post(msg, True, True) + msg = '<br><table width="100%" border="1"><tr><td align="center"><center><u><b><font color="#ff0000" >EFFECT NOTICE</font></b></u></center></td></tr>' + msg += '<tr><td align="center"><font color="#000000">' + self.frame.currentInit.name + ' has ' + newDur + ' rounds remaining</font></td></tr></table><br />' + self.chat.Post(msg, True, True, c='simpleinit-effect') wx.CallAfter(self.advanceInit) else: - msg = '<br><table width="100%" border="1"><tr><td align="center"><center><u><font color="#ff0000" size="4"><b>' + self.frame.nextMessage.GetValue() + '</b></font></u></center></td></tr>' - msg += '<tr><td align="center"><b><font size="3"><font color="#ff0000">' + str(self.frame.initIdx+1) + ':</font> ' + msg = '<table width="100%" border="1"><tr><td align="center"><u><font color="#ff0000" ><b>' + self.frame.nextMessage.GetValue() + '</b></font></u></td></tr>' + msg += '<tr><td align="center"><b><font color="#ff0000">' + str(self.frame.initIdx+1) + ':</font> ' msg += '<font color="#0000ff">(' + self.frame.currentInit.init + ')</font> ' - msg += '<font color="#000000">' + self.frame.currentInit.name + '</b></font></font></td></tr></table>' - self.chat.Post(msg, True, True) + msg += '<font color="#000000">' + self.frame.currentInit.name + '</b></font></td></tr></table><br />' + self.chat.Post(msg, True, True, c='simpleinit-pc') if self.frame.currentInit.type == 'Effect' and int(self.frame.currentInit.duration) <= 0: self.frame.Freeze() @@ -205,7 +201,7 @@ def newRound(self): self.round += 1 - msg = '<br><hr><font color="#ff0000" size="4"><b>End of Round #' + str(self.round-1) + ', Starting Round #' + str(self.round) + '</b></font><hr>' + msg = '<br><hr><font color="#ff0000" ><b>End of Round #' + str(self.round-1) + ', Starting Round #' + str(self.round) + '</b></font><hr>' self.chat.Post(msg, True, True) def rollD20Init(self): @@ -214,7 +210,7 @@ return self.orpgframe.Freeze() self.frame.Freeze() - msg = '<br><font color="#0000ff" size="4"><b>============ START INIT LIST ============</b></font><br>' + msg = '<br><center><font color="#0000ff" ><b>== START INIT LIST ==</b></font></center><br>' msg += '<font color="#000000"><b>' for i in xrange(0, self.frame.initList.GetItemCount()): self.frame.currentInit = i @@ -234,8 +230,8 @@ msg += '</b></font><br>' self.frame.initList.SortItems(self.frame.initSort) - msg += '<font color="#0000ff" size="4"><b>============ END INIT LIST ============</b></font>' - self.chat.Post(msg, True, True) + msg += '<center><font color="#0000ff" ><b>== END INIT LIST ==</b></center></font>' + self.chat.Post(msg, True, True, c='simpleinit-lst') self.frame.Thaw() if self.frame.IsShown(): @@ -248,8 +244,6 @@ self.rollD20Init() def buttonCheck(self, evt): - if self.autoAdvancePaused: - return if self.frame.initList.GetItemCount() == 0: self.frame.Freeze() self.advanceTimer.Stop() @@ -269,6 +263,8 @@ self.frame.deleteButton.Enable() self.frame.saveButton.Enable() self.frame.clearButton.Enable() + if self.autoAdvancePaused: + return if not self.frame.autoAdvanceCheck.IsChecked(): self.frame.autoAdvanceToggle.Disable()