Item Model

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.Item(name=None, description='<Unset>', owner=0)[source]

Base item model that ScalyMUCK uses.

Items are really a generic object in ScalyMUCK, they’re not players nor rooms nor exits but serve multiple purposes. They can quite literally be an item, stored in the player’s inventory to be used later (like a potion) or they may be used to decorate rooms with specific objects such as furniture or they may even be used to represent dead bodies.

description

A 2000 character string representing the description of this Item.

id

This variable is the database number of this Item.

location_id

This is the database number of the Room that this Item is located in.

name

A short 25 character string representing the name of the Item that is displayed to every connection related to a Player.

owner_id

This is the database number of the Player that this Item belongs to.

set_owner(owner)[source]

Sets a new owner for this item.

Previous topic

Bot Model

Next topic

Exit Model

This Page