Mercurial > traipse_dev
comparison plugins/xxnamesound.py @ 66:c54768cffbd4 ornery-dev
Traipse Dev 'OpenRPG' {090818-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:
*Unstable*
This is the first wave of Code Refinement updates. Includes new material from Core Beta; new debugger material (partially implemented), beginnings of switch to etree, TerminalWriter, and a little more. open_rpg has been renamed to component; functioning now as component.get(), component.add(), component.delete(). This version has known bugs, specifically with the gametree and nodes. I think the XML files where not removed during testing of Core and switching back.
author | sirebral |
---|---|
date | Tue, 18 Aug 2009 06:33:37 -0500 |
parents | 4385a7d0efd1 |
children |
comparison
equal
deleted
inserted
replaced
65:4840657c23c5 | 66:c54768cffbd4 |
---|---|
1 import os | 1 import os |
2 import orpg.pluginhandler | 2 import orpg.pluginhandler |
3 import orpg.dirpath | 3 from orpg.dirpath import dir_struct |
4 import re | 4 import re |
5 import string | 5 import string |
6 from orpg.orpgCore import open_rpg | 6 from orpg.orpgCore import component |
7 | 7 |
8 class Plugin(orpg.pluginhandler.PluginHandler): | 8 class Plugin(orpg.pluginhandler.PluginHandler): |
9 # Initialization subroutine. | 9 # Initialization subroutine. |
10 # | 10 # |
11 # !self : instance of self | 11 # !self : instance of self |
37 self.plugin_addcommand('/wnotify', self.on_wnotify, 'This will toggle notification on incoming whispers') | 37 self.plugin_addcommand('/wnotify', self.on_wnotify, 'This will toggle notification on incoming whispers') |
38 self.plugin_addcommand('/sfile', self.on_sfile, 'This will set the sound file to use for notification') | 38 self.plugin_addcommand('/sfile', self.on_sfile, 'This will set the sound file to use for notification') |
39 | 39 |
40 self.names = self.plugindb.GetList("xxnamesound", "names", []) | 40 self.names = self.plugindb.GetList("xxnamesound", "names", []) |
41 | 41 |
42 self.soundplayer = self.sound_player = open_rpg.get_component('sound') | 42 self.soundplayer = self.sound_player = component.get('sound') |
43 | 43 |
44 tmp = self.plugindb.GetString('xxnamesound', 'wnotify', str(self.notify)) | 44 tmp = self.plugindb.GetString('xxnamesound', 'wnotify', str(self.notify)) |
45 if tmp == 'True': | 45 if tmp == 'True': |
46 self.on_wnotify(None) | 46 self.on_wnotify(None) |
47 | 47 |
48 self.soundfile = self.plugindb.GetString('xxnamesound', 'soundfile', orpg.dirpath.dir_struct['plugins'] + 'heya.wav') | 48 self.soundfile = self.plugindb.GetString('xxnamesound', 'soundfile', dir_struct['plugins'] + 'heya.wav') |
49 | 49 |
50 | 50 |
51 reg = [] | 51 reg = [] |
52 | 52 |
53 if not self.chat.html_strip(self.session.name.lower()) in self.names: | 53 if not self.chat.html_strip(self.session.name.lower()) in self.names: |