2007-04-08 10:36:36 +00:00
|
|
|
/**************************************************************************
|
|
|
|
|
* File: redit.c Part of tbaMUD *
|
|
|
|
|
* Usage: Oasis OLC - Rooms. *
|
|
|
|
|
* *
|
|
|
|
|
* By Levork. Copyright 1996 Harvey Gilpin. 1997-2001 George Greer. *
|
|
|
|
|
**************************************************************************/
|
2006-12-19 22:56:18 +00:00
|
|
|
|
|
|
|
|
#include "conf.h"
|
|
|
|
|
#include "sysdep.h"
|
|
|
|
|
#include "structs.h"
|
|
|
|
|
#include "utils.h"
|
|
|
|
|
#include "comm.h"
|
|
|
|
|
#include "interpreter.h"
|
|
|
|
|
#include "db.h"
|
|
|
|
|
#include "boards.h"
|
|
|
|
|
#include "genolc.h"
|
|
|
|
|
#include "genwld.h"
|
|
|
|
|
#include "genzon.h"
|
|
|
|
|
#include "oasis.h"
|
|
|
|
|
#include "improved-edit.h"
|
|
|
|
|
#include "dg_olc.h"
|
|
|
|
|
#include "constants.h"
|
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line
Minor Bugfix: All game configuration settings now reference the world config
structure, not the individual config variables found in config.c.
------------------------------------------------------------------------
rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line
Added lib/world/qst/ directory, index, index.mini, and 0.qst.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines
Bugfix: the include directory (for .h files) is now referenced correctly in the
depend statement.
Deletion: listrent.c removed as a separate utility.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line
Enhancement: utils/ Makefile will now use a depends file, and looks for dependen
cies in the ../ directory (shrinks the necessary information to make each utilit
y).
------------------------------------------------------------------------
Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line
Made TBA specific changes. do_cheat, removed help level checking, and advance to
level 32.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line
Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a
ttribution for the changes. (Thanks seqwith.)
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines
Changed Makefile.in to use glob expressions when building the objects. This
translates into no longer a need to update Makefile.in whenever a new .c file
is added to the mud code. Other Makefile.* have not yet been changed (and
need review, anyway).
All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using
Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen
does, however the tbaMUD (and legacy circle code) has never been marked-up with
the special CXREF codes required to effectively use the program. Since Doxygen
is easier to use, and provides almost as much functionality as CXREF, CXREF
support has been dropped.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line
Bug Fix: asciiflag_conv* functions now can handle a negative numeric value.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line
Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master)
will no longer attempt to wander off.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines
Based on the compiler warning about mag_materials being an unused function, and
the clone spell being unused.
Bug fix: Clone can now be cast. It is an 'ignore' target spell.
Fix and Modification: Clone, being an effectively unused spell that is only used
by mortal Magic Users at level 30, is now implemented as very simple example of
how to use mag_materials(). The item required by mag_materials is vnum 161,
which in stock tbaMUD is some sacrificial entrails.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix for "Did you mean:" including DG commands.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a
door.
Documentation: do_simple_move documented.
------------------------------------------------------------------------
Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line
Trial run of columnizer function on commands list to see how people like it.
------------------------------------------------------------------------
jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line
asciimap, an in game automap, along with a couple of minor bug fixes to do with
the automap, patched in (Thanks Jamdog).
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line
Minor update: Relocate local variable declaration to the top of ACMD(do_help)
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines
Checked in the following placeholders for do_gen_tog:
#define SCMD_AUTOLOOT 24
#define SCMD_AUTOGOLD 25
#define SCMD_AUTOSPLIT 26
#define SCMD_AUTOSAC 27
#define SCMD_AUTOASSIST 28
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line
The Autoquest patch, along with a couple of minor bug fixes, has been integrated
into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.)
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines
Minor Fix:
Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int
index types.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines
Added a new atoidx() conversion function for dealing with string to IDXTYPE
conversions (in utils.c, prototype exported through utils.h).
Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h).
Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c).
------------------------------------------------------------------------
Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line
Fixed direction mapping to give readable directions instead of sub commands.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines
Since general olc editing are automatically saved to disk, 'shutdown reboot' has
been changed to not-autosave by default. (Small change made to do_shutdown in
act.wizard.c).
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines
Changed:
struct attack_hit_type moved to fight.h
attack_hit_text exported through fight.h
------------------------------------------------------------------------
jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines
- do_file heads or tails files correctly and has also been enhanced to return
file info (act.wizard.c)
- defines made for common log files created by autorun, and those used by
do_file (db.h)
- utility functions added: file_head(), file_tail(), file_sizeof(), and
file_numlines() (defined utils.c and exported through utils.h)
------------------------------------------------------------------------
Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line
Fixed export command. (thanks Kyle)
------------------------------------------------------------------------
jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line
Files are now tagged as executable. Should be able to be checked out from subver
sion and executed without running chmod.
------------------------------------------------------------------------
Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line
Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc()
strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back.
------------------------------------------------------------------------
jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line
Event queue function definitions, global variables and defines doxygenated.
------------------------------------------------------------------------
Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line
Updated levels command to use an arg/range and added color parsing to greetings.
(thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line
Doxygen comments completed for weather.c
------------------------------------------------------------------------
Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line
Corrected several 64-bit warnings. (thanks Buggo)
------------------------------------------------------------------------
Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line
Added get_flag_by_name allowing for new trigedit variable checks like
%actor.pref(FLAG)% checks. (thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines
COMPLETE: tbaMUD code re-org of global and local scope function and variable
declarations. There may be a few things that I did not catch (some non extern
keyword declarations of function prototypes within other functions, for
example).
BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines
Continued clean-up of 'extern' references to functions and variables.
BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of
the char * returned from title_female and title_male.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines
More work on mud clean-up.
New file: spec_procs.h
Created this file to house the legacy special procedures (spec_procs.c and
castle.c) and special feature assignment in general.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines
- Minor Bugfix: Fixed parse error in mobact.c
- Minor Bugfix: act.h is now included in all of the act functions. Forgot to do
that the first time :(
- Additions: ban.h has been added as the external entry point into the ban.c
globals and functions. Files needing ban.h have been updated.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line
All act*.c functions, defines and globals have been prototyped/declared in
act.h. The file act.h does not contain every ACMD, only those ACMDs and
utility functions available within the act*.c files.
------------------------------------------------------------------------
Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed the last few flags missed for the 128 bit conversion.
------------------------------------------------------------------------
Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines
Adding a column formatter for lists. Accepts printf-like arguments.
Only used by medit right now.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines
- Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts.
- Ongoing cleanup to mud project.
------------------------------------------------------------------------
Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed run_autowiz which ran twice on advancement.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line
act.h created and added. This header will be the external entry point for the
functions, function subcommands and variables within the act*.c files. It is
not designed to be the entry point for all ACMD functions.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line
Merge of another part of the code cleanup, the dg script stuff.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line
Modularizing and organizing files continues. Committing comm.c and comm.h
because they are hairy, and I don't want to do them over if my hard drive
crashes.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines
- Marking all file scope functions as 'static'
- Reorganization of the global variables and functions.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line
* Protected the conf.h.* system config files from multiple calls.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line
* Removed extraneous references to TRUE / FALSE and YES / NO defines.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines
* BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before)
* Migrated NUM_* settings from oasis.h to more appropriate locations near where
they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the
POSITION_* defines.)
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line
Added Appendix A - Coder Support. Right now, it simply speaks to the fact that
we have included doxygen config files, are working to document the source code,
and provides a rudimentary "do this" guide to create the doxygen cross
references.
------------------------------------------------------------------------
jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines
- All .h files now have doxygen recognized headers, and the format is slightly
altered to ease editing of headers.
- Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE
R_H_ #define _HEADER_H_ .... #endif)
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line
constants.h, structs.h and utils.h now protected from multiple includes. This is
sometimes overkill, but good practice overall.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line
Updated documentation for constants.c and constants.h.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines
The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is
to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if
Graphviz is not available.
Now just need a short document describing the usage of doxygen.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line
Minor document correction in struct dex_app_tpe.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line
*bugfix* do_drink command: When a container is empty, the correct, "It is
empty." message is now displayed.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines
Merging changes to trunk for:
* utils.h, utils.c and structs.h doxygen comments
* adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
|
|
|
#include "modify.h"
|
2006-12-19 22:56:18 +00:00
|
|
|
|
2007-01-15 17:48:18 +00:00
|
|
|
/* local functions */
|
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line
Minor Bugfix: All game configuration settings now reference the world config
structure, not the individual config variables found in config.c.
------------------------------------------------------------------------
rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line
Added lib/world/qst/ directory, index, index.mini, and 0.qst.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines
Bugfix: the include directory (for .h files) is now referenced correctly in the
depend statement.
Deletion: listrent.c removed as a separate utility.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line
Enhancement: utils/ Makefile will now use a depends file, and looks for dependen
cies in the ../ directory (shrinks the necessary information to make each utilit
y).
------------------------------------------------------------------------
Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line
Made TBA specific changes. do_cheat, removed help level checking, and advance to
level 32.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line
Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a
ttribution for the changes. (Thanks seqwith.)
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines
Changed Makefile.in to use glob expressions when building the objects. This
translates into no longer a need to update Makefile.in whenever a new .c file
is added to the mud code. Other Makefile.* have not yet been changed (and
need review, anyway).
All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using
Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen
does, however the tbaMUD (and legacy circle code) has never been marked-up with
the special CXREF codes required to effectively use the program. Since Doxygen
is easier to use, and provides almost as much functionality as CXREF, CXREF
support has been dropped.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line
Bug Fix: asciiflag_conv* functions now can handle a negative numeric value.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line
Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master)
will no longer attempt to wander off.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines
Based on the compiler warning about mag_materials being an unused function, and
the clone spell being unused.
Bug fix: Clone can now be cast. It is an 'ignore' target spell.
Fix and Modification: Clone, being an effectively unused spell that is only used
by mortal Magic Users at level 30, is now implemented as very simple example of
how to use mag_materials(). The item required by mag_materials is vnum 161,
which in stock tbaMUD is some sacrificial entrails.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix for "Did you mean:" including DG commands.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a
door.
Documentation: do_simple_move documented.
------------------------------------------------------------------------
Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line
Trial run of columnizer function on commands list to see how people like it.
------------------------------------------------------------------------
jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line
asciimap, an in game automap, along with a couple of minor bug fixes to do with
the automap, patched in (Thanks Jamdog).
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line
Minor update: Relocate local variable declaration to the top of ACMD(do_help)
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines
Checked in the following placeholders for do_gen_tog:
#define SCMD_AUTOLOOT 24
#define SCMD_AUTOGOLD 25
#define SCMD_AUTOSPLIT 26
#define SCMD_AUTOSAC 27
#define SCMD_AUTOASSIST 28
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line
The Autoquest patch, along with a couple of minor bug fixes, has been integrated
into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.)
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines
Minor Fix:
Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int
index types.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines
Added a new atoidx() conversion function for dealing with string to IDXTYPE
conversions (in utils.c, prototype exported through utils.h).
Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h).
Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c).
------------------------------------------------------------------------
Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line
Fixed direction mapping to give readable directions instead of sub commands.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines
Since general olc editing are automatically saved to disk, 'shutdown reboot' has
been changed to not-autosave by default. (Small change made to do_shutdown in
act.wizard.c).
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines
Changed:
struct attack_hit_type moved to fight.h
attack_hit_text exported through fight.h
------------------------------------------------------------------------
jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines
- do_file heads or tails files correctly and has also been enhanced to return
file info (act.wizard.c)
- defines made for common log files created by autorun, and those used by
do_file (db.h)
- utility functions added: file_head(), file_tail(), file_sizeof(), and
file_numlines() (defined utils.c and exported through utils.h)
------------------------------------------------------------------------
Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line
Fixed export command. (thanks Kyle)
------------------------------------------------------------------------
jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line
Files are now tagged as executable. Should be able to be checked out from subver
sion and executed without running chmod.
------------------------------------------------------------------------
Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line
Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc()
strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back.
------------------------------------------------------------------------
jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line
Event queue function definitions, global variables and defines doxygenated.
------------------------------------------------------------------------
Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line
Updated levels command to use an arg/range and added color parsing to greetings.
(thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line
Doxygen comments completed for weather.c
------------------------------------------------------------------------
Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line
Corrected several 64-bit warnings. (thanks Buggo)
------------------------------------------------------------------------
Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line
Added get_flag_by_name allowing for new trigedit variable checks like
%actor.pref(FLAG)% checks. (thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines
COMPLETE: tbaMUD code re-org of global and local scope function and variable
declarations. There may be a few things that I did not catch (some non extern
keyword declarations of function prototypes within other functions, for
example).
BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines
Continued clean-up of 'extern' references to functions and variables.
BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of
the char * returned from title_female and title_male.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines
More work on mud clean-up.
New file: spec_procs.h
Created this file to house the legacy special procedures (spec_procs.c and
castle.c) and special feature assignment in general.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines
- Minor Bugfix: Fixed parse error in mobact.c
- Minor Bugfix: act.h is now included in all of the act functions. Forgot to do
that the first time :(
- Additions: ban.h has been added as the external entry point into the ban.c
globals and functions. Files needing ban.h have been updated.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line
All act*.c functions, defines and globals have been prototyped/declared in
act.h. The file act.h does not contain every ACMD, only those ACMDs and
utility functions available within the act*.c files.
------------------------------------------------------------------------
Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed the last few flags missed for the 128 bit conversion.
------------------------------------------------------------------------
Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines
Adding a column formatter for lists. Accepts printf-like arguments.
Only used by medit right now.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines
- Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts.
- Ongoing cleanup to mud project.
------------------------------------------------------------------------
Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed run_autowiz which ran twice on advancement.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line
act.h created and added. This header will be the external entry point for the
functions, function subcommands and variables within the act*.c files. It is
not designed to be the entry point for all ACMD functions.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line
Merge of another part of the code cleanup, the dg script stuff.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line
Modularizing and organizing files continues. Committing comm.c and comm.h
because they are hairy, and I don't want to do them over if my hard drive
crashes.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines
- Marking all file scope functions as 'static'
- Reorganization of the global variables and functions.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line
* Protected the conf.h.* system config files from multiple calls.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line
* Removed extraneous references to TRUE / FALSE and YES / NO defines.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines
* BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before)
* Migrated NUM_* settings from oasis.h to more appropriate locations near where
they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the
POSITION_* defines.)
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line
Added Appendix A - Coder Support. Right now, it simply speaks to the fact that
we have included doxygen config files, are working to document the source code,
and provides a rudimentary "do this" guide to create the doxygen cross
references.
------------------------------------------------------------------------
jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines
- All .h files now have doxygen recognized headers, and the format is slightly
altered to ease editing of headers.
- Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE
R_H_ #define _HEADER_H_ .... #endif)
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line
constants.h, structs.h and utils.h now protected from multiple includes. This is
sometimes overkill, but good practice overall.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line
Updated documentation for constants.c and constants.h.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines
The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is
to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if
Graphviz is not available.
Now just need a short document describing the usage of doxygen.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line
Minor document correction in struct dex_app_tpe.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line
*bugfix* do_drink command: When a container is empty, the correct, "It is
empty." message is now displayed.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines
Merging changes to trunk for:
* utils.h, utils.c and structs.h doxygen comments
* adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
|
|
|
static void redit_setup_new(struct descriptor_data *d);
|
|
|
|
|
static void redit_disp_extradesc_menu(struct descriptor_data *d);
|
|
|
|
|
static void redit_disp_exit_menu(struct descriptor_data *d);
|
|
|
|
|
static void redit_disp_exit_flag_menu(struct descriptor_data *d);
|
|
|
|
|
static void redit_disp_flag_menu(struct descriptor_data *d);
|
|
|
|
|
static void redit_disp_sector_menu(struct descriptor_data *d);
|
|
|
|
|
static void redit_disp_menu(struct descriptor_data *d);
|
2007-01-15 17:48:18 +00:00
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Utils and exported functions. */
|
2006-12-19 22:56:18 +00:00
|
|
|
ACMD(do_oasis_redit)
|
|
|
|
|
{
|
|
|
|
|
char *buf3;
|
|
|
|
|
char buf1[MAX_STRING_LENGTH];
|
|
|
|
|
char buf2[MAX_STRING_LENGTH];
|
|
|
|
|
int number = NOWHERE, save = 0, real_num;
|
|
|
|
|
struct descriptor_data *d;
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2007-03-28 12:53:48 +00:00
|
|
|
/* No building as a mob or while being forced. */
|
|
|
|
|
if (IS_NPC(ch) || !ch->desc || STATE(ch->desc) != CON_PLAYING)
|
|
|
|
|
return;
|
|
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
/* Parse any arguments. */
|
|
|
|
|
buf3 = two_arguments(argument, buf1, buf2);
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
if (!*buf1)
|
|
|
|
|
number = GET_ROOM_VNUM(IN_ROOM(ch));
|
|
|
|
|
else if (!isdigit(*buf1)) {
|
|
|
|
|
if (str_cmp("save", buf1) != 0) {
|
|
|
|
|
send_to_char(ch, "Yikes! Stop that, someone will get hurt!\r\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
save = TRUE;
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
if (is_number(buf2))
|
|
|
|
|
number = atoi(buf2);
|
|
|
|
|
else if (GET_OLC_ZONE(ch) != NOWHERE) {
|
|
|
|
|
zone_rnum zlok;
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
if ((zlok = real_zone(GET_OLC_ZONE(ch))) == NOWHERE)
|
|
|
|
|
number = NOWHERE;
|
|
|
|
|
else
|
|
|
|
|
number = genolc_zone_bottom(zlok);
|
|
|
|
|
}
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
if (number == NOWHERE) {
|
|
|
|
|
send_to_char(ch, "Save which zone?\r\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* If a numeric argument was given (like a room number), get it. */
|
2006-12-19 22:56:18 +00:00
|
|
|
if (number == NOWHERE)
|
|
|
|
|
number = atoi(buf1);
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
/* Check to make sure the room isn't already being edited. */
|
|
|
|
|
for (d = descriptor_list; d; d = d->next) {
|
|
|
|
|
if (STATE(d) == CON_REDIT) {
|
|
|
|
|
if (d->olc && OLC_NUM(d) == number) {
|
2007-01-23 03:07:23 +00:00
|
|
|
send_to_char(ch, "That room is currently being edited by %s.\r\n",
|
2006-12-19 22:56:18 +00:00
|
|
|
PERS(d->character, ch));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
/* Retrieve the player's descriptor. */
|
|
|
|
|
d = ch->desc;
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
/* Give the descriptor an OLC structure. */
|
|
|
|
|
if (d->olc) {
|
2012-02-06 19:13:03 +00:00
|
|
|
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_oasis_redit: Player already had olc structure.");
|
2006-12-19 22:56:18 +00:00
|
|
|
free(d->olc);
|
|
|
|
|
}
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
/* Create the OLC structure. */
|
|
|
|
|
CREATE(d->olc, struct oasis_olc_data, 1);
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
/* Find the zone. */
|
|
|
|
|
OLC_ZNUM(d) = save ? real_zone(number) : real_zone_by_thing(number);
|
|
|
|
|
if (OLC_ZNUM(d) == NOWHERE) {
|
|
|
|
|
send_to_char(ch, "Sorry, there is no zone for that number!\r\n");
|
|
|
|
|
free(d->olc);
|
|
|
|
|
d->olc = NULL;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Make sure the builder is allowed to modify this zone. */
|
|
|
|
|
if (!can_edit_zone(ch, OLC_ZNUM(d))) {
|
2007-03-04 20:18:13 +00:00
|
|
|
send_cannot_edit(ch, zone_table[OLC_ZNUM(d)].number);
|
2007-04-14 00:44:52 +00:00
|
|
|
/* Free the OLC structure. */
|
2006-12-19 22:56:18 +00:00
|
|
|
free(d->olc);
|
|
|
|
|
d->olc = NULL;
|
|
|
|
|
return;
|
|
|
|
|
}
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
if (save) {
|
|
|
|
|
send_to_char(ch, "Saving all rooms in zone %d.\r\n", zone_table[OLC_ZNUM(d)].number);
|
2012-02-06 19:13:03 +00:00
|
|
|
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "OLC: %s saves room info for zone %d.", GET_NAME(ch), zone_table[OLC_ZNUM(d)].number);
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
/* Save the rooms. */
|
|
|
|
|
save_rooms(OLC_ZNUM(d));
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
/* Free the olc data from the descriptor. */
|
|
|
|
|
free(d->olc);
|
|
|
|
|
d->olc = NULL;
|
|
|
|
|
return;
|
|
|
|
|
}
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
OLC_NUM(d) = number;
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
if ((real_num = real_room(number)) != NOWHERE)
|
|
|
|
|
redit_setup_existing(d, real_num);
|
|
|
|
|
else
|
|
|
|
|
redit_setup_new(d);
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2007-10-04 18:37:07 +00:00
|
|
|
redit_disp_menu(d);
|
2006-12-19 22:56:18 +00:00
|
|
|
STATE(d) = CON_REDIT;
|
|
|
|
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
2007-05-08 15:20:59 +00:00
|
|
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2012-02-06 19:13:03 +00:00
|
|
|
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s starts editing zone %d allowed zone %d",
|
2006-12-19 22:56:18 +00:00
|
|
|
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
|
|
|
|
}
|
|
|
|
|
|
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line
Minor Bugfix: All game configuration settings now reference the world config
structure, not the individual config variables found in config.c.
------------------------------------------------------------------------
rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line
Added lib/world/qst/ directory, index, index.mini, and 0.qst.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines
Bugfix: the include directory (for .h files) is now referenced correctly in the
depend statement.
Deletion: listrent.c removed as a separate utility.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line
Enhancement: utils/ Makefile will now use a depends file, and looks for dependen
cies in the ../ directory (shrinks the necessary information to make each utilit
y).
------------------------------------------------------------------------
Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line
Made TBA specific changes. do_cheat, removed help level checking, and advance to
level 32.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line
Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a
ttribution for the changes. (Thanks seqwith.)
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines
Changed Makefile.in to use glob expressions when building the objects. This
translates into no longer a need to update Makefile.in whenever a new .c file
is added to the mud code. Other Makefile.* have not yet been changed (and
need review, anyway).
All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using
Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen
does, however the tbaMUD (and legacy circle code) has never been marked-up with
the special CXREF codes required to effectively use the program. Since Doxygen
is easier to use, and provides almost as much functionality as CXREF, CXREF
support has been dropped.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line
Bug Fix: asciiflag_conv* functions now can handle a negative numeric value.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line
Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master)
will no longer attempt to wander off.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines
Based on the compiler warning about mag_materials being an unused function, and
the clone spell being unused.
Bug fix: Clone can now be cast. It is an 'ignore' target spell.
Fix and Modification: Clone, being an effectively unused spell that is only used
by mortal Magic Users at level 30, is now implemented as very simple example of
how to use mag_materials(). The item required by mag_materials is vnum 161,
which in stock tbaMUD is some sacrificial entrails.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix for "Did you mean:" including DG commands.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a
door.
Documentation: do_simple_move documented.
------------------------------------------------------------------------
Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line
Trial run of columnizer function on commands list to see how people like it.
------------------------------------------------------------------------
jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line
asciimap, an in game automap, along with a couple of minor bug fixes to do with
the automap, patched in (Thanks Jamdog).
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line
Minor update: Relocate local variable declaration to the top of ACMD(do_help)
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines
Checked in the following placeholders for do_gen_tog:
#define SCMD_AUTOLOOT 24
#define SCMD_AUTOGOLD 25
#define SCMD_AUTOSPLIT 26
#define SCMD_AUTOSAC 27
#define SCMD_AUTOASSIST 28
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line
The Autoquest patch, along with a couple of minor bug fixes, has been integrated
into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.)
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines
Minor Fix:
Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int
index types.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines
Added a new atoidx() conversion function for dealing with string to IDXTYPE
conversions (in utils.c, prototype exported through utils.h).
Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h).
Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c).
------------------------------------------------------------------------
Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line
Fixed direction mapping to give readable directions instead of sub commands.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines
Since general olc editing are automatically saved to disk, 'shutdown reboot' has
been changed to not-autosave by default. (Small change made to do_shutdown in
act.wizard.c).
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines
Changed:
struct attack_hit_type moved to fight.h
attack_hit_text exported through fight.h
------------------------------------------------------------------------
jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines
- do_file heads or tails files correctly and has also been enhanced to return
file info (act.wizard.c)
- defines made for common log files created by autorun, and those used by
do_file (db.h)
- utility functions added: file_head(), file_tail(), file_sizeof(), and
file_numlines() (defined utils.c and exported through utils.h)
------------------------------------------------------------------------
Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line
Fixed export command. (thanks Kyle)
------------------------------------------------------------------------
jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line
Files are now tagged as executable. Should be able to be checked out from subver
sion and executed without running chmod.
------------------------------------------------------------------------
Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line
Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc()
strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back.
------------------------------------------------------------------------
jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line
Event queue function definitions, global variables and defines doxygenated.
------------------------------------------------------------------------
Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line
Updated levels command to use an arg/range and added color parsing to greetings.
(thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line
Doxygen comments completed for weather.c
------------------------------------------------------------------------
Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line
Corrected several 64-bit warnings. (thanks Buggo)
------------------------------------------------------------------------
Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line
Added get_flag_by_name allowing for new trigedit variable checks like
%actor.pref(FLAG)% checks. (thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines
COMPLETE: tbaMUD code re-org of global and local scope function and variable
declarations. There may be a few things that I did not catch (some non extern
keyword declarations of function prototypes within other functions, for
example).
BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines
Continued clean-up of 'extern' references to functions and variables.
BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of
the char * returned from title_female and title_male.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines
More work on mud clean-up.
New file: spec_procs.h
Created this file to house the legacy special procedures (spec_procs.c and
castle.c) and special feature assignment in general.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines
- Minor Bugfix: Fixed parse error in mobact.c
- Minor Bugfix: act.h is now included in all of the act functions. Forgot to do
that the first time :(
- Additions: ban.h has been added as the external entry point into the ban.c
globals and functions. Files needing ban.h have been updated.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line
All act*.c functions, defines and globals have been prototyped/declared in
act.h. The file act.h does not contain every ACMD, only those ACMDs and
utility functions available within the act*.c files.
------------------------------------------------------------------------
Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed the last few flags missed for the 128 bit conversion.
------------------------------------------------------------------------
Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines
Adding a column formatter for lists. Accepts printf-like arguments.
Only used by medit right now.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines
- Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts.
- Ongoing cleanup to mud project.
------------------------------------------------------------------------
Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed run_autowiz which ran twice on advancement.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line
act.h created and added. This header will be the external entry point for the
functions, function subcommands and variables within the act*.c files. It is
not designed to be the entry point for all ACMD functions.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line
Merge of another part of the code cleanup, the dg script stuff.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line
Modularizing and organizing files continues. Committing comm.c and comm.h
because they are hairy, and I don't want to do them over if my hard drive
crashes.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines
- Marking all file scope functions as 'static'
- Reorganization of the global variables and functions.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line
* Protected the conf.h.* system config files from multiple calls.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line
* Removed extraneous references to TRUE / FALSE and YES / NO defines.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines
* BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before)
* Migrated NUM_* settings from oasis.h to more appropriate locations near where
they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the
POSITION_* defines.)
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line
Added Appendix A - Coder Support. Right now, it simply speaks to the fact that
we have included doxygen config files, are working to document the source code,
and provides a rudimentary "do this" guide to create the doxygen cross
references.
------------------------------------------------------------------------
jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines
- All .h files now have doxygen recognized headers, and the format is slightly
altered to ease editing of headers.
- Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE
R_H_ #define _HEADER_H_ .... #endif)
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line
constants.h, structs.h and utils.h now protected from multiple includes. This is
sometimes overkill, but good practice overall.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line
Updated documentation for constants.c and constants.h.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines
The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is
to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if
Graphviz is not available.
Now just need a short document describing the usage of doxygen.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line
Minor document correction in struct dex_app_tpe.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line
*bugfix* do_drink command: When a container is empty, the correct, "It is
empty." message is now displayed.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines
Merging changes to trunk for:
* utils.h, utils.c and structs.h doxygen comments
* adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
|
|
|
static void redit_setup_new(struct descriptor_data *d)
|
2006-12-19 22:56:18 +00:00
|
|
|
{
|
|
|
|
|
CREATE(OLC_ROOM(d), struct room_data, 1);
|
|
|
|
|
|
|
|
|
|
OLC_ROOM(d)->name = strdup("An unfinished room");
|
|
|
|
|
OLC_ROOM(d)->description = strdup("You are in an unfinished room.\r\n");
|
|
|
|
|
OLC_ROOM(d)->number = NOWHERE;
|
|
|
|
|
OLC_ITEM_TYPE(d) = WLD_TRIGGER;
|
|
|
|
|
OLC_ROOM(d)->proto_script = OLC_SCRIPT(d) = NULL;
|
|
|
|
|
|
|
|
|
|
OLC_VAL(d) = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void redit_setup_existing(struct descriptor_data *d, int real_num)
|
|
|
|
|
{
|
|
|
|
|
struct room_data *room;
|
|
|
|
|
int counter;
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Build a copy of the room for editing. */
|
2006-12-19 22:56:18 +00:00
|
|
|
CREATE(room, struct room_data, 1);
|
|
|
|
|
|
|
|
|
|
*room = world[real_num];
|
2012-02-06 19:13:03 +00:00
|
|
|
|
|
|
|
|
/* Make new room people list be empty. */
|
|
|
|
|
/* Fixes bug where copying a room from within that room creates */
|
|
|
|
|
/* an infinite loop when you next act() in the new room (goto?) */
|
|
|
|
|
/* and you are your next_in_room -- anderyu (10-05-22) */
|
|
|
|
|
room->people = NULL;
|
2010-06-20 04:43:32 +00:00
|
|
|
|
2013-02-15 03:54:25 +00:00
|
|
|
/* Nullify the events structure. */
|
|
|
|
|
room->events = NULL;
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Allocate space for all strings. */
|
2006-12-19 22:56:18 +00:00
|
|
|
room->name = str_udup(world[real_num].name);
|
|
|
|
|
room->description = str_udup(world[real_num].description);
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Exits - We allocate only if necessary. */
|
2010-11-25 16:24:53 +00:00
|
|
|
for (counter = 0; counter < DIR_COUNT; counter++) {
|
2006-12-19 22:56:18 +00:00
|
|
|
if (world[real_num].dir_option[counter]) {
|
|
|
|
|
CREATE(room->dir_option[counter], struct room_direction_data, 1);
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Copy the numbers over. */
|
2006-12-19 22:56:18 +00:00
|
|
|
*room->dir_option[counter] = *world[real_num].dir_option[counter];
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Allocate the strings. */
|
2006-12-19 22:56:18 +00:00
|
|
|
if (world[real_num].dir_option[counter]->general_description)
|
|
|
|
|
room->dir_option[counter]->general_description = strdup(world[real_num].dir_option[counter]->general_description);
|
|
|
|
|
if (world[real_num].dir_option[counter]->keyword)
|
|
|
|
|
room->dir_option[counter]->keyword = strdup(world[real_num].dir_option[counter]->keyword);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Extra descriptions, if necessary. */
|
2006-12-19 22:56:18 +00:00
|
|
|
if (world[real_num].ex_description) {
|
|
|
|
|
struct extra_descr_data *tdesc, *temp, *temp2;
|
|
|
|
|
CREATE(temp, struct extra_descr_data, 1);
|
|
|
|
|
|
|
|
|
|
room->ex_description = temp;
|
|
|
|
|
for (tdesc = world[real_num].ex_description; tdesc; tdesc = tdesc->next) {
|
|
|
|
|
temp->keyword = strdup(tdesc->keyword);
|
|
|
|
|
temp->description = strdup(tdesc->description);
|
|
|
|
|
if (tdesc->next) {
|
|
|
|
|
CREATE(temp2, struct extra_descr_data, 1);
|
|
|
|
|
temp->next = temp2;
|
|
|
|
|
temp = temp2;
|
|
|
|
|
} else
|
|
|
|
|
temp->next = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Attach copy of room to player's descriptor. */
|
2006-12-19 22:56:18 +00:00
|
|
|
OLC_ROOM(d) = room;
|
|
|
|
|
OLC_VAL(d) = 0;
|
|
|
|
|
OLC_ITEM_TYPE(d) = WLD_TRIGGER;
|
|
|
|
|
|
|
|
|
|
dg_olc_script_copy(d);
|
|
|
|
|
room->proto_script = NULL;
|
2007-01-23 03:07:23 +00:00
|
|
|
SCRIPT(room) = NULL;
|
2006-12-19 22:56:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void redit_save_internally(struct descriptor_data *d)
|
|
|
|
|
{
|
|
|
|
|
int j, room_num, new_room = FALSE;
|
|
|
|
|
struct descriptor_data *dsc;
|
|
|
|
|
|
2007-10-04 18:37:07 +00:00
|
|
|
if (OLC_ROOM(d)->number == NOWHERE)
|
2006-12-19 22:56:18 +00:00
|
|
|
new_room = TRUE;
|
2007-10-04 18:37:07 +00:00
|
|
|
|
2012-02-06 19:13:03 +00:00
|
|
|
OLC_ROOM(d)->number = OLC_NUM(d);
|
2006-12-19 22:56:18 +00:00
|
|
|
/* FIXME: Why is this not set elsewhere? */
|
|
|
|
|
OLC_ROOM(d)->zone = OLC_ZNUM(d);
|
|
|
|
|
|
|
|
|
|
if ((room_num = add_room(OLC_ROOM(d))) == NOWHERE) {
|
|
|
|
|
write_to_output(d, "Something went wrong...\r\n");
|
|
|
|
|
log("SYSERR: redit_save_internally: Something failed! (%d)", room_num);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Update triggers and free old proto list */
|
2006-12-19 22:56:18 +00:00
|
|
|
if (world[room_num].proto_script &&
|
2007-01-23 03:07:23 +00:00
|
|
|
world[room_num].proto_script != OLC_SCRIPT(d))
|
|
|
|
|
free_proto_script(&world[room_num], WLD_TRIGGER);
|
|
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
world[room_num].proto_script = OLC_SCRIPT(d);
|
|
|
|
|
assign_triggers(&world[room_num], WLD_TRIGGER);
|
2007-01-23 03:07:23 +00:00
|
|
|
/* end trigger update */
|
2006-12-19 22:56:18 +00:00
|
|
|
|
|
|
|
|
/* Don't adjust numbers on a room update. */
|
|
|
|
|
if (!new_room)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
/* Idea contributed by C.Raehl 4/27/99 */
|
|
|
|
|
for (dsc = descriptor_list; dsc; dsc = dsc->next) {
|
|
|
|
|
if (dsc == d)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (STATE(dsc) == CON_ZEDIT) {
|
|
|
|
|
for (j = 0; OLC_ZONE(dsc)->cmd[j].command != 'S'; j++)
|
|
|
|
|
switch (OLC_ZONE(dsc)->cmd[j].command) {
|
|
|
|
|
case 'O':
|
|
|
|
|
case 'M':
|
|
|
|
|
case 'T':
|
|
|
|
|
case 'V':
|
|
|
|
|
OLC_ZONE(dsc)->cmd[j].arg3 += (OLC_ZONE(dsc)->cmd[j].arg3 >= room_num);
|
|
|
|
|
break;
|
|
|
|
|
case 'D':
|
|
|
|
|
OLC_ZONE(dsc)->cmd[j].arg2 += (OLC_ZONE(dsc)->cmd[j].arg2 >= room_num);
|
|
|
|
|
/* Fall through */
|
|
|
|
|
case 'R':
|
|
|
|
|
OLC_ZONE(dsc)->cmd[j].arg1 += (OLC_ZONE(dsc)->cmd[j].arg1 >= room_num);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} else if (STATE(dsc) == CON_REDIT) {
|
2010-11-25 16:24:53 +00:00
|
|
|
for (j = 0; j < DIR_COUNT; j++)
|
2006-12-19 22:56:18 +00:00
|
|
|
if (OLC_ROOM(dsc)->dir_option[j])
|
|
|
|
|
if (OLC_ROOM(dsc)->dir_option[j]->to_room >= room_num)
|
|
|
|
|
OLC_ROOM(dsc)->dir_option[j]->to_room++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void redit_save_to_disk(zone_vnum zone_num)
|
|
|
|
|
{
|
|
|
|
|
save_rooms(zone_num); /* :) */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void free_room(struct room_data *room)
|
|
|
|
|
{
|
|
|
|
|
/* Free the strings (Mythran). */
|
|
|
|
|
free_room_strings(room);
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
if (SCRIPT(room))
|
|
|
|
|
extract_script(room, WLD_TRIGGER);
|
2007-01-23 03:07:23 +00:00
|
|
|
free_proto_script(room, WLD_TRIGGER);
|
|
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
/* Free the room. */
|
|
|
|
|
free(room); /* XXX ? */
|
|
|
|
|
}
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Menu functions */
|
|
|
|
|
/* For extra descriptions. */
|
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line
Minor Bugfix: All game configuration settings now reference the world config
structure, not the individual config variables found in config.c.
------------------------------------------------------------------------
rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line
Added lib/world/qst/ directory, index, index.mini, and 0.qst.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines
Bugfix: the include directory (for .h files) is now referenced correctly in the
depend statement.
Deletion: listrent.c removed as a separate utility.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line
Enhancement: utils/ Makefile will now use a depends file, and looks for dependen
cies in the ../ directory (shrinks the necessary information to make each utilit
y).
------------------------------------------------------------------------
Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line
Made TBA specific changes. do_cheat, removed help level checking, and advance to
level 32.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line
Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a
ttribution for the changes. (Thanks seqwith.)
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines
Changed Makefile.in to use glob expressions when building the objects. This
translates into no longer a need to update Makefile.in whenever a new .c file
is added to the mud code. Other Makefile.* have not yet been changed (and
need review, anyway).
All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using
Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen
does, however the tbaMUD (and legacy circle code) has never been marked-up with
the special CXREF codes required to effectively use the program. Since Doxygen
is easier to use, and provides almost as much functionality as CXREF, CXREF
support has been dropped.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line
Bug Fix: asciiflag_conv* functions now can handle a negative numeric value.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line
Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master)
will no longer attempt to wander off.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines
Based on the compiler warning about mag_materials being an unused function, and
the clone spell being unused.
Bug fix: Clone can now be cast. It is an 'ignore' target spell.
Fix and Modification: Clone, being an effectively unused spell that is only used
by mortal Magic Users at level 30, is now implemented as very simple example of
how to use mag_materials(). The item required by mag_materials is vnum 161,
which in stock tbaMUD is some sacrificial entrails.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix for "Did you mean:" including DG commands.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a
door.
Documentation: do_simple_move documented.
------------------------------------------------------------------------
Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line
Trial run of columnizer function on commands list to see how people like it.
------------------------------------------------------------------------
jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line
asciimap, an in game automap, along with a couple of minor bug fixes to do with
the automap, patched in (Thanks Jamdog).
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line
Minor update: Relocate local variable declaration to the top of ACMD(do_help)
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines
Checked in the following placeholders for do_gen_tog:
#define SCMD_AUTOLOOT 24
#define SCMD_AUTOGOLD 25
#define SCMD_AUTOSPLIT 26
#define SCMD_AUTOSAC 27
#define SCMD_AUTOASSIST 28
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line
The Autoquest patch, along with a couple of minor bug fixes, has been integrated
into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.)
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines
Minor Fix:
Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int
index types.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines
Added a new atoidx() conversion function for dealing with string to IDXTYPE
conversions (in utils.c, prototype exported through utils.h).
Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h).
Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c).
------------------------------------------------------------------------
Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line
Fixed direction mapping to give readable directions instead of sub commands.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines
Since general olc editing are automatically saved to disk, 'shutdown reboot' has
been changed to not-autosave by default. (Small change made to do_shutdown in
act.wizard.c).
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines
Changed:
struct attack_hit_type moved to fight.h
attack_hit_text exported through fight.h
------------------------------------------------------------------------
jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines
- do_file heads or tails files correctly and has also been enhanced to return
file info (act.wizard.c)
- defines made for common log files created by autorun, and those used by
do_file (db.h)
- utility functions added: file_head(), file_tail(), file_sizeof(), and
file_numlines() (defined utils.c and exported through utils.h)
------------------------------------------------------------------------
Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line
Fixed export command. (thanks Kyle)
------------------------------------------------------------------------
jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line
Files are now tagged as executable. Should be able to be checked out from subver
sion and executed without running chmod.
------------------------------------------------------------------------
Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line
Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc()
strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back.
------------------------------------------------------------------------
jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line
Event queue function definitions, global variables and defines doxygenated.
------------------------------------------------------------------------
Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line
Updated levels command to use an arg/range and added color parsing to greetings.
(thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line
Doxygen comments completed for weather.c
------------------------------------------------------------------------
Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line
Corrected several 64-bit warnings. (thanks Buggo)
------------------------------------------------------------------------
Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line
Added get_flag_by_name allowing for new trigedit variable checks like
%actor.pref(FLAG)% checks. (thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines
COMPLETE: tbaMUD code re-org of global and local scope function and variable
declarations. There may be a few things that I did not catch (some non extern
keyword declarations of function prototypes within other functions, for
example).
BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines
Continued clean-up of 'extern' references to functions and variables.
BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of
the char * returned from title_female and title_male.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines
More work on mud clean-up.
New file: spec_procs.h
Created this file to house the legacy special procedures (spec_procs.c and
castle.c) and special feature assignment in general.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines
- Minor Bugfix: Fixed parse error in mobact.c
- Minor Bugfix: act.h is now included in all of the act functions. Forgot to do
that the first time :(
- Additions: ban.h has been added as the external entry point into the ban.c
globals and functions. Files needing ban.h have been updated.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line
All act*.c functions, defines and globals have been prototyped/declared in
act.h. The file act.h does not contain every ACMD, only those ACMDs and
utility functions available within the act*.c files.
------------------------------------------------------------------------
Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed the last few flags missed for the 128 bit conversion.
------------------------------------------------------------------------
Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines
Adding a column formatter for lists. Accepts printf-like arguments.
Only used by medit right now.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines
- Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts.
- Ongoing cleanup to mud project.
------------------------------------------------------------------------
Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed run_autowiz which ran twice on advancement.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line
act.h created and added. This header will be the external entry point for the
functions, function subcommands and variables within the act*.c files. It is
not designed to be the entry point for all ACMD functions.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line
Merge of another part of the code cleanup, the dg script stuff.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line
Modularizing and organizing files continues. Committing comm.c and comm.h
because they are hairy, and I don't want to do them over if my hard drive
crashes.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines
- Marking all file scope functions as 'static'
- Reorganization of the global variables and functions.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line
* Protected the conf.h.* system config files from multiple calls.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line
* Removed extraneous references to TRUE / FALSE and YES / NO defines.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines
* BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before)
* Migrated NUM_* settings from oasis.h to more appropriate locations near where
they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the
POSITION_* defines.)
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line
Added Appendix A - Coder Support. Right now, it simply speaks to the fact that
we have included doxygen config files, are working to document the source code,
and provides a rudimentary "do this" guide to create the doxygen cross
references.
------------------------------------------------------------------------
jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines
- All .h files now have doxygen recognized headers, and the format is slightly
altered to ease editing of headers.
- Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE
R_H_ #define _HEADER_H_ .... #endif)
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line
constants.h, structs.h and utils.h now protected from multiple includes. This is
sometimes overkill, but good practice overall.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line
Updated documentation for constants.c and constants.h.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines
The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is
to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if
Graphviz is not available.
Now just need a short document describing the usage of doxygen.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line
Minor document correction in struct dex_app_tpe.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line
*bugfix* do_drink command: When a container is empty, the correct, "It is
empty." message is now displayed.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines
Merging changes to trunk for:
* utils.h, utils.c and structs.h doxygen comments
* adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
|
|
|
static void redit_disp_extradesc_menu(struct descriptor_data *d)
|
2006-12-19 22:56:18 +00:00
|
|
|
{
|
|
|
|
|
struct extra_descr_data *extra_desc = OLC_DESC(d);
|
|
|
|
|
|
|
|
|
|
clear_screen(d);
|
|
|
|
|
write_to_output(d,
|
2007-01-22 01:58:47 +00:00
|
|
|
"%s1%s) Keywords: %s%s\r\n"
|
2006-12-19 22:56:18 +00:00
|
|
|
"%s2%s) Description:\r\n%s%s\r\n"
|
|
|
|
|
"%s3%s) Goto next description: ",
|
|
|
|
|
|
|
|
|
|
grn, nrm, yel, extra_desc->keyword ? extra_desc->keyword : "<NONE>",
|
|
|
|
|
grn, nrm, yel, extra_desc->description ? extra_desc->description : "<NONE>",
|
|
|
|
|
grn, nrm
|
|
|
|
|
);
|
|
|
|
|
|
2007-09-26 19:40:22 +00:00
|
|
|
write_to_output(d, !extra_desc->next ? "Not Set.\r\n" : "Set.\r\n");
|
2006-12-19 22:56:18 +00:00
|
|
|
write_to_output(d, "Enter choice (0 to quit) : ");
|
|
|
|
|
OLC_MODE(d) = REDIT_EXTRADESC_MENU;
|
|
|
|
|
}
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* For exits. */
|
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line
Minor Bugfix: All game configuration settings now reference the world config
structure, not the individual config variables found in config.c.
------------------------------------------------------------------------
rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line
Added lib/world/qst/ directory, index, index.mini, and 0.qst.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines
Bugfix: the include directory (for .h files) is now referenced correctly in the
depend statement.
Deletion: listrent.c removed as a separate utility.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line
Enhancement: utils/ Makefile will now use a depends file, and looks for dependen
cies in the ../ directory (shrinks the necessary information to make each utilit
y).
------------------------------------------------------------------------
Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line
Made TBA specific changes. do_cheat, removed help level checking, and advance to
level 32.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line
Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a
ttribution for the changes. (Thanks seqwith.)
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines
Changed Makefile.in to use glob expressions when building the objects. This
translates into no longer a need to update Makefile.in whenever a new .c file
is added to the mud code. Other Makefile.* have not yet been changed (and
need review, anyway).
All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using
Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen
does, however the tbaMUD (and legacy circle code) has never been marked-up with
the special CXREF codes required to effectively use the program. Since Doxygen
is easier to use, and provides almost as much functionality as CXREF, CXREF
support has been dropped.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line
Bug Fix: asciiflag_conv* functions now can handle a negative numeric value.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line
Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master)
will no longer attempt to wander off.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines
Based on the compiler warning about mag_materials being an unused function, and
the clone spell being unused.
Bug fix: Clone can now be cast. It is an 'ignore' target spell.
Fix and Modification: Clone, being an effectively unused spell that is only used
by mortal Magic Users at level 30, is now implemented as very simple example of
how to use mag_materials(). The item required by mag_materials is vnum 161,
which in stock tbaMUD is some sacrificial entrails.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix for "Did you mean:" including DG commands.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a
door.
Documentation: do_simple_move documented.
------------------------------------------------------------------------
Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line
Trial run of columnizer function on commands list to see how people like it.
------------------------------------------------------------------------
jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line
asciimap, an in game automap, along with a couple of minor bug fixes to do with
the automap, patched in (Thanks Jamdog).
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line
Minor update: Relocate local variable declaration to the top of ACMD(do_help)
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines
Checked in the following placeholders for do_gen_tog:
#define SCMD_AUTOLOOT 24
#define SCMD_AUTOGOLD 25
#define SCMD_AUTOSPLIT 26
#define SCMD_AUTOSAC 27
#define SCMD_AUTOASSIST 28
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line
The Autoquest patch, along with a couple of minor bug fixes, has been integrated
into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.)
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines
Minor Fix:
Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int
index types.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines
Added a new atoidx() conversion function for dealing with string to IDXTYPE
conversions (in utils.c, prototype exported through utils.h).
Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h).
Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c).
------------------------------------------------------------------------
Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line
Fixed direction mapping to give readable directions instead of sub commands.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines
Since general olc editing are automatically saved to disk, 'shutdown reboot' has
been changed to not-autosave by default. (Small change made to do_shutdown in
act.wizard.c).
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines
Changed:
struct attack_hit_type moved to fight.h
attack_hit_text exported through fight.h
------------------------------------------------------------------------
jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines
- do_file heads or tails files correctly and has also been enhanced to return
file info (act.wizard.c)
- defines made for common log files created by autorun, and those used by
do_file (db.h)
- utility functions added: file_head(), file_tail(), file_sizeof(), and
file_numlines() (defined utils.c and exported through utils.h)
------------------------------------------------------------------------
Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line
Fixed export command. (thanks Kyle)
------------------------------------------------------------------------
jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line
Files are now tagged as executable. Should be able to be checked out from subver
sion and executed without running chmod.
------------------------------------------------------------------------
Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line
Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc()
strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back.
------------------------------------------------------------------------
jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line
Event queue function definitions, global variables and defines doxygenated.
------------------------------------------------------------------------
Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line
Updated levels command to use an arg/range and added color parsing to greetings.
(thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line
Doxygen comments completed for weather.c
------------------------------------------------------------------------
Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line
Corrected several 64-bit warnings. (thanks Buggo)
------------------------------------------------------------------------
Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line
Added get_flag_by_name allowing for new trigedit variable checks like
%actor.pref(FLAG)% checks. (thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines
COMPLETE: tbaMUD code re-org of global and local scope function and variable
declarations. There may be a few things that I did not catch (some non extern
keyword declarations of function prototypes within other functions, for
example).
BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines
Continued clean-up of 'extern' references to functions and variables.
BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of
the char * returned from title_female and title_male.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines
More work on mud clean-up.
New file: spec_procs.h
Created this file to house the legacy special procedures (spec_procs.c and
castle.c) and special feature assignment in general.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines
- Minor Bugfix: Fixed parse error in mobact.c
- Minor Bugfix: act.h is now included in all of the act functions. Forgot to do
that the first time :(
- Additions: ban.h has been added as the external entry point into the ban.c
globals and functions. Files needing ban.h have been updated.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line
All act*.c functions, defines and globals have been prototyped/declared in
act.h. The file act.h does not contain every ACMD, only those ACMDs and
utility functions available within the act*.c files.
------------------------------------------------------------------------
Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed the last few flags missed for the 128 bit conversion.
------------------------------------------------------------------------
Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines
Adding a column formatter for lists. Accepts printf-like arguments.
Only used by medit right now.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines
- Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts.
- Ongoing cleanup to mud project.
------------------------------------------------------------------------
Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed run_autowiz which ran twice on advancement.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line
act.h created and added. This header will be the external entry point for the
functions, function subcommands and variables within the act*.c files. It is
not designed to be the entry point for all ACMD functions.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line
Merge of another part of the code cleanup, the dg script stuff.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line
Modularizing and organizing files continues. Committing comm.c and comm.h
because they are hairy, and I don't want to do them over if my hard drive
crashes.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines
- Marking all file scope functions as 'static'
- Reorganization of the global variables and functions.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line
* Protected the conf.h.* system config files from multiple calls.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line
* Removed extraneous references to TRUE / FALSE and YES / NO defines.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines
* BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before)
* Migrated NUM_* settings from oasis.h to more appropriate locations near where
they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the
POSITION_* defines.)
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line
Added Appendix A - Coder Support. Right now, it simply speaks to the fact that
we have included doxygen config files, are working to document the source code,
and provides a rudimentary "do this" guide to create the doxygen cross
references.
------------------------------------------------------------------------
jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines
- All .h files now have doxygen recognized headers, and the format is slightly
altered to ease editing of headers.
- Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE
R_H_ #define _HEADER_H_ .... #endif)
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line
constants.h, structs.h and utils.h now protected from multiple includes. This is
sometimes overkill, but good practice overall.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line
Updated documentation for constants.c and constants.h.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines
The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is
to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if
Graphviz is not available.
Now just need a short document describing the usage of doxygen.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line
Minor document correction in struct dex_app_tpe.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line
*bugfix* do_drink command: When a container is empty, the correct, "It is
empty." message is now displayed.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines
Merging changes to trunk for:
* utils.h, utils.c and structs.h doxygen comments
* adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
|
|
|
static void redit_disp_exit_menu(struct descriptor_data *d)
|
2006-12-19 22:56:18 +00:00
|
|
|
{
|
|
|
|
|
char door_buf[24];
|
2007-03-04 20:18:13 +00:00
|
|
|
/* if exit doesn't exist, alloc/create it */
|
2006-12-19 22:56:18 +00:00
|
|
|
if (OLC_EXIT(d) == NULL) {
|
|
|
|
|
CREATE(OLC_EXIT(d), struct room_direction_data, 1);
|
|
|
|
|
OLC_EXIT(d)->to_room = NOWHERE;
|
|
|
|
|
}
|
2012-02-06 19:13:03 +00:00
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Weird door handling! */
|
2006-12-19 22:56:18 +00:00
|
|
|
if (IS_SET(OLC_EXIT(d)->exit_info, EX_ISDOOR)) {
|
2010-11-25 16:24:53 +00:00
|
|
|
if (IS_SET(OLC_EXIT(d)->exit_info, EX_PICKPROOF) && IS_SET(OLC_EXIT(d)->exit_info, EX_HIDDEN))
|
|
|
|
|
strncpy(door_buf, "Hidden Pickproof", sizeof(door_buf)-1);
|
|
|
|
|
else if (IS_SET(OLC_EXIT(d)->exit_info, EX_PICKPROOF))
|
2006-12-19 22:56:18 +00:00
|
|
|
strncpy(door_buf, "Pickproof", sizeof(door_buf)-1);
|
2010-11-25 16:24:53 +00:00
|
|
|
else if (IS_SET(OLC_EXIT(d)->exit_info, EX_HIDDEN))
|
|
|
|
|
strncpy(door_buf, "Is a Hidden Door", sizeof(door_buf)-1);
|
2006-12-19 22:56:18 +00:00
|
|
|
else
|
|
|
|
|
strncpy(door_buf, "Is a door", sizeof(door_buf)-1);
|
|
|
|
|
} else
|
|
|
|
|
strncpy(door_buf, "No door", sizeof(door_buf)-1);
|
|
|
|
|
|
|
|
|
|
get_char_colors(d->character);
|
|
|
|
|
clear_screen(d);
|
|
|
|
|
write_to_output(d,
|
|
|
|
|
"%s1%s) Exit to : %s%d\r\n"
|
|
|
|
|
"%s2%s) Description :-\r\n%s%s\r\n"
|
|
|
|
|
"%s3%s) Door name : %s%s\r\n"
|
|
|
|
|
"%s4%s) Key : %s%d\r\n"
|
|
|
|
|
"%s5%s) Door flags : %s%s\r\n"
|
|
|
|
|
"%s6%s) Purge exit.\r\n"
|
|
|
|
|
"Enter choice, 0 to quit : ",
|
|
|
|
|
|
|
|
|
|
grn, nrm, cyn, OLC_EXIT(d)->to_room != NOWHERE ? world[OLC_EXIT(d)->to_room].number : -1,
|
|
|
|
|
grn, nrm, yel, OLC_EXIT(d)->general_description ? OLC_EXIT(d)->general_description : "<NONE>",
|
|
|
|
|
grn, nrm, yel, OLC_EXIT(d)->keyword ? OLC_EXIT(d)->keyword : "<NONE>",
|
|
|
|
|
grn, nrm, cyn, OLC_EXIT(d)->key != NOTHING ? OLC_EXIT(d)->key : -1,
|
|
|
|
|
grn, nrm, cyn, door_buf, grn, nrm
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
OLC_MODE(d) = REDIT_EXIT_MENU;
|
|
|
|
|
}
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* For exit flags. */
|
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line
Minor Bugfix: All game configuration settings now reference the world config
structure, not the individual config variables found in config.c.
------------------------------------------------------------------------
rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line
Added lib/world/qst/ directory, index, index.mini, and 0.qst.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines
Bugfix: the include directory (for .h files) is now referenced correctly in the
depend statement.
Deletion: listrent.c removed as a separate utility.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line
Enhancement: utils/ Makefile will now use a depends file, and looks for dependen
cies in the ../ directory (shrinks the necessary information to make each utilit
y).
------------------------------------------------------------------------
Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line
Made TBA specific changes. do_cheat, removed help level checking, and advance to
level 32.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line
Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a
ttribution for the changes. (Thanks seqwith.)
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines
Changed Makefile.in to use glob expressions when building the objects. This
translates into no longer a need to update Makefile.in whenever a new .c file
is added to the mud code. Other Makefile.* have not yet been changed (and
need review, anyway).
All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using
Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen
does, however the tbaMUD (and legacy circle code) has never been marked-up with
the special CXREF codes required to effectively use the program. Since Doxygen
is easier to use, and provides almost as much functionality as CXREF, CXREF
support has been dropped.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line
Bug Fix: asciiflag_conv* functions now can handle a negative numeric value.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line
Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master)
will no longer attempt to wander off.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines
Based on the compiler warning about mag_materials being an unused function, and
the clone spell being unused.
Bug fix: Clone can now be cast. It is an 'ignore' target spell.
Fix and Modification: Clone, being an effectively unused spell that is only used
by mortal Magic Users at level 30, is now implemented as very simple example of
how to use mag_materials(). The item required by mag_materials is vnum 161,
which in stock tbaMUD is some sacrificial entrails.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix for "Did you mean:" including DG commands.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a
door.
Documentation: do_simple_move documented.
------------------------------------------------------------------------
Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line
Trial run of columnizer function on commands list to see how people like it.
------------------------------------------------------------------------
jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line
asciimap, an in game automap, along with a couple of minor bug fixes to do with
the automap, patched in (Thanks Jamdog).
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line
Minor update: Relocate local variable declaration to the top of ACMD(do_help)
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines
Checked in the following placeholders for do_gen_tog:
#define SCMD_AUTOLOOT 24
#define SCMD_AUTOGOLD 25
#define SCMD_AUTOSPLIT 26
#define SCMD_AUTOSAC 27
#define SCMD_AUTOASSIST 28
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line
The Autoquest patch, along with a couple of minor bug fixes, has been integrated
into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.)
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines
Minor Fix:
Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int
index types.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines
Added a new atoidx() conversion function for dealing with string to IDXTYPE
conversions (in utils.c, prototype exported through utils.h).
Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h).
Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c).
------------------------------------------------------------------------
Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line
Fixed direction mapping to give readable directions instead of sub commands.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines
Since general olc editing are automatically saved to disk, 'shutdown reboot' has
been changed to not-autosave by default. (Small change made to do_shutdown in
act.wizard.c).
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines
Changed:
struct attack_hit_type moved to fight.h
attack_hit_text exported through fight.h
------------------------------------------------------------------------
jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines
- do_file heads or tails files correctly and has also been enhanced to return
file info (act.wizard.c)
- defines made for common log files created by autorun, and those used by
do_file (db.h)
- utility functions added: file_head(), file_tail(), file_sizeof(), and
file_numlines() (defined utils.c and exported through utils.h)
------------------------------------------------------------------------
Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line
Fixed export command. (thanks Kyle)
------------------------------------------------------------------------
jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line
Files are now tagged as executable. Should be able to be checked out from subver
sion and executed without running chmod.
------------------------------------------------------------------------
Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line
Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc()
strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back.
------------------------------------------------------------------------
jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line
Event queue function definitions, global variables and defines doxygenated.
------------------------------------------------------------------------
Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line
Updated levels command to use an arg/range and added color parsing to greetings.
(thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line
Doxygen comments completed for weather.c
------------------------------------------------------------------------
Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line
Corrected several 64-bit warnings. (thanks Buggo)
------------------------------------------------------------------------
Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line
Added get_flag_by_name allowing for new trigedit variable checks like
%actor.pref(FLAG)% checks. (thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines
COMPLETE: tbaMUD code re-org of global and local scope function and variable
declarations. There may be a few things that I did not catch (some non extern
keyword declarations of function prototypes within other functions, for
example).
BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines
Continued clean-up of 'extern' references to functions and variables.
BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of
the char * returned from title_female and title_male.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines
More work on mud clean-up.
New file: spec_procs.h
Created this file to house the legacy special procedures (spec_procs.c and
castle.c) and special feature assignment in general.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines
- Minor Bugfix: Fixed parse error in mobact.c
- Minor Bugfix: act.h is now included in all of the act functions. Forgot to do
that the first time :(
- Additions: ban.h has been added as the external entry point into the ban.c
globals and functions. Files needing ban.h have been updated.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line
All act*.c functions, defines and globals have been prototyped/declared in
act.h. The file act.h does not contain every ACMD, only those ACMDs and
utility functions available within the act*.c files.
------------------------------------------------------------------------
Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed the last few flags missed for the 128 bit conversion.
------------------------------------------------------------------------
Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines
Adding a column formatter for lists. Accepts printf-like arguments.
Only used by medit right now.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines
- Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts.
- Ongoing cleanup to mud project.
------------------------------------------------------------------------
Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed run_autowiz which ran twice on advancement.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line
act.h created and added. This header will be the external entry point for the
functions, function subcommands and variables within the act*.c files. It is
not designed to be the entry point for all ACMD functions.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line
Merge of another part of the code cleanup, the dg script stuff.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line
Modularizing and organizing files continues. Committing comm.c and comm.h
because they are hairy, and I don't want to do them over if my hard drive
crashes.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines
- Marking all file scope functions as 'static'
- Reorganization of the global variables and functions.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line
* Protected the conf.h.* system config files from multiple calls.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line
* Removed extraneous references to TRUE / FALSE and YES / NO defines.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines
* BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before)
* Migrated NUM_* settings from oasis.h to more appropriate locations near where
they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the
POSITION_* defines.)
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line
Added Appendix A - Coder Support. Right now, it simply speaks to the fact that
we have included doxygen config files, are working to document the source code,
and provides a rudimentary "do this" guide to create the doxygen cross
references.
------------------------------------------------------------------------
jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines
- All .h files now have doxygen recognized headers, and the format is slightly
altered to ease editing of headers.
- Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE
R_H_ #define _HEADER_H_ .... #endif)
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line
constants.h, structs.h and utils.h now protected from multiple includes. This is
sometimes overkill, but good practice overall.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line
Updated documentation for constants.c and constants.h.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines
The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is
to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if
Graphviz is not available.
Now just need a short document describing the usage of doxygen.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line
Minor document correction in struct dex_app_tpe.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line
*bugfix* do_drink command: When a container is empty, the correct, "It is
empty." message is now displayed.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines
Merging changes to trunk for:
* utils.h, utils.c and structs.h doxygen comments
* adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
|
|
|
static void redit_disp_exit_flag_menu(struct descriptor_data *d)
|
2006-12-19 22:56:18 +00:00
|
|
|
{
|
|
|
|
|
get_char_colors(d->character);
|
|
|
|
|
write_to_output(d, "%s0%s) No door\r\n"
|
|
|
|
|
"%s1%s) Closeable door\r\n"
|
2012-02-06 19:13:03 +00:00
|
|
|
"%s2%s) Pickproof Door\r\n"
|
|
|
|
|
"%s3%s) Hidden Door\r\n"
|
2010-11-25 16:24:53 +00:00
|
|
|
"%s4%s) Hidden, Pickproof Door\r\n"
|
|
|
|
|
"Enter choice : ", grn, nrm, grn, nrm, grn, nrm, grn, nrm, grn, nrm);
|
2006-12-19 22:56:18 +00:00
|
|
|
}
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* For room flags. */
|
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line
Minor Bugfix: All game configuration settings now reference the world config
structure, not the individual config variables found in config.c.
------------------------------------------------------------------------
rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line
Added lib/world/qst/ directory, index, index.mini, and 0.qst.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines
Bugfix: the include directory (for .h files) is now referenced correctly in the
depend statement.
Deletion: listrent.c removed as a separate utility.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line
Enhancement: utils/ Makefile will now use a depends file, and looks for dependen
cies in the ../ directory (shrinks the necessary information to make each utilit
y).
------------------------------------------------------------------------
Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line
Made TBA specific changes. do_cheat, removed help level checking, and advance to
level 32.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line
Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a
ttribution for the changes. (Thanks seqwith.)
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines
Changed Makefile.in to use glob expressions when building the objects. This
translates into no longer a need to update Makefile.in whenever a new .c file
is added to the mud code. Other Makefile.* have not yet been changed (and
need review, anyway).
All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using
Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen
does, however the tbaMUD (and legacy circle code) has never been marked-up with
the special CXREF codes required to effectively use the program. Since Doxygen
is easier to use, and provides almost as much functionality as CXREF, CXREF
support has been dropped.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line
Bug Fix: asciiflag_conv* functions now can handle a negative numeric value.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line
Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master)
will no longer attempt to wander off.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines
Based on the compiler warning about mag_materials being an unused function, and
the clone spell being unused.
Bug fix: Clone can now be cast. It is an 'ignore' target spell.
Fix and Modification: Clone, being an effectively unused spell that is only used
by mortal Magic Users at level 30, is now implemented as very simple example of
how to use mag_materials(). The item required by mag_materials is vnum 161,
which in stock tbaMUD is some sacrificial entrails.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix for "Did you mean:" including DG commands.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a
door.
Documentation: do_simple_move documented.
------------------------------------------------------------------------
Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line
Trial run of columnizer function on commands list to see how people like it.
------------------------------------------------------------------------
jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line
asciimap, an in game automap, along with a couple of minor bug fixes to do with
the automap, patched in (Thanks Jamdog).
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line
Minor update: Relocate local variable declaration to the top of ACMD(do_help)
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines
Checked in the following placeholders for do_gen_tog:
#define SCMD_AUTOLOOT 24
#define SCMD_AUTOGOLD 25
#define SCMD_AUTOSPLIT 26
#define SCMD_AUTOSAC 27
#define SCMD_AUTOASSIST 28
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line
The Autoquest patch, along with a couple of minor bug fixes, has been integrated
into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.)
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines
Minor Fix:
Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int
index types.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines
Added a new atoidx() conversion function for dealing with string to IDXTYPE
conversions (in utils.c, prototype exported through utils.h).
Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h).
Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c).
------------------------------------------------------------------------
Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line
Fixed direction mapping to give readable directions instead of sub commands.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines
Since general olc editing are automatically saved to disk, 'shutdown reboot' has
been changed to not-autosave by default. (Small change made to do_shutdown in
act.wizard.c).
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines
Changed:
struct attack_hit_type moved to fight.h
attack_hit_text exported through fight.h
------------------------------------------------------------------------
jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines
- do_file heads or tails files correctly and has also been enhanced to return
file info (act.wizard.c)
- defines made for common log files created by autorun, and those used by
do_file (db.h)
- utility functions added: file_head(), file_tail(), file_sizeof(), and
file_numlines() (defined utils.c and exported through utils.h)
------------------------------------------------------------------------
Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line
Fixed export command. (thanks Kyle)
------------------------------------------------------------------------
jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line
Files are now tagged as executable. Should be able to be checked out from subver
sion and executed without running chmod.
------------------------------------------------------------------------
Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line
Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc()
strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back.
------------------------------------------------------------------------
jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line
Event queue function definitions, global variables and defines doxygenated.
------------------------------------------------------------------------
Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line
Updated levels command to use an arg/range and added color parsing to greetings.
(thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line
Doxygen comments completed for weather.c
------------------------------------------------------------------------
Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line
Corrected several 64-bit warnings. (thanks Buggo)
------------------------------------------------------------------------
Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line
Added get_flag_by_name allowing for new trigedit variable checks like
%actor.pref(FLAG)% checks. (thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines
COMPLETE: tbaMUD code re-org of global and local scope function and variable
declarations. There may be a few things that I did not catch (some non extern
keyword declarations of function prototypes within other functions, for
example).
BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines
Continued clean-up of 'extern' references to functions and variables.
BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of
the char * returned from title_female and title_male.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines
More work on mud clean-up.
New file: spec_procs.h
Created this file to house the legacy special procedures (spec_procs.c and
castle.c) and special feature assignment in general.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines
- Minor Bugfix: Fixed parse error in mobact.c
- Minor Bugfix: act.h is now included in all of the act functions. Forgot to do
that the first time :(
- Additions: ban.h has been added as the external entry point into the ban.c
globals and functions. Files needing ban.h have been updated.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line
All act*.c functions, defines and globals have been prototyped/declared in
act.h. The file act.h does not contain every ACMD, only those ACMDs and
utility functions available within the act*.c files.
------------------------------------------------------------------------
Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed the last few flags missed for the 128 bit conversion.
------------------------------------------------------------------------
Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines
Adding a column formatter for lists. Accepts printf-like arguments.
Only used by medit right now.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines
- Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts.
- Ongoing cleanup to mud project.
------------------------------------------------------------------------
Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed run_autowiz which ran twice on advancement.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line
act.h created and added. This header will be the external entry point for the
functions, function subcommands and variables within the act*.c files. It is
not designed to be the entry point for all ACMD functions.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line
Merge of another part of the code cleanup, the dg script stuff.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line
Modularizing and organizing files continues. Committing comm.c and comm.h
because they are hairy, and I don't want to do them over if my hard drive
crashes.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines
- Marking all file scope functions as 'static'
- Reorganization of the global variables and functions.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line
* Protected the conf.h.* system config files from multiple calls.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line
* Removed extraneous references to TRUE / FALSE and YES / NO defines.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines
* BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before)
* Migrated NUM_* settings from oasis.h to more appropriate locations near where
they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the
POSITION_* defines.)
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line
Added Appendix A - Coder Support. Right now, it simply speaks to the fact that
we have included doxygen config files, are working to document the source code,
and provides a rudimentary "do this" guide to create the doxygen cross
references.
------------------------------------------------------------------------
jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines
- All .h files now have doxygen recognized headers, and the format is slightly
altered to ease editing of headers.
- Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE
R_H_ #define _HEADER_H_ .... #endif)
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line
constants.h, structs.h and utils.h now protected from multiple includes. This is
sometimes overkill, but good practice overall.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line
Updated documentation for constants.c and constants.h.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines
The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is
to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if
Graphviz is not available.
Now just need a short document describing the usage of doxygen.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line
Minor document correction in struct dex_app_tpe.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line
*bugfix* do_drink command: When a container is empty, the correct, "It is
empty." message is now displayed.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines
Merging changes to trunk for:
* utils.h, utils.c and structs.h doxygen comments
* adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
|
|
|
static void redit_disp_flag_menu(struct descriptor_data *d)
|
2006-12-19 22:56:18 +00:00
|
|
|
{
|
|
|
|
|
char bits[MAX_STRING_LENGTH];
|
|
|
|
|
|
|
|
|
|
get_char_colors(d->character);
|
|
|
|
|
clear_screen(d);
|
2009-10-23 00:29:56 +00:00
|
|
|
column_list(d->character, 0, room_bits, NUM_ROOM_FLAGS, TRUE);
|
|
|
|
|
|
2007-05-08 15:20:59 +00:00
|
|
|
sprintbitarray(OLC_ROOM(d)->room_flags, room_bits, RF_ARRAY_MAX, bits);
|
2006-12-19 22:56:18 +00:00
|
|
|
write_to_output(d, "\r\nRoom flags: %s%s%s\r\n"
|
|
|
|
|
"Enter room flags, 0 to quit : ", cyn, bits, nrm);
|
|
|
|
|
OLC_MODE(d) = REDIT_FLAGS;
|
|
|
|
|
}
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* For sector type. */
|
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line
Minor Bugfix: All game configuration settings now reference the world config
structure, not the individual config variables found in config.c.
------------------------------------------------------------------------
rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line
Added lib/world/qst/ directory, index, index.mini, and 0.qst.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines
Bugfix: the include directory (for .h files) is now referenced correctly in the
depend statement.
Deletion: listrent.c removed as a separate utility.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line
Enhancement: utils/ Makefile will now use a depends file, and looks for dependen
cies in the ../ directory (shrinks the necessary information to make each utilit
y).
------------------------------------------------------------------------
Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line
Made TBA specific changes. do_cheat, removed help level checking, and advance to
level 32.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line
Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a
ttribution for the changes. (Thanks seqwith.)
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines
Changed Makefile.in to use glob expressions when building the objects. This
translates into no longer a need to update Makefile.in whenever a new .c file
is added to the mud code. Other Makefile.* have not yet been changed (and
need review, anyway).
All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using
Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen
does, however the tbaMUD (and legacy circle code) has never been marked-up with
the special CXREF codes required to effectively use the program. Since Doxygen
is easier to use, and provides almost as much functionality as CXREF, CXREF
support has been dropped.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line
Bug Fix: asciiflag_conv* functions now can handle a negative numeric value.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line
Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master)
will no longer attempt to wander off.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines
Based on the compiler warning about mag_materials being an unused function, and
the clone spell being unused.
Bug fix: Clone can now be cast. It is an 'ignore' target spell.
Fix and Modification: Clone, being an effectively unused spell that is only used
by mortal Magic Users at level 30, is now implemented as very simple example of
how to use mag_materials(). The item required by mag_materials is vnum 161,
which in stock tbaMUD is some sacrificial entrails.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix for "Did you mean:" including DG commands.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a
door.
Documentation: do_simple_move documented.
------------------------------------------------------------------------
Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line
Trial run of columnizer function on commands list to see how people like it.
------------------------------------------------------------------------
jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line
asciimap, an in game automap, along with a couple of minor bug fixes to do with
the automap, patched in (Thanks Jamdog).
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line
Minor update: Relocate local variable declaration to the top of ACMD(do_help)
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines
Checked in the following placeholders for do_gen_tog:
#define SCMD_AUTOLOOT 24
#define SCMD_AUTOGOLD 25
#define SCMD_AUTOSPLIT 26
#define SCMD_AUTOSAC 27
#define SCMD_AUTOASSIST 28
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line
The Autoquest patch, along with a couple of minor bug fixes, has been integrated
into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.)
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines
Minor Fix:
Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int
index types.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines
Added a new atoidx() conversion function for dealing with string to IDXTYPE
conversions (in utils.c, prototype exported through utils.h).
Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h).
Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c).
------------------------------------------------------------------------
Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line
Fixed direction mapping to give readable directions instead of sub commands.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines
Since general olc editing are automatically saved to disk, 'shutdown reboot' has
been changed to not-autosave by default. (Small change made to do_shutdown in
act.wizard.c).
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines
Changed:
struct attack_hit_type moved to fight.h
attack_hit_text exported through fight.h
------------------------------------------------------------------------
jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines
- do_file heads or tails files correctly and has also been enhanced to return
file info (act.wizard.c)
- defines made for common log files created by autorun, and those used by
do_file (db.h)
- utility functions added: file_head(), file_tail(), file_sizeof(), and
file_numlines() (defined utils.c and exported through utils.h)
------------------------------------------------------------------------
Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line
Fixed export command. (thanks Kyle)
------------------------------------------------------------------------
jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line
Files are now tagged as executable. Should be able to be checked out from subver
sion and executed without running chmod.
------------------------------------------------------------------------
Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line
Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc()
strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back.
------------------------------------------------------------------------
jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line
Event queue function definitions, global variables and defines doxygenated.
------------------------------------------------------------------------
Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line
Updated levels command to use an arg/range and added color parsing to greetings.
(thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line
Doxygen comments completed for weather.c
------------------------------------------------------------------------
Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line
Corrected several 64-bit warnings. (thanks Buggo)
------------------------------------------------------------------------
Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line
Added get_flag_by_name allowing for new trigedit variable checks like
%actor.pref(FLAG)% checks. (thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines
COMPLETE: tbaMUD code re-org of global and local scope function and variable
declarations. There may be a few things that I did not catch (some non extern
keyword declarations of function prototypes within other functions, for
example).
BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines
Continued clean-up of 'extern' references to functions and variables.
BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of
the char * returned from title_female and title_male.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines
More work on mud clean-up.
New file: spec_procs.h
Created this file to house the legacy special procedures (spec_procs.c and
castle.c) and special feature assignment in general.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines
- Minor Bugfix: Fixed parse error in mobact.c
- Minor Bugfix: act.h is now included in all of the act functions. Forgot to do
that the first time :(
- Additions: ban.h has been added as the external entry point into the ban.c
globals and functions. Files needing ban.h have been updated.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line
All act*.c functions, defines and globals have been prototyped/declared in
act.h. The file act.h does not contain every ACMD, only those ACMDs and
utility functions available within the act*.c files.
------------------------------------------------------------------------
Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed the last few flags missed for the 128 bit conversion.
------------------------------------------------------------------------
Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines
Adding a column formatter for lists. Accepts printf-like arguments.
Only used by medit right now.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines
- Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts.
- Ongoing cleanup to mud project.
------------------------------------------------------------------------
Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed run_autowiz which ran twice on advancement.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line
act.h created and added. This header will be the external entry point for the
functions, function subcommands and variables within the act*.c files. It is
not designed to be the entry point for all ACMD functions.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line
Merge of another part of the code cleanup, the dg script stuff.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line
Modularizing and organizing files continues. Committing comm.c and comm.h
because they are hairy, and I don't want to do them over if my hard drive
crashes.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines
- Marking all file scope functions as 'static'
- Reorganization of the global variables and functions.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line
* Protected the conf.h.* system config files from multiple calls.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line
* Removed extraneous references to TRUE / FALSE and YES / NO defines.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines
* BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before)
* Migrated NUM_* settings from oasis.h to more appropriate locations near where
they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the
POSITION_* defines.)
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line
Added Appendix A - Coder Support. Right now, it simply speaks to the fact that
we have included doxygen config files, are working to document the source code,
and provides a rudimentary "do this" guide to create the doxygen cross
references.
------------------------------------------------------------------------
jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines
- All .h files now have doxygen recognized headers, and the format is slightly
altered to ease editing of headers.
- Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE
R_H_ #define _HEADER_H_ .... #endif)
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line
constants.h, structs.h and utils.h now protected from multiple includes. This is
sometimes overkill, but good practice overall.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line
Updated documentation for constants.c and constants.h.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines
The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is
to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if
Graphviz is not available.
Now just need a short document describing the usage of doxygen.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line
Minor document correction in struct dex_app_tpe.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line
*bugfix* do_drink command: When a container is empty, the correct, "It is
empty." message is now displayed.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines
Merging changes to trunk for:
* utils.h, utils.c and structs.h doxygen comments
* adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
|
|
|
static void redit_disp_sector_menu(struct descriptor_data *d)
|
2006-12-19 22:56:18 +00:00
|
|
|
{
|
|
|
|
|
clear_screen(d);
|
2009-10-23 00:29:56 +00:00
|
|
|
column_list(d->character, 0, sector_types, NUM_ROOM_SECTORS, TRUE);
|
2006-12-19 22:56:18 +00:00
|
|
|
write_to_output(d, "\r\nEnter sector type : ");
|
|
|
|
|
OLC_MODE(d) = REDIT_SECTOR;
|
|
|
|
|
}
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* The main menu. */
|
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line
Minor Bugfix: All game configuration settings now reference the world config
structure, not the individual config variables found in config.c.
------------------------------------------------------------------------
rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line
Added lib/world/qst/ directory, index, index.mini, and 0.qst.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines
Bugfix: the include directory (for .h files) is now referenced correctly in the
depend statement.
Deletion: listrent.c removed as a separate utility.
------------------------------------------------------------------------
jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line
Enhancement: utils/ Makefile will now use a depends file, and looks for dependen
cies in the ../ directory (shrinks the necessary information to make each utilit
y).
------------------------------------------------------------------------
Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line
Made TBA specific changes. do_cheat, removed help level checking, and advance to
level 32.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line
Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a
ttribution for the changes. (Thanks seqwith.)
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines
Changed Makefile.in to use glob expressions when building the objects. This
translates into no longer a need to update Makefile.in whenever a new .c file
is added to the mud code. Other Makefile.* have not yet been changed (and
need review, anyway).
All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using
Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen
does, however the tbaMUD (and legacy circle code) has never been marked-up with
the special CXREF codes required to effectively use the program. Since Doxygen
is easier to use, and provides almost as much functionality as CXREF, CXREF
support has been dropped.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line
Bug Fix: asciiflag_conv* functions now can handle a negative numeric value.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line
Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master)
will no longer attempt to wander off.
------------------------------------------------------------------------
jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines
Based on the compiler warning about mag_materials being an unused function, and
the clone spell being unused.
Bug fix: Clone can now be cast. It is an 'ignore' target spell.
Fix and Modification: Clone, being an effectively unused spell that is only used
by mortal Magic Users at level 30, is now implemented as very simple example of
how to use mag_materials(). The item required by mag_materials is vnum 161,
which in stock tbaMUD is some sacrificial entrails.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix for "Did you mean:" including DG commands.
------------------------------------------------------------------------
jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines
Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a
door.
Documentation: do_simple_move documented.
------------------------------------------------------------------------
Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line
Trial run of columnizer function on commands list to see how people like it.
------------------------------------------------------------------------
jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line
asciimap, an in game automap, along with a couple of minor bug fixes to do with
the automap, patched in (Thanks Jamdog).
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line
Minor update: Relocate local variable declaration to the top of ACMD(do_help)
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines
Checked in the following placeholders for do_gen_tog:
#define SCMD_AUTOLOOT 24
#define SCMD_AUTOGOLD 25
#define SCMD_AUTOSPLIT 26
#define SCMD_AUTOSAC 27
#define SCMD_AUTOASSIST 28
------------------------------------------------------------------------
jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line
The Autoquest patch, along with a couple of minor bug fixes, has been integrated
into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.)
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines
Minor Fix:
Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int
index types.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines
Added a new atoidx() conversion function for dealing with string to IDXTYPE
conversions (in utils.c, prototype exported through utils.h).
Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h).
Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c).
------------------------------------------------------------------------
Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line
Fixed direction mapping to give readable directions instead of sub commands.
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines
Since general olc editing are automatically saved to disk, 'shutdown reboot' has
been changed to not-autosave by default. (Small change made to do_shutdown in
act.wizard.c).
------------------------------------------------------------------------
jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines
Changed:
struct attack_hit_type moved to fight.h
attack_hit_text exported through fight.h
------------------------------------------------------------------------
jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines
- do_file heads or tails files correctly and has also been enhanced to return
file info (act.wizard.c)
- defines made for common log files created by autorun, and those used by
do_file (db.h)
- utility functions added: file_head(), file_tail(), file_sizeof(), and
file_numlines() (defined utils.c and exported through utils.h)
------------------------------------------------------------------------
Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line
Fixed export command. (thanks Kyle)
------------------------------------------------------------------------
jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line
Files are now tagged as executable. Should be able to be checked out from subver
sion and executed without running chmod.
------------------------------------------------------------------------
Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line
Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc()
strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back.
------------------------------------------------------------------------
jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line
Event queue function definitions, global variables and defines doxygenated.
------------------------------------------------------------------------
Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line
Updated levels command to use an arg/range and added color parsing to greetings.
(thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line
Doxygen comments completed for weather.c
------------------------------------------------------------------------
Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line
Corrected several 64-bit warnings. (thanks Buggo)
------------------------------------------------------------------------
Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line
Added get_flag_by_name allowing for new trigedit variable checks like
%actor.pref(FLAG)% checks. (thanks Jamdog)
------------------------------------------------------------------------
jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines
COMPLETE: tbaMUD code re-org of global and local scope function and variable
declarations. There may be a few things that I did not catch (some non extern
keyword declarations of function prototypes within other functions, for
example).
BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines
Continued clean-up of 'extern' references to functions and variables.
BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of
the char * returned from title_female and title_male.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines
More work on mud clean-up.
New file: spec_procs.h
Created this file to house the legacy special procedures (spec_procs.c and
castle.c) and special feature assignment in general.
------------------------------------------------------------------------
jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines
- Minor Bugfix: Fixed parse error in mobact.c
- Minor Bugfix: act.h is now included in all of the act functions. Forgot to do
that the first time :(
- Additions: ban.h has been added as the external entry point into the ban.c
globals and functions. Files needing ban.h have been updated.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line
All act*.c functions, defines and globals have been prototyped/declared in
act.h. The file act.h does not contain every ACMD, only those ACMDs and
utility functions available within the act*.c files.
------------------------------------------------------------------------
Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed the last few flags missed for the 128 bit conversion.
------------------------------------------------------------------------
Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines
Adding a column formatter for lists. Accepts printf-like arguments.
Only used by medit right now.
------------------------------------------------------------------------
jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines
- Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts.
- Ongoing cleanup to mud project.
------------------------------------------------------------------------
Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line
Fixed run_autowiz which ran twice on advancement.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line
act.h created and added. This header will be the external entry point for the
functions, function subcommands and variables within the act*.c files. It is
not designed to be the entry point for all ACMD functions.
------------------------------------------------------------------------
jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line
Merge of another part of the code cleanup, the dg script stuff.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line
Modularizing and organizing files continues. Committing comm.c and comm.h
because they are hairy, and I don't want to do them over if my hard drive
crashes.
------------------------------------------------------------------------
jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines
- Marking all file scope functions as 'static'
- Reorganization of the global variables and functions.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line
* Protected the conf.h.* system config files from multiple calls.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line
* Removed extraneous references to TRUE / FALSE and YES / NO defines.
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines
* BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before)
* Migrated NUM_* settings from oasis.h to more appropriate locations near where
they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the
POSITION_* defines.)
------------------------------------------------------------------------
jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line
Added Appendix A - Coder Support. Right now, it simply speaks to the fact that
we have included doxygen config files, are working to document the source code,
and provides a rudimentary "do this" guide to create the doxygen cross
references.
------------------------------------------------------------------------
jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines
- All .h files now have doxygen recognized headers, and the format is slightly
altered to ease editing of headers.
- Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE
R_H_ #define _HEADER_H_ .... #endif)
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line
constants.h, structs.h and utils.h now protected from multiple includes. This is
sometimes overkill, but good practice overall.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line
Updated documentation for constants.c and constants.h.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines
The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is
to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if
Graphviz is not available.
Now just need a short document describing the usage of doxygen.
------------------------------------------------------------------------
jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line
Minor document correction in struct dex_app_tpe.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line
*bugfix* do_drink command: When a container is empty, the correct, "It is
empty." message is now displayed.
------------------------------------------------------------------------
jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines
Merging changes to trunk for:
* utils.h, utils.c and structs.h doxygen comments
* adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
|
|
|
static void redit_disp_menu(struct descriptor_data *d)
|
2006-12-19 22:56:18 +00:00
|
|
|
{
|
|
|
|
|
char buf1[MAX_STRING_LENGTH];
|
|
|
|
|
char buf2[MAX_STRING_LENGTH];
|
|
|
|
|
struct room_data *room;
|
|
|
|
|
|
|
|
|
|
get_char_colors(d->character);
|
|
|
|
|
clear_screen(d);
|
|
|
|
|
room = OLC_ROOM(d);
|
|
|
|
|
|
2007-05-08 15:20:59 +00:00
|
|
|
sprintbitarray(room->room_flags, room_bits, RF_ARRAY_MAX, buf1);
|
2006-12-19 22:56:18 +00:00
|
|
|
sprinttype(room->sector_type, sector_types, buf2, sizeof(buf2));
|
|
|
|
|
write_to_output(d,
|
2012-02-06 19:13:03 +00:00
|
|
|
"-- Room number : [%s%d%s] Room zone: [%s%d%s]\r\n"
|
|
|
|
|
"%s1%s) Name : %s%s\r\n"
|
|
|
|
|
"%s2%s) Description :\r\n%s%s"
|
|
|
|
|
"%s3%s) Room flags : %s%s\r\n"
|
|
|
|
|
"%s4%s) Sector type : %s%s\r\n",
|
|
|
|
|
cyn, OLC_NUM(d), nrm,
|
|
|
|
|
cyn, zone_table[OLC_ZNUM(d)].number, nrm,
|
|
|
|
|
grn, nrm, yel, room->name,
|
|
|
|
|
grn, nrm, yel, room->description,
|
|
|
|
|
grn, nrm, cyn, buf1,
|
|
|
|
|
grn, nrm, cyn, buf2);
|
2010-11-25 16:24:53 +00:00
|
|
|
|
|
|
|
|
if (!CONFIG_DIAGONAL_DIRS)
|
|
|
|
|
{
|
|
|
|
|
write_to_output(d,
|
2012-02-06 19:13:03 +00:00
|
|
|
"%s5%s) Exit north : %s%d\r\n"
|
|
|
|
|
"%s6%s) Exit east : %s%d\r\n"
|
|
|
|
|
"%s7%s) Exit south : %s%d\r\n"
|
|
|
|
|
"%s8%s) Exit west : %s%d\r\n",
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[NORTH] && room->dir_option[NORTH]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[NORTH]->to_room].number : -1,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[EAST] && room->dir_option[EAST]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[EAST]->to_room].number : -1,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[SOUTH] && room->dir_option[SOUTH]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[SOUTH]->to_room].number : -1,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[WEST] && room->dir_option[WEST]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[WEST]->to_room].number : -1);
|
2010-11-25 16:24:53 +00:00
|
|
|
} else {
|
|
|
|
|
write_to_output(d,
|
2012-02-06 19:13:03 +00:00
|
|
|
"%s5%s) Exit north : %s%-6d%s, %sB%s) Exit northwest : %s%d\r\n"
|
|
|
|
|
"%s6%s) Exit east : %s%-6d%s, %sC%s) Exit northeast : %s%d\r\n"
|
|
|
|
|
"%s7%s) Exit south : %s%-6d%s, %sD%s) Exit southeast : %s%d\r\n"
|
|
|
|
|
"%s8%s) Exit west : %s%-6d%s, %sE%s) Exit southwest : %s%d\r\n",
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[NORTH] && room->dir_option[NORTH]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[NORTH]->to_room].number : -1, nrm,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[NORTHWEST] && room->dir_option[NORTHWEST]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[NORTHWEST]->to_room].number : -1,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[EAST] && room->dir_option[EAST]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[EAST]->to_room].number : -1, nrm,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[NORTHEAST] && room->dir_option[NORTHEAST]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[NORTHEAST]->to_room].number : -1,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[SOUTH] && room->dir_option[SOUTH]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[SOUTH]->to_room].number : -1, nrm,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[SOUTHEAST] && room->dir_option[SOUTHEAST]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[SOUTHEAST]->to_room].number : -1,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[WEST] && room->dir_option[WEST]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[WEST]->to_room].number : -1, nrm,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[SOUTHWEST] && room->dir_option[SOUTHWEST]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[SOUTHWEST]->to_room].number : -1
|
|
|
|
|
);
|
2010-11-25 16:24:53 +00:00
|
|
|
}
|
|
|
|
|
write_to_output(d,
|
2012-02-06 19:13:03 +00:00
|
|
|
"%s9%s) Exit up : %s%d\r\n"
|
|
|
|
|
"%sA%s) Exit down : %s%d\r\n"
|
|
|
|
|
"%sF%s) Extra descriptions menu\r\n"
|
|
|
|
|
"%sS%s) Script : %s%s\r\n"
|
|
|
|
|
"%sW%s) Copy Room\r\n"
|
|
|
|
|
"%sX%s) Delete Room\r\n"
|
|
|
|
|
"%sQ%s) Quit\r\n"
|
|
|
|
|
"Enter choice : ",
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[UP] && room->dir_option[UP]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[UP]->to_room].number : -1,
|
|
|
|
|
grn, nrm, cyn,
|
|
|
|
|
room->dir_option[DOWN] && room->dir_option[DOWN]->to_room != NOWHERE ?
|
|
|
|
|
world[room->dir_option[DOWN]->to_room].number : -1,
|
|
|
|
|
grn, nrm,
|
2006-12-19 22:56:18 +00:00
|
|
|
grn, nrm, cyn, OLC_SCRIPT(d) ? "Set." : "Not Set.",
|
|
|
|
|
grn, nrm,
|
2012-02-06 19:13:03 +00:00
|
|
|
grn, nrm,
|
|
|
|
|
grn, nrm
|
|
|
|
|
);
|
2006-12-19 22:56:18 +00:00
|
|
|
|
|
|
|
|
OLC_MODE(d) = REDIT_MAIN_MENU;
|
|
|
|
|
}
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* The main loop*/
|
2006-12-19 22:56:18 +00:00
|
|
|
void redit_parse(struct descriptor_data *d, char *arg)
|
|
|
|
|
{
|
|
|
|
|
int number;
|
|
|
|
|
char *oldtext = NULL;
|
|
|
|
|
|
|
|
|
|
switch (OLC_MODE(d)) {
|
|
|
|
|
case REDIT_CONFIRM_SAVESTRING:
|
|
|
|
|
switch (*arg) {
|
|
|
|
|
case 'y':
|
|
|
|
|
case 'Y':
|
|
|
|
|
redit_save_internally(d);
|
2012-02-06 19:13:03 +00:00
|
|
|
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits room %d.", GET_NAME(d->character), OLC_NUM(d));
|
2006-12-19 22:56:18 +00:00
|
|
|
if (CONFIG_OLC_SAVE) {
|
|
|
|
|
redit_save_to_disk(real_zone_by_thing(OLC_NUM(d)));
|
|
|
|
|
write_to_output(d, "Room saved to disk.\r\n");
|
|
|
|
|
} else
|
|
|
|
|
write_to_output(d, "Room saved to memory.\r\n");
|
2007-09-13 15:00:59 +00:00
|
|
|
/* Free everything. */
|
|
|
|
|
cleanup_olc(d, CLEANUP_ALL);
|
2006-12-19 22:56:18 +00:00
|
|
|
break;
|
|
|
|
|
case 'n':
|
|
|
|
|
case 'N':
|
2012-02-06 19:13:03 +00:00
|
|
|
/* If not saving, we must free the script_proto list. We do so by
|
|
|
|
|
* assigning it to the edited room and letting free_room in
|
2007-09-13 15:00:59 +00:00
|
|
|
* cleanup_olc handle it. */
|
|
|
|
|
OLC_ROOM(d)->proto_script = OLC_SCRIPT(d);
|
2006-12-19 22:56:18 +00:00
|
|
|
cleanup_olc(d, CLEANUP_ALL);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
2007-03-12 23:55:50 +00:00
|
|
|
write_to_output(d, "Invalid choice!\r\nDo you wish to save your changes ? : ");
|
2006-12-19 22:56:18 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
case REDIT_MAIN_MENU:
|
|
|
|
|
switch (*arg) {
|
|
|
|
|
case 'q':
|
|
|
|
|
case 'Q':
|
|
|
|
|
if (OLC_VAL(d)) { /* Something has been modified. */
|
2007-03-12 23:55:50 +00:00
|
|
|
write_to_output(d, "Do you wish to save your changes? : ");
|
2006-12-19 22:56:18 +00:00
|
|
|
OLC_MODE(d) = REDIT_CONFIRM_SAVESTRING;
|
|
|
|
|
} else
|
|
|
|
|
cleanup_olc(d, CLEANUP_ALL);
|
|
|
|
|
return;
|
|
|
|
|
case '1':
|
|
|
|
|
write_to_output(d, "Enter room name:-\r\n] ");
|
|
|
|
|
OLC_MODE(d) = REDIT_NAME;
|
|
|
|
|
break;
|
|
|
|
|
case '2':
|
|
|
|
|
OLC_MODE(d) = REDIT_DESC;
|
|
|
|
|
clear_screen(d);
|
|
|
|
|
send_editor_help(d);
|
|
|
|
|
write_to_output(d, "Enter room description:\r\n\r\n");
|
|
|
|
|
|
|
|
|
|
if (OLC_ROOM(d)->description) {
|
|
|
|
|
write_to_output(d, "%s", OLC_ROOM(d)->description);
|
|
|
|
|
oldtext = strdup(OLC_ROOM(d)->description);
|
|
|
|
|
}
|
|
|
|
|
string_write(d, &OLC_ROOM(d)->description, MAX_ROOM_DESC, 0, oldtext);
|
|
|
|
|
OLC_VAL(d) = 1;
|
|
|
|
|
break;
|
|
|
|
|
case '3':
|
|
|
|
|
redit_disp_flag_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
case '4':
|
|
|
|
|
redit_disp_sector_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
case '5':
|
|
|
|
|
OLC_VAL(d) = NORTH;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
case '6':
|
|
|
|
|
OLC_VAL(d) = EAST;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
case '7':
|
|
|
|
|
OLC_VAL(d) = SOUTH;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
case '8':
|
|
|
|
|
OLC_VAL(d) = WEST;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
case '9':
|
|
|
|
|
OLC_VAL(d) = UP;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
case 'a':
|
|
|
|
|
case 'A':
|
|
|
|
|
OLC_VAL(d) = DOWN;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
case 'b':
|
|
|
|
|
case 'B':
|
2012-02-06 19:13:03 +00:00
|
|
|
if (!CONFIG_DIAGONAL_DIRS) {
|
2010-11-25 16:24:53 +00:00
|
|
|
write_to_output(d, "Invalid choice!");
|
|
|
|
|
redit_disp_menu(d);
|
|
|
|
|
} else {
|
|
|
|
|
OLC_VAL(d) = NORTHWEST;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'c':
|
|
|
|
|
case 'C':
|
2012-02-06 19:13:03 +00:00
|
|
|
if (!CONFIG_DIAGONAL_DIRS) {
|
2010-11-25 16:24:53 +00:00
|
|
|
write_to_output(d, "Invalid choice!");
|
|
|
|
|
redit_disp_menu(d);
|
|
|
|
|
} else {
|
|
|
|
|
OLC_VAL(d) = NORTHEAST;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'd':
|
|
|
|
|
case 'D':
|
2012-02-06 19:13:03 +00:00
|
|
|
if (!CONFIG_DIAGONAL_DIRS) {
|
2010-11-25 16:24:53 +00:00
|
|
|
write_to_output(d, "Invalid choice!");
|
|
|
|
|
redit_disp_menu(d);
|
|
|
|
|
} else {
|
|
|
|
|
OLC_VAL(d) = SOUTHEAST;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'e':
|
|
|
|
|
case 'E':
|
2012-02-06 19:13:03 +00:00
|
|
|
if (!CONFIG_DIAGONAL_DIRS) {
|
2010-11-25 16:24:53 +00:00
|
|
|
write_to_output(d, "Invalid choice!");
|
|
|
|
|
redit_disp_menu(d);
|
|
|
|
|
} else {
|
|
|
|
|
OLC_VAL(d) = SOUTHWEST;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'f':
|
|
|
|
|
case 'F':
|
2007-03-04 20:18:13 +00:00
|
|
|
/* If the extra description doesn't exist. */
|
2006-12-19 22:56:18 +00:00
|
|
|
if (!OLC_ROOM(d)->ex_description)
|
|
|
|
|
CREATE(OLC_ROOM(d)->ex_description, struct extra_descr_data, 1);
|
|
|
|
|
OLC_DESC(d) = OLC_ROOM(d)->ex_description;
|
|
|
|
|
redit_disp_extradesc_menu(d);
|
|
|
|
|
break;
|
2007-10-12 17:59:17 +00:00
|
|
|
case 'w':
|
|
|
|
|
case 'W':
|
|
|
|
|
write_to_output(d, "Copy what room? ");
|
|
|
|
|
OLC_MODE(d) = REDIT_COPY;
|
|
|
|
|
break;
|
2006-12-19 22:56:18 +00:00
|
|
|
case 'x':
|
|
|
|
|
case 'X':
|
|
|
|
|
/* Delete the room, prompt first. */
|
|
|
|
|
write_to_output(d, "Are you sure you want to delete this room? ");
|
|
|
|
|
OLC_MODE(d) = REDIT_DELETE;
|
|
|
|
|
break;
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
case 's':
|
|
|
|
|
case 'S':
|
|
|
|
|
OLC_SCRIPT_EDIT_MODE(d) = SCRIPT_MAIN_MENU;
|
|
|
|
|
dg_script_menu(d);
|
|
|
|
|
return;
|
|
|
|
|
default:
|
|
|
|
|
write_to_output(d, "Invalid choice!");
|
|
|
|
|
redit_disp_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return;
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
|
|
|
|
|
case OLC_SCRIPT_EDIT:
|
|
|
|
|
if (dg_script_edit_parse(d, arg)) return;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case REDIT_NAME:
|
|
|
|
|
if (!genolc_checkstring(d, arg))
|
|
|
|
|
break;
|
2012-08-11 04:44:23 +00:00
|
|
|
if (count_non_protocol_chars(arg) > MAX_ROOM_NAME / 2) {
|
|
|
|
|
write_to_output(d, "Size limited to %d non-protocol characters.\r\n", MAX_ROOM_NAME / 2);
|
|
|
|
|
break;
|
|
|
|
|
}
|
2006-12-19 22:56:18 +00:00
|
|
|
if (OLC_ROOM(d)->name)
|
|
|
|
|
free(OLC_ROOM(d)->name);
|
|
|
|
|
arg[MAX_ROOM_NAME - 1] = '\0';
|
|
|
|
|
OLC_ROOM(d)->name = str_udup(arg);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case REDIT_DESC:
|
2007-03-04 20:18:13 +00:00
|
|
|
/* We will NEVER get here, we hope. */
|
2012-02-06 19:13:03 +00:00
|
|
|
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: Reached REDIT_DESC case in parse_redit().");
|
2006-12-19 22:56:18 +00:00
|
|
|
write_to_output(d, "Oops, in REDIT_DESC.\r\n");
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case REDIT_FLAGS:
|
|
|
|
|
number = atoi(arg);
|
|
|
|
|
if (number < 0 || number > NUM_ROOM_FLAGS) {
|
|
|
|
|
write_to_output(d, "That is not a valid choice!\r\n");
|
|
|
|
|
redit_disp_flag_menu(d);
|
|
|
|
|
} else if (number == 0)
|
|
|
|
|
break;
|
|
|
|
|
else {
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Toggle the bit. */
|
2007-05-08 17:34:23 +00:00
|
|
|
TOGGLE_BIT_AR(OLC_ROOM(d)->room_flags, number - 1);
|
2006-12-19 22:56:18 +00:00
|
|
|
redit_disp_flag_menu(d);
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
case REDIT_SECTOR:
|
2009-10-23 00:29:56 +00:00
|
|
|
number = atoi(arg) - 1;
|
2006-12-19 22:56:18 +00:00
|
|
|
if (number < 0 || number >= NUM_ROOM_SECTORS) {
|
|
|
|
|
write_to_output(d, "Invalid choice!");
|
|
|
|
|
redit_disp_sector_menu(d);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
OLC_ROOM(d)->sector_type = number;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case REDIT_EXIT_MENU:
|
|
|
|
|
switch (*arg) {
|
|
|
|
|
case '0':
|
|
|
|
|
break;
|
|
|
|
|
case '1':
|
|
|
|
|
OLC_MODE(d) = REDIT_EXIT_NUMBER;
|
|
|
|
|
write_to_output(d, "Exit to room number : ");
|
|
|
|
|
return;
|
|
|
|
|
case '2':
|
|
|
|
|
OLC_MODE(d) = REDIT_EXIT_DESCRIPTION;
|
|
|
|
|
send_editor_help(d);
|
|
|
|
|
write_to_output(d, "Enter exit description:\r\n\r\n");
|
|
|
|
|
if (OLC_EXIT(d)->general_description) {
|
|
|
|
|
write_to_output(d, "%s", OLC_EXIT(d)->general_description);
|
|
|
|
|
oldtext = strdup(OLC_EXIT(d)->general_description);
|
|
|
|
|
}
|
|
|
|
|
string_write(d, &OLC_EXIT(d)->general_description, MAX_EXIT_DESC, 0, oldtext);
|
|
|
|
|
return;
|
|
|
|
|
case '3':
|
|
|
|
|
OLC_MODE(d) = REDIT_EXIT_KEYWORD;
|
|
|
|
|
write_to_output(d, "Enter keywords : ");
|
|
|
|
|
return;
|
|
|
|
|
case '4':
|
|
|
|
|
OLC_MODE(d) = REDIT_EXIT_KEY;
|
|
|
|
|
write_to_output(d, "Enter key number : ");
|
|
|
|
|
return;
|
|
|
|
|
case '5':
|
|
|
|
|
OLC_MODE(d) = REDIT_EXIT_DOORFLAGS;
|
|
|
|
|
redit_disp_exit_flag_menu(d);
|
|
|
|
|
return;
|
|
|
|
|
case '6':
|
|
|
|
|
/*
|
|
|
|
|
* Delete an exit.
|
|
|
|
|
*/
|
|
|
|
|
if (OLC_EXIT(d)->keyword)
|
|
|
|
|
free(OLC_EXIT(d)->keyword);
|
|
|
|
|
if (OLC_EXIT(d)->general_description)
|
|
|
|
|
free(OLC_EXIT(d)->general_description);
|
|
|
|
|
if (OLC_EXIT(d))
|
|
|
|
|
free(OLC_EXIT(d));
|
|
|
|
|
OLC_EXIT(d) = NULL;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
write_to_output(d, "Try again : ");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case REDIT_EXIT_NUMBER:
|
|
|
|
|
if ((number = atoi(arg)) != -1)
|
|
|
|
|
if ((number = real_room(number)) == NOWHERE) {
|
|
|
|
|
write_to_output(d, "That room does not exist, try again : ");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
OLC_EXIT(d)->to_room = number;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
case REDIT_EXIT_DESCRIPTION:
|
2007-03-04 20:18:13 +00:00
|
|
|
/* We should NEVER get here, hopefully. */
|
2012-02-06 19:13:03 +00:00
|
|
|
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: Reached REDIT_EXIT_DESC case in parse_redit");
|
2006-12-19 22:56:18 +00:00
|
|
|
write_to_output(d, "Oops, in REDIT_EXIT_DESCRIPTION.\r\n");
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case REDIT_EXIT_KEYWORD:
|
|
|
|
|
if (OLC_EXIT(d)->keyword)
|
|
|
|
|
free(OLC_EXIT(d)->keyword);
|
|
|
|
|
OLC_EXIT(d)->keyword = str_udup(arg);
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
case REDIT_EXIT_KEY:
|
|
|
|
|
number = atoi(arg);
|
|
|
|
|
if (number < 0)
|
|
|
|
|
OLC_EXIT(d)->key = NOTHING;
|
|
|
|
|
else
|
|
|
|
|
OLC_EXIT(d)->key = number;
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
case REDIT_EXIT_DOORFLAGS:
|
|
|
|
|
number = atoi(arg);
|
2010-11-25 20:34:26 +00:00
|
|
|
if (number < 0 || number > 4) {
|
2006-12-19 22:56:18 +00:00
|
|
|
write_to_output(d, "That's not a valid choice!\r\n");
|
|
|
|
|
redit_disp_exit_flag_menu(d);
|
|
|
|
|
} else {
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Doors are a bit idiotic, don't you think? :) -- I agree. -gg */
|
2006-12-19 22:56:18 +00:00
|
|
|
OLC_EXIT(d)->exit_info = (number == 0 ? 0 :
|
2012-02-06 19:13:03 +00:00
|
|
|
(number == 1 ? EX_ISDOOR :
|
|
|
|
|
(number == 2 ? EX_ISDOOR | EX_PICKPROOF :
|
|
|
|
|
(number == 3 ? EX_ISDOOR | EX_HIDDEN :
|
|
|
|
|
(number == 4 ? EX_ISDOOR | EX_PICKPROOF | EX_HIDDEN : 0)))));
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Jump back to the menu system. */
|
2006-12-19 22:56:18 +00:00
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
case REDIT_EXTRADESC_KEY:
|
|
|
|
|
if (genolc_checkstring(d, arg)) {
|
|
|
|
|
if (OLC_DESC(d)->keyword)
|
|
|
|
|
free(OLC_DESC(d)->keyword);
|
|
|
|
|
OLC_DESC(d)->keyword = str_udup(arg);
|
|
|
|
|
}
|
|
|
|
|
redit_disp_extradesc_menu(d);
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
case REDIT_EXTRADESC_MENU:
|
|
|
|
|
switch ((number = atoi(arg))) {
|
|
|
|
|
case 0:
|
2012-02-06 19:13:03 +00:00
|
|
|
/* If something got left out, delete the extra description when backing
|
2007-03-04 20:18:13 +00:00
|
|
|
out to the menu. */
|
2006-12-19 22:56:18 +00:00
|
|
|
if (OLC_DESC(d)->keyword == NULL || OLC_DESC(d)->description == NULL) {
|
|
|
|
|
struct extra_descr_data *temp;
|
|
|
|
|
if (OLC_DESC(d)->keyword)
|
|
|
|
|
free(OLC_DESC(d)->keyword);
|
|
|
|
|
if (OLC_DESC(d)->description)
|
|
|
|
|
free(OLC_DESC(d)->description);
|
|
|
|
|
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Clean up pointers. */
|
2006-12-19 22:56:18 +00:00
|
|
|
REMOVE_FROM_LIST(OLC_DESC(d), OLC_ROOM(d)->ex_description, next);
|
|
|
|
|
free(OLC_DESC(d));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
OLC_MODE(d) = REDIT_EXTRADESC_KEY;
|
|
|
|
|
write_to_output(d, "Enter keywords, separated by spaces : ");
|
|
|
|
|
return;
|
|
|
|
|
case 2:
|
|
|
|
|
OLC_MODE(d) = REDIT_EXTRADESC_DESCRIPTION;
|
|
|
|
|
send_editor_help(d);
|
|
|
|
|
write_to_output(d, "Enter extra description:\r\n\r\n");
|
|
|
|
|
if (OLC_DESC(d)->description) {
|
|
|
|
|
write_to_output(d, "%s", OLC_DESC(d)->description);
|
|
|
|
|
oldtext = strdup(OLC_DESC(d)->description);
|
|
|
|
|
}
|
|
|
|
|
string_write(d, &OLC_DESC(d)->description, MAX_MESSAGE_LENGTH, 0, oldtext);
|
|
|
|
|
return;
|
|
|
|
|
case 3:
|
|
|
|
|
if (OLC_DESC(d)->keyword == NULL || OLC_DESC(d)->description == NULL) {
|
|
|
|
|
write_to_output(d, "You can't edit the next extra description without completing this one.\r\n");
|
|
|
|
|
redit_disp_extradesc_menu(d);
|
|
|
|
|
} else {
|
|
|
|
|
struct extra_descr_data *new_extra;
|
|
|
|
|
|
|
|
|
|
if (OLC_DESC(d)->next)
|
|
|
|
|
OLC_DESC(d) = OLC_DESC(d)->next;
|
|
|
|
|
else {
|
2007-03-04 20:18:13 +00:00
|
|
|
/* Make new extra description and attach at end. */
|
2006-12-19 22:56:18 +00:00
|
|
|
CREATE(new_extra, struct extra_descr_data, 1);
|
|
|
|
|
OLC_DESC(d)->next = new_extra;
|
|
|
|
|
OLC_DESC(d) = new_extra;
|
|
|
|
|
}
|
|
|
|
|
redit_disp_extradesc_menu(d);
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2007-10-12 17:59:17 +00:00
|
|
|
case REDIT_COPY:
|
|
|
|
|
if ((number = real_room(atoi(arg))) != NOWHERE) {
|
|
|
|
|
redit_setup_existing(d, number);
|
|
|
|
|
} else
|
|
|
|
|
write_to_output(d, "That room does not exist.\r\n");
|
|
|
|
|
break;
|
2012-02-06 19:13:03 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
case REDIT_DELETE:
|
|
|
|
|
if (*arg == 'y' || *arg == 'Y') {
|
2007-01-23 03:07:23 +00:00
|
|
|
if (delete_room(real_room(OLC_ROOM(d)->number)))
|
2006-12-19 22:56:18 +00:00
|
|
|
write_to_output(d, "Room deleted.\r\n");
|
|
|
|
|
else
|
|
|
|
|
write_to_output(d, "Couldn't delete the room!.\r\n");
|
2007-01-23 03:07:23 +00:00
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
cleanup_olc(d, CLEANUP_ALL);
|
|
|
|
|
return;
|
|
|
|
|
} else if (*arg == 'n' || *arg == 'N') {
|
|
|
|
|
redit_disp_menu(d);
|
2007-01-23 03:07:23 +00:00
|
|
|
OLC_MODE(d) = REDIT_MAIN_MENU;
|
2006-12-19 22:56:18 +00:00
|
|
|
return;
|
|
|
|
|
} else
|
|
|
|
|
write_to_output(d, "Please answer 'Y' or 'N': ");
|
2007-01-23 03:07:23 +00:00
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
2006-12-19 22:56:18 +00:00
|
|
|
default:
|
2007-03-04 20:18:13 +00:00
|
|
|
/* We should never get here. */
|
2012-02-06 19:13:03 +00:00
|
|
|
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: Reached default case in parse_redit");
|
2006-12-19 22:56:18 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2007-03-04 20:18:13 +00:00
|
|
|
/* If we get this far, something has been changed. */
|
2006-12-19 22:56:18 +00:00
|
|
|
OLC_VAL(d) = 1;
|
|
|
|
|
redit_disp_menu(d);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void redit_string_cleanup(struct descriptor_data *d, int terminator)
|
|
|
|
|
{
|
|
|
|
|
switch (OLC_MODE(d)) {
|
|
|
|
|
case REDIT_DESC:
|
|
|
|
|
redit_disp_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
case REDIT_EXIT_DESCRIPTION:
|
|
|
|
|
redit_disp_exit_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
case REDIT_EXTRADESC_DESCRIPTION:
|
|
|
|
|
redit_disp_extradesc_menu(d);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|