Table of Contents

Class: Command pubcore.py

Command: stores references for various parts of a command

Basically, this is the object that gets passed back and forth by objects (mainly actors?). Parsed tokens? Seems to understand parts of speech in some way.

Used by objects to see what they should do. When an object get's passed a command, it checks for various thing. for example; if cmd.verb == pubverbs.open: self.isOpen = TRUE cmd.Tell(You open <the dirobj>.)

pubverbs.open returns the name of open which is most likely open and cmd.verb holds the string open, taken from the players input. It is quite simple to use but very efficient.

dirobj is short for direct object inobj is short for indirect object all other objects are what they imply

Command
stores references for variarious parts of a command

Methods   
Clear
StuffString
Tell
__init__
__str__
  Clear 
Clear ( self )

clear all references

  StuffString 
StuffString (
        self,
        pStr,
        pFor=None,
        )

function to substitute references used mainly in cmd.Tell of objects

cmd.Tell("I'm a <dirobj>.") will end up printing: I'm a shrubbery. If the dirobj in fact is a shrubbery.

  Tell 
Tell (
        self,
        pToActor='',
        pToOthers='',
        pToThird='',
        pWhoIsThird=None,
        )

The commands Tell Method: usually called with cmd.Tell from objects used by objects to tell us what happens to them

for example: cmd.Tell(self.succ,self.osucc)

will print self.succ to the actor and self.osucc to others in room who are listening.

curious... only things which we can see, can see what we do. rather much a childs point of view =) will have to fix this

  __init__ 
__init__ ( self )

  __str__ 
__str__ ( self )


Table of Contents

This document was automatically generated on Mon Aug 8 17:04:06 2005 by HappyDoc version 2.1