2.3.1.1 The base object class, /std/object.c
This is the all purpose object class. ALL objects in the game must inherit
this object somewhere along the line if they are to be 'physically' present
somewhere. Using any kind of standard object usually insures that this one
is inherited as well, since they already make use of it.
The standard object defines the following conventions:
- @bullet{inventory}
- An object can contain other objects. In reality that is nothing but a
list of objects that are said to be held inside the object owning the
list. However, it is very easy to visualize this as the inside of a bag,
inside a room, inside a box etc.
- @bullet{environment}
- The object that surrounds the object that is being used as
reference. In other words the reference object exists in the inventory
of the environment object. An object can have a multitude of objects in
its own inventory, but it can only have one environment object. All
objects start out with no environment.
- @bullet{command set}
- A list of catch-phrases linked to functions that the object makes
available to other so called living objects in the game either in
the environment or inventory of itself. These living objects can issue
such a catch-phrase and the command-giving object will execute the
linked function.
- @bullet{properties}
- Properties are a pure mudlib convenience. They really is nothing but a
mapping with certain reserved names indexed to object variables that
affect certain generally accessible states. Typical properties are
weight, value and light-level, but also more abstract concepts like
the ability to be dropped, taken or sold. The applicable set of properties
vary from object type to object type.
Wizards may add their own properties if they wish, but they must then be
careful to define names that won't mistakenly be used by other wizards
for other purposes, or advertise the names so that people won't use them
by mistake.
- @bullet{light}
- An object has a certain light level. Usually it's just as any kind of
object - not affecting the environment at all, but it's possible to have
both light- and darkness-sources.
- @bullet{weight/volume}
- These values determine how much an object weight and how much room they
take. For 'hollow' objects like bags it also determines how much they
can hold.
- @bullet{visibility}
- Some objects may be easier to find than others.
- @bullet{names and descriptions}
- What the object is called and how a player will see it in the game.
This document was generated
by Hekay Permer on April, 20 2005
using texi2html