Catalog(3)                                                          Catalog(3)



NNAAMMEE
       Catalog -

SSYYNNOOPPSSIISS
   PPuubblliicc MMeetthhooddss
       void ccrreeaattee ()
       string ccaattaalloogg__iinnffoo ()
       mapping qquueerryy__ccaattaalloogg ()
       int sseett__ccaattaalloogg (mapping m)

   PPuubblliicc AAttttrriibbuutteess
       mapping ccaattaalloogg

DDEETTAAIILLEEDD DDEESSCCRRIIPPTTIIOONN
       This object tracks the statistics on any object that can be forged,
       built, constructed, assembled, devised, or otherwise created within the
       game rules. It contains information like material requirements and
       building time.

       Each entry in the catalog is indexed by the name of the unit. Here is a
       rough layout of the formatting:

       ([ name: ({ filename, unit_type, requirements ... }), ... ])

       _f_i_l_e_n_a_m_e is the file which should be cloned to create this unit. It may
       refer to either a .c or a .o file.

       _u_n_i_t___t_y_p_e is an integer which acts as a typing variable for this unit.
       If UNIT_BUILDING were 2, then the 'build' command could check that the
       item's type is 2 before allowing you to build it.

       _r_e_q_u_i_r_e_m_e_n_t_s fill out the remainder of the array. Each requirement is a
       string, of the format 'name:amount'. Generally, _n_a_m_e gives the resource
       type, and _a_m_o_u_n_t is an integer (in string base 10 representation)
       giving the amount of that resource necessary to build the object. There
       is one special requirement, 'time', given in seconds. For example,
       'time:30' means the object requires 30 seconds to build (30 minutes of
       game time).

       Definition at line 27 of file catalog.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
   ssttrriinngg ccaattaalloogg__iinnffoo (())
       Allows object editors to manipulate this object.

       Definition at line 43 of file catalog.c.

   vvooiidd ccrreeaattee (())
       Initializes the catalog, loading it from disk if one has been made
       before.

       Definition at line 35 of file catalog.c.

       References catalog.

   mmaappppiinngg qquueerryy__ccaattaalloogg (())
       RReettuurrnnss::
           The entire catalog mapping. Please do not modify the return value
           directly.

       Definition at line 49 of file catalog.c.

       References catalog.

   iinntt sseett__ccaattaalloogg ((mmaappppiinngg mm))
       Allows you to set the entire catalog at once. This function has a
       single safeguard, in that it only allows you to pass in mappings;
       however, it is still possible to cause a lot of damage by passing in a
       bogus catalog to this function.

       Definition at line 57 of file catalog.c.

       References catalog.

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
   mmaappppiinngg ccaattaalloogg
       The mapping containing the catalog.

       Definition at line 31 of file catalog.c.

       Referenced by create(), query_catalog(), and set_catalog().


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



Walraven                          8 Jan 2004                        Catalog(3)
