Extra_desc(3)                                                    Extra_desc(3)



NNAAMMEE
       Extra_desc -

SSYYNNOOPPSSIISS
       Inherited by MMaapprroooomm, and RRoooomm.


   PPuubblliicc MMeetthhooddss
       protected int eevvaall__ddeesscc__rroooott ()
       int sseett__eexxttrraa__ddeesscc (string keyword, string desc)
       string qquueerryy__eexxttrraa__ddeesscc (string keyword)
       int sseett__ddeesscc__rroooott (string objref)
       string qquueerryy__ddeesscc__rroooott ()
       void sseett__ddeesscc__vvaarr (string var, mixed val)
       mixed qquueerryy__ddeesscc__vvaarr (string var)
       void sseett__ddeesscc__vvaarrss (mapping m)
       mapping qquueerryy__ddeesscc__vvaarrss ()
       int rreemmoovvee__eexxttrraa__ddeesscc (string keyword)
       mapping qquueerryy__ddeessccss ()
       void sseett__ddeessccss (mapping m)
       string eexxttrraa__iidd (string str)

   PPuubblliicc AAttttrriibbuutteess
       mapping ddeessccss
       mapping ddeesscc__vvaarrss
       string ddeesscc__rroooott

DDEETTAAIILLEEDD DDEESSCCRRIIPPTTIIOONN
       This is used to add extra descriptions to a room without actually
       creating extra objects. This is usually bad practice, since creating
       full-blown scenery objects is much more flexible, but for things like
       cave-paintings or 'look at sky', this is just what you need.

       Note that nothing is added to the room description by these extra
       descriptions. Rather, this provides a mechanism for allowing 'look at'
       for any object that is mentioned in the room's 'long' description but
       which doesn't really exist.

       This object also handles local desc vars. These are variables to be
       used only by conditional expressions within this object (as opposed to
       global conditional variables, which can be used in any object).

       Definition at line 23 of file extra_desc.c.

MMEEMMBBEERR FFUUNNCCTTIIOONN DDOOCCUUMMEENNTTAATTIIOONN
   pprrootteecctteedd iinntt eevvaall__ddeesscc__rroooott (())
       Internal protected function. Used to get an object pointer to root
       object.

       Definition at line 39 of file extra_desc.c.

       References desc_root.

       Referenced by query_extra_desc(), and set_desc_root().

   ssttrriinngg eexxttrraa__iidd ((ssttrriinngg ssttrr))
       RReettuurrnnss::
           The string (description) associated with _s_t_r; this is the
           description which you should print. If there is no such
           description, 0 is returned.

       Definition at line 176 of file extra_desc.c.

       References query_extra_desc().

   ssttrriinngg qquueerryy__ddeesscc__rroooott (())
       RReettuurrnnss::
           The currently set description root object reference. See
           sseett__ddeesscc__rroooott(()).

       Definition at line 113 of file extra_desc.c.

       References desc_root.

   mmiixxeedd qquueerryy__ddeesscc__vvaarr ((ssttrriinngg vvaarr))
       Queries a local description variable, but does not evaluate it. See See
       SSiimmuull__eeffuunn::::eevvaall__ddeesscc__vvaarr(()).

       PPaarraammeetteerrss::

       _v_a_r    The variable whose value you wish to query.

       RReettuurrnnss::
           0 for an unset variable, the variable's value otherwise.

       Definition at line 132 of file extra_desc.c.

       References desc_vars.

   mmaappppiinngg qquueerryy__ddeesscc__vvaarrss (())
       RReettuurrnnss::
           The entire desc_vars mapping.

       Definition at line 145 of file extra_desc.c.

       References desc_vars.

   mmaappppiinngg qquueerryy__ddeessccss (())
       RReettuurrnnss::
           The entire descs mapping.

       Definition at line 163 of file extra_desc.c.

       References descs.

   ssttrriinngg qquueerryy__eexxttrraa__ddeesscc ((ssttrriinngg kkeeyywwoorrdd))
       Queries one of the extra descriptions literally. This will not
       dereference aliases. This function is provided as a low-level backdoor
       -- if all you are interested in is getting a description, use extra_id
       instead.

       Although this function does not handle aliases, it will check for extra
       descriptions in the description root object, if there is one.

       Definition at line 79 of file extra_desc.c.

       References descs, and eval_desc_root().

       Referenced by extra_id().

   iinntt rreemmoovvee__eexxttrraa__ddeesscc ((ssttrriinngg kkeeyywwoorrdd))
       Removes an extra description for this object. See sseett__eexxttrraa__ddeesscc(()).

       PPaarraammeetteerrss::

       _k_e_y_w_o_r_d
              The keyword for the description you wish to remove.

       RReettuurrnnss::
           1 on success, 0 if there was no extra description named _k_e_y_w_o_r_d.

       Definition at line 156 of file extra_desc.c.

       References descs.

   iinntt sseett__ddeesscc__rroooott ((ssttrriinngg oobbjjrreeff))
       This allows you to set a 'root' description object; if you want to have
       a set of descriptions that are common to many rooms, you should use
       this. You need to create an extra_desc enabled object which all of your
       branch objects will connect to. Then, call this function in each branch
       object, pointing them back to the root object. This will make every
       description from the root objects available in the branch objects as
       well.

       Root objects may themselves have root objects. Be careful not to make a
       circular reference.

       RReettuurrnnss::
           True on success. The object must be valid when you try to set the
           desc_root, or it will fail.

       Definition at line 104 of file extra_desc.c.

       References desc_root, and eval_desc_root().

   vvooiidd sseett__ddeesscc__vvaarr ((ssttrriinngg vvaarr,, mmiixxeedd vvaall))
       Sets a local description variable. See
       SSiimmuull__eeffuunn::::sseett__gglloobbaall__ddeesscc__vvaarr(()).

       PPaarraammeetteerrss::

       _v_a_r    The name of the variable to set; generally an upper-case string.

       _v_a_l    The value for this variable. String, integer, closure, or array.

       Definition at line 121 of file extra_desc.c.

       References desc_vars.

   vvooiidd sseett__ddeesscc__vvaarrss ((mmaappppiinngg mm))
       Sets the desc_vars mapping directly.

       Definition at line 140 of file extra_desc.c.

       References desc_vars.

   vvooiidd sseett__ddeessccss ((mmaappppiinngg mm))
       Sets the descs mapping directly.

       Definition at line 168 of file extra_desc.c.

       References descs.

   iinntt sseett__eexxttrraa__ddeesscc ((ssttrriinngg kkeeyywwoorrdd,, ssttrriinngg ddeesscc))
       Adds an extra description to this object. The extra description will
       get used when 'keyword' is passed in. If you want to have multiple
       keywords map to a single description, add the other keywords as
       aliases:

       set_extra_desc( 'waves', '!ocean' ); // When you look at waves, fetch
       description for ocean.

       Aliases are evaluated shallowly.

       PPaarraammeetteerrss::

       _k_e_y_w_o_r_d
              The keyword for referencing the description.

       _d_e_s_c   The description itself.

       RReettuurrnnss::
           1 on success, which should always happen as long as desc is a
           string.

       Definition at line 62 of file extra_desc.c.

       References descs.

MMEEMMBBEERR DDAATTAA DDOOCCUUMMEENNTTAATTIIOONN
   ssttrriinngg ddeesscc__rroooott
       A 'root' object with extended descriptions.

       Definition at line 35 of file extra_desc.c.

       Referenced by eval_desc_root(), query_desc_root(), and set_desc_root().

   mmaappppiinngg ddeesscc__vvaarrss
       A mapping of variable names to various data pieces for local
       conditional variables.

       Definition at line 32 of file extra_desc.c.

       Referenced by query_desc_var(), query_desc_vars(), set_desc_var(), and
       set_desc_vars().

   mmaappppiinngg ddeessccss
       A mapping of keywords to strings for local descriptions.

       Definition at line 27 of file extra_desc.c.

       Referenced by query_descs(), query_extra_desc(), remove_extra_desc(),
       set_descs(), and set_extra_desc().


AAUUTTHHOORR
       Generated automatically by Doxygen for Walraven from the source code.



Walraven                          8 Jan 2004                     Extra_desc(3)
