


/inherit/base.c(1)                             /inherit/base.c(1)


DDEESSCCRRIIPPTTIIOONN
       //iinnhheerriitt//bbaassee..cc  is  the  base object for all objects. All
       objects mmuusstt inherit base object to gain the  basic  func       tionalities  required for all objects (names, descriptions
       ...),  so  functions  and  variables  described  here  are
       included in eevveerryy object.



VVAARRIIAABBLLEESS
       (all variables are accessible with set() and query() func       tions, see below)


       _s_t_r_i_n_g _n_a_m_e
              `name' is the primary name  an  object  is  called.
              It's  often  used  as abbreviation when whole short
              description is not needed.


       _s_t_r_i_n_g _*_a_l_i_a_s_e_s
              Aliases are the secondary  name(s)  of  an  object.
              Their  purpose  is  to  ease handling of objects by
              giving several names for user to choose from.


       _s_t_r_i_n_g _s_h_o_r_t___d_e_s_c
              Short description is the description that the  user
              sees  when  (s)he  has  the object in his view, but
              when not having chance to  examine  it  more  thor              oughly (inventory lists, ...).


       _s_t_r_i_n_g _l_o_n_g___d_e_s_c
              Long  description  is  sent to user when looking or
              examining  the  specific   object.   This   usually
              requires  the  object to be in his/her inventory or
              environment.




FFUUNNCCTTIIOONNSS
       _m_i_x_e_d _s_e_t_(_s_t_r_i_n_g _v_a_r_, _s_t_r_i_n_g _v_a_l_u_e_)
              set() is used to give values to variables  included
              in  object.  The  name  of the variable (`var') and
              it's value (`value') are given as arguments.

              Example: THIS->set("name", "Dazzt");


       _m_i_x_e_d _q_u_e_r_y_(_s_t_r_i_n_g _v_a_r_)
              query() is used to get values from  variables.  The
              name  of the variable (`var') is given as argument.



                        MAJIK INHERITABLES                      1





/inherit/base.c(1)                             /inherit/base.c(1)


              Example: string name = THIS->query("name");


       _s_t_r_i_n_g _s_h_o_r_t_(_)
              short() returns the short description of an object.
              The  main use for this is to create custom routines
              that return different short descriptions  depending
              on object's state (for example open or closed).


       _s_t_r_i_n_g _l_o_n_g_(_)
              long()  returns  the long description of an object.
              It's included for  same  reasons  as  short()  (see
              above).


       _s_t_r_i_n_g _s_t_a_t___m_e_(_)
              stat_me()  is  the  function  for giving statistics
              about object. It's intended for wizards and  should
              be  never  shown  to mortals as it may contain very
              specific information about object.


       _v_o_i_d _r_e_m_o_v_e_(_)
              remove() destructs the object and gives  a  message
              about it to object's environment.


       _v_o_i_d _m_o_v_e_(_m_i_x_e_d _t_a_r_g_e_t_)
              move() is used to move object inside another object
              (`target').


       _i_n_t _i_d_(_s_t_r_i_n_g _n_a_m_e_)
              id() is the function used by gamedriver to identify
              objects.  It  returns either 1 or 0 depending on if
              object recognizes  itself  by  name  (`name').  One
              shouldn't need this function in his/her code, as it
              is one of the vital functions  of  an  object,  and
              shouldn't be replaced unless you _really_ know what
              you are doing.
















                        MAJIK INHERITABLES                      2


