Sat, 27 Mar 2010 17:43:08 +0000
Initial commit (importing from old SVN repo which got lost)
-- This is an example of one way of coding a class, using the { } constructor, see the cat for another method classes.obj_fireplace = { _properties = { name = "fire", longname = "an ornate fireplace", desc = "You see a decorative fireplace, in which a warming fire is burning.", static = true }; _parent = nil; -- This class inherits methods and properties from no other class (except classes.default). If you don't set _parent, this is the default } function classes.obj_fireplace:touch(e) e.person:_say("/me touches the fire", false); -- Everyone else in the room will see this, user will not e.person:_say("Oouuchhh!!!!"); -- By default, all see the message e.person:_tell("That hurt!"); -- Only the user sees this end