diff -r 000000000000 -r cc66ad6b0d75 objects/obj_window.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/objects/obj_window.lua Sat Mar 27 17:43:08 2010 +0000 @@ -0,0 +1,32 @@ + +--[[ +A simple window object. +I coded this after the example 'fireplace' and 'cat' objects but they won't show up in SOO in room d2 or any other. +I don't know how to store the window open or not property yet. + +by Manole Paul-Sebastian (brokenthorn) +]] + +classes.obj_window = +{ + _properties = { name = "window", longname = "a large wooden window", desc = "You look at the large wooden window and you can see almost anything going on outside." }; + _parent = nil; + + kill = function (self, e) + e.person:_say("/me tries to break the window"); + self:_say("/me is unbreakable. Must be break-proof... Hehee ;)"); + end, + + close = function (self, e) + e.person:_say("/me tries to close the "..self._properties.name); + self:_say("/me closes with a loud creak!"); + end, +} + +function classes.obj_window:open(e) + e.person:_say("/me opens the window", false); + self:_say("/me opens quietly"); +end + +classes.obj_window["break"] = classes.obj_window.kill; +classes.obj_window.smash = classes.obj_window.kill; \ No newline at end of file