Sat, 27 Mar 2010 17:43:08 +0000
Initial commit (importing from old SVN repo which got lost)
0
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 | |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 | classes.obj_oven = { |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 | _properties = { |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 | name = "oven", |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 | longname = "an oven", |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 | desc = "You see a large oven, with various knobs and switches. It looks quite obvious how to TURN ON though :)" |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 | }, |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 | _parent = "obj_container"; |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 | }; |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 | |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 | classes.obj_oven["turn on"] = function (self, e) |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 | if self._properties.power == "on" then e.person:_tell("The oven is already on!"); end |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 | self._properties.power = "on"; |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 | e.person:_action("switches on the oven"); |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 | end |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 | |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 | classes.obj_oven["turn off"] = function (self, e) |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 | if self._properties.power ~= "on" then e.person:_tell("The oven is already off!"); end |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 | self._properties.power = "off"; |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 | e.person:_action("switches off the oven"); |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 | end |