Imported from archive.
authorJeremy Stanley <fungi@yuggoth.org>
Thu, 25 Aug 2005 02:25:34 +0000 (02:25 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Thu, 25 Aug 2005 02:25:34 +0000 (02:25 +0000)
commitda136e612520ef6a3a19d99563e44b6518f91e7e
treeea61f355497b4879022e164e5078a4a3e39a8c3f
parent1ff00115321d800bec7313a3fdfc97a8b0b006fa
Imported from archive.

* lib/menus/active: Merged into lib/menus/miscellaneous and removed.

* lib/menus/miscellaneous (choose_gender, choose_name)
(main_utility): Added menus to enter/exit the game, select gender
and pick a randomly-generated avatar name from a list.

* lib/muff/muffcmds.py: Changed user state names to employ
underscores instead of spaces.
(command_show): New admin command to ease debugging of data
relationships.
(generic_menu_handler): New function abstract out common routines
from typical menu state handlers.
(handle_user_input): For aesthetics, user input is now followed by a
blank line of output if we expect the client isn't echoing.

* lib/muff/muffmain.py (main): The main loop is now followed by a
muffiniv.universe.save during shutdown, in case any changes have
occurred since the last save.

* lib/muff/muffmenu.py
(get_menu): Refactored to be more modular, and broke out a lot of
its pieces into additional functions.
(get_choice_action, get_choice_branch, get_default_action)
(get_default_branch, get_default_menu_choice)
(get_formatted_default_menu_choice, get_formatted_menu_choices)
(get_menu_actions, get_menu_branches, get_menu_choices)
(get_menu_description, get_menu_prompt): New functions abstracted
out of the previously spaghetti-like get_menu function.
(get_echo_message, get_echo_sequence, menu_echo_on): New functions
to take care of enabling and disabling echo for password prompts.

* lib/muff/muffmisc.py (replace_macros): Implemented gender-specific
pronoun replacement macros, to make English-language messages less
awkward.

* lib/muff/muffuniv.py: New module implementing DataFile, Element
and Universe classes, for a more object-oriented approach.

* muff: Renamed to mud.py.

* muff.conf: Renamed to mudpy.conf.
20 files changed:
lib/commands/active
lib/index [new file with mode: 0644]
lib/menus/account_creation
lib/menus/active [deleted file]
lib/menus/index
lib/menus/login
lib/menus/miscellaneous
lib/muff/__init__.py
lib/muff/muffcmds.py
lib/muff/muffconf.py
lib/muff/muffmain.py
lib/muff/muffmenu.py
lib/muff/muffmisc.py
lib/muff/muffuniv.py [new file with mode: 0644]
lib/muff/muffuser.py
lib/muff/muffvars.py
lib/universe/index [new file with mode: 0644]
lib/universe/rooms [new file with mode: 0644]
mud.py [moved from muff with 97% similarity]
mudpy.conf [moved from muff.conf with 97% similarity]