objects/obj_window.lua

Sat, 27 Mar 2010 17:43:08 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 27 Mar 2010 17:43:08 +0000
changeset 0
cc66ad6b0d75
permissions
-rw-r--r--

Initial commit (importing from old SVN repo which got lost)


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

mercurial