diff -r 000000000000 -r cc66ad6b0d75 objects/obj_fireplace.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/objects/obj_fireplace.lua Sat Mar 27 17:43:08 2010 +0000 @@ -0,0 +1,14 @@ + +-- 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 \ No newline at end of file