obj
index
(built-in)

Contains the Python wrapper for game objects. Also contains utilities
for listing, storing, and generating objects from prototypes.

 
Classes
       
__builtin__.object
Obj

 
class Obj(__builtin__.object)
    Obj/Obj objects
 
  Methods defined here:
__cmp__(...)
x.__cmp__(y) <==> cmp(x,y)
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
attach(...)
attach(trigger)
 
Attach a trigger to the object by key name.
aux(...)
Alias for obj.Obj.getAuxiliary(name)
copy(...)
copy()
 
Returns a copy of the object.
deletevar(...)
deletevar(name)
 
Deletes a special variable from an object if they have one by the
given name.
delvar(...)
Alias for obj.Obj.deletevar(name)
detach(...)
detach(trigger)
 
Detach a trigger from the object by key name.
do_trigs(...)
do_trigs(type, ch=None, obj=None, room=None, exit=None, cmd=None,
         arg=None, opts=None)
 
Run triggers of the specified type on the object. By default, the
trigger owner is 'me'. Other variables can be specified. The opts
variable can be a dictionary that maps optional variable names to their
values.
edesc(...)
edesc(keywords, desc)
 
Create an extra description for the object, accessible via a comma-
separated list of keywords.
fromall(...)
fromall()
 
Remove object from whichever room, character, or container it is in.
getAuxiliary(...)
getAuxiliary(name)
 
Returns object's auxiliary data of the specified name.
get_type_data(...)
get_type_data(item_type)
 
Returns Python item type data if it exists, or None.
get_types(...)
get_types()
 
Returns a comma-separated list of item types this object has.
getvar(...)
getvar(name)
 
Return value of a special variable. Return 0 if no value has been set.
hasvar(...)
hasvar(name)
 
Return True if object has the given special variable. False otherwise.
isConsumeType = __obj_isConsumeType__(obj, type)
Return whether the object is consumable, and of the specified type
of consumable.
isinstance(...)
isinstance(prototype)
 
returns whether the object inherits from a specified obj prototype.
istype(...)
istype(item_type)
 
Returns True or False if the object is of the specified item type.
settype(...)
settype(item_type)
 
Make an object be the specified item type.
setvar(...)
setvar(name, val)
 
Set value of a special variable for the object. Values must be strings
or numbers. This function is intended to allow scripts and triggers toopen-endedly add variables to objects.
store(...)
store()
 
Return a storage set representing the object.

Data descriptors defined here:
age
Value is the difference between the object's creation time and the
current system time. Immutable.
birth
Value is the object's creation time (system time). Immutable.
bits
A comma-separated list of bits currently toggled for this object.
carrier
The character whose inventory this object is currently in, or None.
chars
A list of characters currently sitting/riding this object. Immutable.
See char.Char.furniture for changing a character's furniture.
container
The container this object is currently in, or None.
container_capacity
The maximum amount of weight c container can hold.
container_is_closable
True or False if the container can be closed.
container_is_closed
True or False if the container is closed.
container_is_locked
True or False if the container is locked.
container_key
An object prototype that acts as a key for this container.
container_pick_diff
An integer representing how difficult a container's lock is to pick.
contents
A list of other objects contained within this one. Immutable.
See obj.Obj.container for changing an object's container.
desc
An object's verbose description e.g., for when it is looked at.
furniture_capacity
The number of characters a furniture object can accomodate.
furniture_type
The type of furniture this is: 'at' or 'on' like e.g., tables vs. couches.
hidden
Integer value representing how hard this object is to see.
keywords
A comma-separated list of keywords for referencing the object.
md
The object's miedziaki
mdesc
the equivalent of mname, for room descriptions.
mname
The object's name for describing packs, e.g.,
a stack of 12 linen towels. The number should be replaced by %d, or
not included.
name
The object's name e.g., a longsword
objs
Alias for obj.Obj.contents
portal_dest
A string key specifying the destination of the portal. Can be set by
a string or the actual room.
portal_enter_mssg
The message shown to the desination room when a character enters portal.
portal_leave_mssg
The message shown to a room after a character leaves it via a portal.
prototypes
A comma-separated list of prototypes this object inherits from. Immutable
rdesc
The object's description when seen in a room, e.g.,
a longsword is here, gleaming in the sun.
room
The room this object is current in, or None.
sr
The object's srebrniki
uid
The object's unique identification number. Immutable.
wearer
The character who is currently wearing this object, or None.
weight
The object's weight (plus contents). When setting a new value, 
sets raw weight (minus contents).
weight_raw
The object's weight (minus contents)
worn_locs
The position names this worn type must be equipped to. Immutable.
worn_type
The type of worn item this is.
worth
The object's value
The object's złocisze

Data and other attributes defined here:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

 
Functions
       
count_objs(...)
count_objs(keyword, loc = None)
 
count how many occurences of an object with the specified keyword, uid,
or prototype exist at a location. If loc is None, search the entire mud.
Loc can be a room, character, or container object.
find_obj(...)
function has been deprecated. Entrypoint for generic_find().
Use mud.parse_args instead.
find_obj_key(...)
function has been deprecated. Entrypoint for generic_find().
Use mud.parse_args instead.
load_obj(...)
load_obj(prototype, where=None, equip_to='')
 
Generate a new object from the specified prototype. Add it to where.
Where can be a room, character, or container. If where is a character,
add the object to the character's inventory unless a comma-separated
list of bodypart name of positions is specified. Return the created object.
obj_list(...)
obj_list()
 
Return a list containing every object in the game.
read(...)
read(storage_set)
 
Read and return an object from a storage set.