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 | --[[ |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 | A simple window object. |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 | I coded this after the example 'fireplace' and 'cat' objects but they won't show up in SOO in room d2 or any other. |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 | I don't know how to store the window open or not property yet. |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 | |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 | by Manole Paul-Sebastian (brokenthorn) |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 | ]] |
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 | classes.obj_window = |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 | { |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 | _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." }; |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 | _parent = nil; |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 | |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 | kill = function (self, e) |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 | e.person:_say("/me tries to break the window"); |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 | self:_say("/me is unbreakable. Must be break-proof... Hehee ;)"); |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 | end, |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 | |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 | close = function (self, e) |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 | e.person:_say("/me tries to close the "..self._properties.name); |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 | self:_say("/me closes with a loud creak!"); |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 | end, |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 | } |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 | |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 | function classes.obj_window:open(e) |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 | e.person:_say("/me opens the window", false); |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 | self:_say("/me opens quietly"); |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 | end |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 | |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 | classes.obj_window["break"] = classes.obj_window.kill; |
cc66ad6b0d75
Initial commit (importing from old SVN repo which got lost)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 | classes.obj_window.smash = classes.obj_window.kill; |