Exit 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.Exit(name, target=None, owner=0)[source]

Exits are what the players use to exit and move into other rooms in the ScalyMUCK world. They may only have one target room ID which is used to assign .target to them when they are loaded or creates by the game.World instance.

__init__(name, target=None, owner=0)[source]

Initializes an instance of the Exit model.

The Exit is not constructed manually by any of the modifications, this should be performed by calling the create_player function on the game.World instance provided to every modification.

Keyword arguments:
  • target – The ID or instance of a Room that this exit should be linking to.
  • owner – The ID or instance of a Player that this should should belong to.
__repr__()[source]

Produces a representation of the exit, as to be expected.

description

A 2000 character string that is used to describe the Exit if it ever happens to be needed.

id

This variable is the database number of the Exit.

location_id

This variable is the database number of the Room this Exit is in.

name

A short 25 character string that should be used for the name of the Exit.

owner_id

This variable is the database number of the Player this Exit belongs to.

room_enter_message

A 100 character string that represents the message displayed to the user upon entering the target Room.

room_exit_message

A 100 character string that is displayed to the inhabitants of the Room this Exit is located in upon use.

target_id

This variable is the database number of the Room that this Exit points to.

user_enter_message

A 100 character string that represents the message displayed to the Player using this exit.

user_exit_message

A 100 character string that represents the message displayed to the Player using this exit.

Previous topic

Item Model

Next topic

Common Class

This Page