Skip to content

Building Guide : MudObject

Blecki edited this page Oct 1, 2014 · 1 revision

Mud Object

MudObject is the root type of all objects in the game world. All MudObjects have these properties.

  • String Path - The database file that represents the object, if such a file exists.
  • String Instance - A GUID for this instance of object type, if the object is an instance.

MudObjects define two virtual functions that can be overridden by subclasses.

  • public virtual void Initialize() - Setup this object, after it has been loaded from the database. Initialize is only called if the object is a named object loaded from the database. Any loading of dependent objects should happen within Initialize and not the object's constructor, or the object may cause an infinite loop.
  • public virtual void HandleMarkedUpdate() - Override this to handle any updates after a command changes the object. For example, room detects lighting changes after every command.

Clone this wiki locally