diff --git a/Frotz/README.md b/TextAdventures/README.md similarity index 100% rename from Frotz/README.md rename to TextAdventures/README.md diff --git a/Frotz/__init__.py b/TextAdventures/__init__.py similarity index 92% rename from Frotz/__init__.py rename to TextAdventures/__init__.py index a6670b7..5ce2458 100644 --- a/Frotz/__init__.py +++ b/TextAdventures/__init__.py @@ -6,7 +6,7 @@ ### """ -Frotz: Play interactive fiction games +TextAdventures: Play interactive fiction games """ import supybot @@ -40,5 +40,5 @@ if world.testing: from . import test Class = plugin.Class -Frotz = config.Frotz +TextAdventures = config.TextAdventures diff --git a/Frotz/config.py b/TextAdventures/config.py similarity index 72% rename from Frotz/config.py rename to TextAdventures/config.py index 06522f4..b4b3dc6 100644 --- a/Frotz/config.py +++ b/TextAdventures/config.py @@ -9,7 +9,7 @@ import supybot.conf as conf import supybot.registry as registry try: from supybot.i18n import PluginInternationalization - _ = PluginInternationalization('Frotz') + _ = PluginInternationalization('TextAdventures') except: # Placeholder that allows to run the plugin on a bot # without the i18n module @@ -22,14 +22,14 @@ def configure(advanced): # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn - conf.registerPlugin('Frotz', True) + conf.registerPlugin('TextAdventures', True) -Frotz = conf.registerPlugin('Frotz') +TextAdventures = conf.registerPlugin('TextAdventures') -conf.registerGlobalValue(Frotz, 'dfrotzPath', +conf.registerGlobalValue(TextAdventures, 'dfrotzPath', registry.String('/usr/local/bin/dfrotz', _("""The path to the dfrotz executable."""))) -conf.registerGlobalValue(Frotz, 'allowPrivate', +conf.registerGlobalValue(TextAdventures, 'allowPrivate', registry.Boolean('True', _("""Allow games to be played over private message."""))) -Frotz = conf.registerPlugin('Frotz') +TextAdventures = conf.registerPlugin('TextAdventures') diff --git a/Frotz/games/a_mind_forever_voyaging.z4 b/TextAdventures/games/a_mind_forever_voyaging.z4 similarity index 100% rename from Frotz/games/a_mind_forever_voyaging.z4 rename to TextAdventures/games/a_mind_forever_voyaging.z4 diff --git a/Frotz/games/adventure.z5 b/TextAdventures/games/adventure.z5 similarity index 100% rename from Frotz/games/adventure.z5 rename to TextAdventures/games/adventure.z5 diff --git a/Frotz/games/ballyhoo.z3 b/TextAdventures/games/ballyhoo.z3 similarity index 100% rename from Frotz/games/ballyhoo.z3 rename to TextAdventures/games/ballyhoo.z3 diff --git a/Frotz/games/beyond_zork.z5 b/TextAdventures/games/beyond_zork.z5 similarity index 100% rename from Frotz/games/beyond_zork.z5 rename to TextAdventures/games/beyond_zork.z5 diff --git a/Frotz/games/border_zone.z5 b/TextAdventures/games/border_zone.z5 similarity index 100% rename from Frotz/games/border_zone.z5 rename to TextAdventures/games/border_zone.z5 diff --git a/Frotz/games/cutthroats.z3 b/TextAdventures/games/cutthroats.z3 similarity index 100% rename from Frotz/games/cutthroats.z3 rename to TextAdventures/games/cutthroats.z3 diff --git a/Frotz/games/deadline.z3 b/TextAdventures/games/deadline.z3 similarity index 100% rename from Frotz/games/deadline.z3 rename to TextAdventures/games/deadline.z3 diff --git a/Frotz/games/enchanter.z3 b/TextAdventures/games/enchanter.z3 similarity index 100% rename from Frotz/games/enchanter.z3 rename to TextAdventures/games/enchanter.z3 diff --git a/Frotz/games/hitchhikers_guide.z5 b/TextAdventures/games/hitchhikers_guide.z5 similarity index 100% rename from Frotz/games/hitchhikers_guide.z5 rename to TextAdventures/games/hitchhikers_guide.z5 diff --git a/Frotz/games/hollywood_hijinx.z3 b/TextAdventures/games/hollywood_hijinx.z3 similarity index 100% rename from Frotz/games/hollywood_hijinx.z3 rename to TextAdventures/games/hollywood_hijinx.z3 diff --git a/Frotz/games/infidel.z3 b/TextAdventures/games/infidel.z3 similarity index 100% rename from Frotz/games/infidel.z3 rename to TextAdventures/games/infidel.z3 diff --git a/Frotz/games/leather_goddesses_of_phobos.z5 b/TextAdventures/games/leather_goddesses_of_phobos.z5 similarity index 100% rename from Frotz/games/leather_goddesses_of_phobos.z5 rename to TextAdventures/games/leather_goddesses_of_phobos.z5 diff --git a/Frotz/games/lurking_horror.z3 b/TextAdventures/games/lurking_horror.z3 similarity index 100% rename from Frotz/games/lurking_horror.z3 rename to TextAdventures/games/lurking_horror.z3 diff --git a/Frotz/games/moonmist.z3 b/TextAdventures/games/moonmist.z3 similarity index 100% rename from Frotz/games/moonmist.z3 rename to TextAdventures/games/moonmist.z3 diff --git a/Frotz/games/nord_and_bert.z4 b/TextAdventures/games/nord_and_bert.z4 similarity index 100% rename from Frotz/games/nord_and_bert.z4 rename to TextAdventures/games/nord_and_bert.z4 diff --git a/Frotz/games/planetfall.z5 b/TextAdventures/games/planetfall.z5 similarity index 100% rename from Frotz/games/planetfall.z5 rename to TextAdventures/games/planetfall.z5 diff --git a/Frotz/games/plundered_hearts.z3 b/TextAdventures/games/plundered_hearts.z3 similarity index 100% rename from Frotz/games/plundered_hearts.z3 rename to TextAdventures/games/plundered_hearts.z3 diff --git a/Frotz/games/sampler1.z3 b/TextAdventures/games/sampler1.z3 similarity index 100% rename from Frotz/games/sampler1.z3 rename to TextAdventures/games/sampler1.z3 diff --git a/Frotz/games/sampler2.z3 b/TextAdventures/games/sampler2.z3 similarity index 100% rename from Frotz/games/sampler2.z3 rename to TextAdventures/games/sampler2.z3 diff --git a/Frotz/games/seastalker.z3 b/TextAdventures/games/seastalker.z3 similarity index 100% rename from Frotz/games/seastalker.z3 rename to TextAdventures/games/seastalker.z3 diff --git a/Frotz/games/sherlock_holmes.z5 b/TextAdventures/games/sherlock_holmes.z5 similarity index 100% rename from Frotz/games/sherlock_holmes.z5 rename to TextAdventures/games/sherlock_holmes.z5 diff --git a/Frotz/games/sorcery.z3 b/TextAdventures/games/sorcery.z3 similarity index 100% rename from Frotz/games/sorcery.z3 rename to TextAdventures/games/sorcery.z3 diff --git a/Frotz/games/spellbreaker.z3 b/TextAdventures/games/spellbreaker.z3 similarity index 100% rename from Frotz/games/spellbreaker.z3 rename to TextAdventures/games/spellbreaker.z3 diff --git a/Frotz/games/starcross.z3 b/TextAdventures/games/starcross.z3 similarity index 100% rename from Frotz/games/starcross.z3 rename to TextAdventures/games/starcross.z3 diff --git a/Frotz/games/stationfall.z3 b/TextAdventures/games/stationfall.z3 similarity index 100% rename from Frotz/games/stationfall.z3 rename to TextAdventures/games/stationfall.z3 diff --git a/Frotz/games/suspect.z3 b/TextAdventures/games/suspect.z3 similarity index 100% rename from Frotz/games/suspect.z3 rename to TextAdventures/games/suspect.z3 diff --git a/Frotz/games/suspended.z3 b/TextAdventures/games/suspended.z3 similarity index 100% rename from Frotz/games/suspended.z3 rename to TextAdventures/games/suspended.z3 diff --git a/Frotz/games/trinity.z4 b/TextAdventures/games/trinity.z4 similarity index 100% rename from Frotz/games/trinity.z4 rename to TextAdventures/games/trinity.z4 diff --git a/Frotz/games/wishbringer.z5 b/TextAdventures/games/wishbringer.z5 similarity index 100% rename from Frotz/games/wishbringer.z5 rename to TextAdventures/games/wishbringer.z5 diff --git a/Frotz/games/witness.z3 b/TextAdventures/games/witness.z3 similarity index 100% rename from Frotz/games/witness.z3 rename to TextAdventures/games/witness.z3 diff --git a/Frotz/games/zork1.z5 b/TextAdventures/games/zork1.z5 similarity index 100% rename from Frotz/games/zork1.z5 rename to TextAdventures/games/zork1.z5 diff --git a/Frotz/games/zork2.z3 b/TextAdventures/games/zork2.z3 similarity index 100% rename from Frotz/games/zork2.z3 rename to TextAdventures/games/zork2.z3 diff --git a/Frotz/games/zork3.z3 b/TextAdventures/games/zork3.z3 similarity index 100% rename from Frotz/games/zork3.z3 rename to TextAdventures/games/zork3.z3 diff --git a/Frotz/plugin.py b/TextAdventures/plugin.py similarity index 88% rename from Frotz/plugin.py rename to TextAdventures/plugin.py index f5f3688..53e3e15 100644 --- a/Frotz/plugin.py +++ b/TextAdventures/plugin.py @@ -17,28 +17,28 @@ import re try: from supybot.i18n import PluginInternationalization - _ = PluginInternationalization('Infocom') + _ = PluginInternationalization('TextAdventures') except ImportError: # Placeholder that allows to run the plugin on a bot # without the i18n module _ = lambda x: x -class Frotz(callbacks.Plugin): +class TextAdventures(callbacks.Plugin): """ - Play Infocom (Interactive Fiction, Z_machine) Games. + Play Text Adventure Games (Infocom, Interactive Fiction, Z-Machine) . """ threaded = True def __init__(self, irc): - self.__parent = super(Frotz, self) + self.__parent = super(TextAdventures, self) self.__parent.__init__(irc) self.game = {} self.game_path = "{0}/games/".format(os.path.dirname(os.path.abspath(__file__))) - self.binary = self.registryValue('dfrotzPath') + self.binary = self.registryValue('dFrotzPath') - def load(self, irc, msg, args, input): + def open(self, irc, msg, args, input): """ - Load . + Open . """ channel = msg.args[0] if not self.registryValue('allowPrivate') and not irc.isChannel(channel): @@ -53,12 +53,12 @@ class Frotz(callbacks.Plugin): else: irc.reply("Starting {0} on {1}. Please wait...".format(game_name, channel)) game_file= "{0}{1}".format(self.game_path, game_name) - self.game[channel] = pexpect.spawn("{0} -S 0 {1}".format(self.binary, game_file)) + self.game[channel] = pexpect.spawn("{0} -m -S 0 {1}".format(self.binary, game_file)) response = self.output(self.game[channel]) for line in response: if line.strip() and line.strip() != ".": irc.reply(line, prefixNick=False) - load = wrap(load, ['text']) + open = wrap(open, ['text']) def output(self, output): response = [] @@ -90,9 +90,9 @@ class Frotz(callbacks.Plugin): if line.strip() and line.strip() != ".": irc.reply(line, prefixNick=False) - def stop(self, irc, msg, args): + def end(self, irc, msg, args): """ - Stop game. + End text adventure game. """ channel = msg.args[0] if not irc.isChannel(channel): @@ -111,7 +111,7 @@ class Frotz(callbacks.Plugin): except: return return - stop = wrap(stop) + end = wrap(end) def z(self, irc, msg, args, command): """[] @@ -143,5 +143,5 @@ class Frotz(callbacks.Plugin): irc.reply(reply, prefixNick=False) games = wrap(games) -Class = Frotz +Class = TextAdventures diff --git a/Frotz/requirements.txt b/TextAdventures/requirements.txt similarity index 100% rename from Frotz/requirements.txt rename to TextAdventures/requirements.txt diff --git a/Frotz/test.py b/TextAdventures/test.py similarity index 85% rename from Frotz/test.py rename to TextAdventures/test.py index 1af6ce4..d465cc4 100644 --- a/Frotz/test.py +++ b/TextAdventures/test.py @@ -9,9 +9,8 @@ from supybot.test import * class InfocomTestCase(PluginTestCase): - plugins = ('Frotz',) + plugins = ('TextAdventures',) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: -