Your browser must have JavaScript enabled in order to view this page.
 >  >
 
Welcome Guest#1798 Login/register    Go to Bottom
Go to Top

Class: DpLiving

SOURCE LOCATION:  /dpuniverse/std/DpLiving.php

Class Overview

An object which is "alive", common code shared between users and NPCs

Creates the following DutchPIPE properties:

  • boolean isLiving - Set to TRUE
  • string displayMode - "graphical" or "abstract"
  • integer sessionAge - Age in seconds of this object
  • integer weightCarry - Combined weight of objects in our inventory
  • integer maxWeightCarry - Maximum weight this object can carry
  • integer volumeCarry - Combined volume of objects in our inventory
  • integer maxVolumeCarry - Maximum volume this object can carry
  • string actionFailure - Last action error message, "Read what?"
  • string actionDefaultFailure - Default action error message, "What?"
  • int lastActionTime - UNIX time stamp of last action performed
  • string inputMode - Input area mode, 'say' or 'cmd'

DpProperties
   |
   --DpObject
      |
      --DpLiving
LOCATED IN:  /dpuniverse/std/DpLiving.php [line 53]
SEE:  DpObject
AUTHOR(S):   Lennert Stock <ls@dutchpipe.org>
LINK:  http://dutchpipe.org/manual/package/DutchPIPE
VERSION:  Release: 0.2.1
LICENSE:  DutchPIPE License
COPYRIGHT:  2006, 2007 Lennert Stock
METHODS:

Direct Descendants

Child Class Description
DpUser A user object, the object representing a real user
DpNpc A 'non playing character', a bot

Inherits

Inherited Methods

INHERITED FROM:  DpObject
void   DpObject::addAction()   Adds an action to the object
void   DpObject::addId()   Adds one or more ids for this object
void   DpObject::addItem()   Adds an examinable 'item' to this object
void   DpObject::addMapAreaAction()   Adds an action to a map area so it becomes clickable there
void   DpObject::addValidClientCall()   Makes the given method callable from the DutchPIPE client
void   DpObject::createDpObject()   Sets this object up at the time it is created
void   DpObject::event()   Reports an event
void   DpObject::eventDpObject()   Reports an event
array   DpObject::getActionData()   Gets data of one, multiple or all actions
void   DpObject::getActionsMenu()   Tells the current user the HTML with the action menu for this object
string   DpObject::getAppearance()   Gets the HTML "appearance" of this object
string   DpObject::getAppearanceInventory()   Gets the HTML "appearance" of all objects in this object's inventory
string   DpObject::getAppearanceTitle()   Gets the graphical appearance in HTML for this object
string   DpObject::getBody()   Gets the HTML content of this object
int|float   DpObject::getCredits()   Gets the amount of credits in the inventory of this object
mixed   DpObject::getEnvironment()   Gets the object reference to the environment of this object
int|float   DpObject::getHeapAmount()   Gets the amount of a given heap object
array   DpObject::getIds()   Gets the array of ids for this object, or an empty array for no ids
array   DpObject::getInventory()   Gets an array with object references to all objects in our inventory
array   DpObject::getItem()   Gets an array with data about an item
mixed   DpObject::getItemDescription()   Gets the description of a given item
array   DpObject::getItems()   Gets an array with all item data added to this object
mixed   DpObject::getMapArea()   Gets data of one, multiple or all imagemap areas
array   DpObject::getMapAreaActions()   Gets all map area actions for all areas or for a given area
string   DpObject::getMapAreaHtml()   Gets HTML for all imagemaps or the given imagemap for inclusion in page
string   DpObject::getNavigationTrailHtml()   Gets a HTML navigation trail for this object
array   DpObject::getTargettedActions()   Gets actions which can be performed on this object, for action menu
string   DpObject::getTitle()   Gets the object's title with optional prefixes such as 'a' and 'the'
mixed   DpObject::getTitleImgHeight()   Gets the height in pixels of the title image
mixed   DpObject::getTitleImgWidth()   Gets the width in pixels of the title image
void   DpObject::handleCleanUp()   Called by the universe object, checks if this object can be removed.
boolean   DpObject::isDraggable()   Can we be dragged on the screen by the given user?
boolean   DpObject::isId()   Checks if the given id is a valid id for this object
boolean   DpObject::isPresent()   Checks if an object is present in this object's inventory
boolean   DpObject::isValidClientCall()   May the given method be called in this object from the DutchPIPE client?
void   DpObject::makePresent()   Makes sure an object is present in this object's inventory
int   DpObject::moveDpObject()   Moves this object into the inventory of another object
boolean   DpObject::performActionSubject()   Tries if a user action can be performed on this object
void   DpObject::removeAction()   Removes the given action.
void   DpObject::removeDpObject()   Removes this object from the universe
void   DpObject::removeId()   Removes one or more ids for this object
void   DpObject::removeMapAreaAction()   Removes a map area action
void   DpObject::removeValidClientCall()   Removes the given method from callable methods from the DutchPIPE client
void   DpObject::reportMove()   Reports graphical movement of this object to other objects
void   DpObject::resetDpObject()   Resets this object
void   DpObject::setBody()   Sets the HTML content of this object
boolean   DpObject::setCredits()   Sets the amount of credits in the inventory of this object
boolean   DpObject::setHeapAmount()   Sets a heap object of a given amount in this object
void   DpObject::setIds()   Sets an array of names used to refer to this object
void   DpObject::setMapArea()   Creates a new imagemap area which can be used by actions
void   DpObject::setTimeout()   Calls the given method after the given number of seconds
void   DpObject::setTitle()   Sets the title for this object, "beer", used for object labels, etc.
void   DpObject::tell()   Tells data (message, window, location, ...) to this object
void   DpObject::__destruct()   Called by PHP when this object is destroyed, handles events

INHERITED FROM:  DpProperties
void   DpProperties::coinherit()   "Coinherit" a class located at the given pathname
mixed   DpProperties::getDpProperty()   Directly retrieve the value of an existing DutchPIPE property
boolean   DpProperties::isDpProperty()   Determines if a property is defined in this object
void   DpProperties::removeDpProperties()   Removes properties and coinherits
void   DpProperties::setDpProperty()   Directly set the value of an existing DutchPIPE property
void   DpProperties::__call()   Handles set and get methods for properties using PHP member overloading
mixed   DpProperties::__get()   Gets the value of a DutchPIPE property using PHP member overloading
boolean   DpProperties::__isset()   Determines if a property is defined in this object using PHP member overloading
void   DpProperties::__set()   Sets the value of a DutchPIPE property using PHP member overloading
void   DpProperties::__unset()   Unsets the given DutchPIPE property using PHP member overloading

Methods Summary

boolean   actionCheer()   Makes this living object cheer wildly
boolean   actionDance()   Makes this living object take another living object for a dance
boolean   actionDrop()   Drops an object in the user's environment
boolean   actionEmote()   Makes this living object communicate a custom message to its environment
boolean   actionExamine()   Makes this living object examine an object
boolean   actionGive()   Makes this living object give an object to another living object
boolean   actionGrin()   Makes this living object grin evilly
boolean   actionHighFive()   Makes this living object slap a high-five with another living object
boolean   actionHug()   Makes this living object hug another living object
boolean   actionInventory()   Shows this living object a list of objects it is carrying
boolean   actionKiss()   Makes this living object give another living object a passionate kiss
boolean   actionLaugh()   Makes this living object fall down on the floor laughing
boolean   actionNod()   Makes this living object nod solemnly
boolean   actionPat()   Makes this living object pat another living object on the head
boolean   actionSay()   Makes this living object say something
boolean   actionShout()   Makes this living object shout something to everyone on the site
boolean   actionShrug()   Makes this living object shrug
boolean   actionSmile()   Makes this living object smile happily
boolean   actionTake()   Makes this living object take an object
boolean   actionTell()   Makes this living object tell something to another user object
void   createDpLiving()   Sets this living object up at the time it is created
void   eventDpLiving()   Reports an event
void   eventDpObject()   Reports an event
string   getActionOperantMenu()   Completes the give action performed by clicking on an object
void   getEmotionsMenu()  
void   getMenuGiveAuth()  
void   getMenuGiveLabel()  
void   getMenuTellAuth()  
string   getSessionAge()   Gets the livings's age since it was created as an object in a string
void   getTellOperant()  
void   getVolumeCarry()  
void   getWeightCarry()  
boolean   performAction()   Tries to perform the action given by the living object
void   resetDpLiving()   Resets this living object
void   timeoutHeartBeat()   Calls itself every "heartbeat"

Methods

actionCheer  [line 903]
boolean actionCheer( string $verb , string $noun   )

Makes this living object cheer wildly

PARAMETERS: string   $verb  the action, "cheer"
string   $noun  who to cheer on, could be empty
RETURNS:  boolean  TRUE
actionDance  [line 1114]
boolean actionDance( string $verb , string $noun   )

Makes this living object take another living object for a dance

PARAMETERS: string   $verb  the action, "dance"
string   $noun  who to dance with, could be empty
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
actionDrop  [line 530]
boolean actionDrop( string $verb , string $noun , [ $silently = FALSE]   )

Drops an object in the user's environment

PARAMETERS: string   $verb  the action, "drop"
string   $noun  what to drop, could be empty
   $silently 
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
actionEmote  [line 1148]
boolean actionEmote( string $verb , string $noun   )

Makes this living object communicate a custom message to its environment

PARAMETERS: string   $verb  the action, "emote"
string   $noun  string to "emote"
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
REDEFINED AS:   DpUser::actionEmote(): Makes this user communicate a custom message to its environment
actionExamine  [line 387]
boolean actionExamine( string $verb , string $noun   )

Makes this living object examine an object

PARAMETERS: string   $verb  the action, "examine"
string   $noun  what to examine, could be empty
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
actionGive  [line 740]
boolean actionGive( string $verb , string $noun   )

Makes this living object give an object to another living object

PARAMETERS: string   $verb  the action, "give"
string   $noun  what and who to give, could be empty
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
SEE:  actionGiveOperant()
actionGrin  [line 868]
boolean actionGrin( string $verb , string $noun   )

Makes this living object grin evilly

PARAMETERS: string   $verb  the action, "grin"
string   $noun  empty string
RETURNS:  boolean  TRUE
actionHighFive  [line 1015]
boolean actionHighFive( string $verb , string $noun   )

Makes this living object slap a high-five with another living object

PARAMETERS: string   $verb  the action, "high5"
string   $noun  who to high5, could be empty
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
actionHug  [line 1049]
boolean actionHug( string $verb , string $noun   )

Makes this living object hug another living object

PARAMETERS: string   $verb  the action, "hug"
string   $noun  who to hug, could be empty
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
actionInventory  [line 600]
boolean actionInventory( string $verb , string $noun   )

Shows this living object a list of objects it is carrying

PARAMETERS: string   $verb  the action, "inventory"
string   $noun  empty string
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
actionKiss  [line 1080]
boolean actionKiss( string $verb , string $noun   )

Makes this living object give another living object a passionate kiss

PARAMETERS: string   $verb  the action, "kiss"
string   $noun  who to kiss, could be empty
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
actionLaugh  [line 885]
boolean actionLaugh( string $verb , string $noun   )

Makes this living object fall down on the floor laughing

PARAMETERS: string   $verb  the action, "laugh"
string   $noun  empty string
RETURNS:  boolean  TRUE
actionNod  [line 947]
boolean actionNod( string $verb , string $noun   )

Makes this living object nod solemnly

PARAMETERS: string   $verb  the action, "nod"
string   $noun  empty string
RETURNS:  boolean  TRUE
actionPat  [line 981]
boolean actionPat( string $verb , string $noun   )

Makes this living object pat another living object on the head

PARAMETERS: string   $verb  the action, "pat"
string   $noun  who to pat, could be empty
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
actionSay  [line 619]
boolean actionSay( string $verb , string $noun   )

Makes this living object say something

PARAMETERS: string   $verb  the action, "say"
string   $noun  what to say, could be empty
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
actionShout  [line 820]
boolean actionShout( string $verb , string $noun   )

Makes this living object shout something to everyone on the site

PARAMETERS: string   $verb  the action, "shout"
string   $noun  what to shout, could be empty
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
REDEFINED AS:   DpUser::actionShout(): Makes this user shout something to everyone on the site
actionShrug  [line 964]
boolean actionShrug( string $verb , string $noun   )

Makes this living object shrug

PARAMETERS: string   $verb  the action, "laugh"
string   $noun  empty string
RETURNS:  boolean  TRUE
actionSmile  [line 851]
boolean actionSmile( string $verb , string $noun   )

Makes this living object smile happily

PARAMETERS: string   $verb  the action, "smile"
string   $noun  empty string
RETURNS:  boolean  TRUE
actionTake  [line 436]
boolean actionTake( string $verb , string $noun   )

Makes this living object take an object

PARAMETERS: string   $verb  the action, "take"
string   $noun  what to take, could be empty
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
actionTell  [line 788]
boolean actionTell( string $verb , string $noun   )

Makes this living object tell something to another user object

PARAMETERS: string   $verb  the action, "tell"
string