--[[
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;