objects/obj_oven.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)


classes.obj_oven = { 
				_properties =	{
								name = "oven",
								longname = "an oven",
								desc = "You see a large oven, with various knobs and switches. It looks quite obvious how to TURN ON though :)"
							},
				_parent = "obj_container";
			};
			
classes.obj_oven["turn on"] = function (self, e)
	if self._properties.power == "on" then e.person:_tell("The oven is already on!"); end
	self._properties.power = "on";
	e.person:_action("switches on the oven");
end

classes.obj_oven["turn off"] = function (self, e)
	if self._properties.power ~= "on" then e.person:_tell("The oven is already off!"); end
	self._properties.power = "off";
	e.person:_action("switches off the oven");
end

mercurial