Common Class

This is where all of ScalyMUCK’s model definitions are located, save for the modifications that may extend the software in such a way that it demands for extra models but that is beyond the point.

The “base” definitions located in models.py are:

All of the above classes inherit a few functions from ObjectBase as well.

class models.ObjectBase[source]

Base class used for the inheritance of useful member functions that work accross all models.

commit()[source]

Commits any changes left in RAM to the database.

delete()[source]

Deletes the object from the world. If it is a Player instance, the related connection is dropped from the server.

set_description(description, commit=True)[source]

Sets the description of this object.

Sets the description of the calling object instance.

Keyword arguments:
  • commit – Determines whether or not this data should be commited immediately. It also includes other changes made

by any previous function calls thay may have set this to false. Default: True

set_location(location, commit=True)[source]

Sets the current location of this object.

This sets the location of the object without any prior notification to the person being moved (if it’s a player) nor anyone in the original room or the target room. That is the calling modification’s job to provide any relevant messages.

Keyword arguments:
  • commit – Determines whether or not this data should be commited immediately. It also includes other changes made

by any previous function calls thay may have set this to false. Default: True

set_name(name, commit=True)[source]

Sets the name of the object.

This sets the name of the object that is displayed and used to process requests towards it.

Keyword arguments:
  • commit – Determines whether or not this data should be commited immediately. It also includes other changes made

by any previous function calls thay may have set this to false. Default: True

Previous topic

Exit Model

Next topic

World Class

This Page