diff options
Diffstat (limited to 'demo.stage')
-rw-r--r-- | demo.stage | 28 |
1 files changed, 7 insertions, 21 deletions
@@ -31,21 +31,10 @@ global | |||
31 | { | 31 | { |
32 | if exists(situation.exits) then | 32 | if exists(situation.exits) then |
33 | { | 33 | { |
34 | out = "Obvious exits are: "; | 34 | display( "Obvious exits are: " + join( |
35 | bFirst = true; | 35 | keys( situation.exits ), |
36 | for each dir : dest in situation.exits do | 36 | ", " |
37 | { | 37 | ) ); |
38 | if bFirst then | ||
39 | { | ||
40 | bFirst = false; | ||
41 | } | ||
42 | else | ||
43 | { | ||
44 | out += ", "; | ||
45 | } | ||
46 | out += dir; | ||
47 | } | ||
48 | display( out ); | ||
49 | } | 38 | } |
50 | else | 39 | else |
51 | { | 40 | { |
@@ -77,17 +66,13 @@ global | |||
77 | */ | 66 | */ |
78 | command: "inventory" | 67 | command: "inventory" |
79 | { | 68 | { |
80 | out = 'You are carrying: '; | 69 | out = 'You are carrying: ' + join( player.inventory, ", " ); |
81 | for each item in player.inventory do | ||
82 | { | ||
83 | out += " " + item; | ||
84 | } | ||
85 | display( out ); | 70 | display( out ); |
86 | } | 71 | } |
87 | 72 | ||
88 | // You should always have a global exit, quit, escape, something for | 73 | // You should always have a global exit, quit, escape, something for |
89 | // dev-testing at least. | 74 | // dev-testing at least. |
90 | command: "exit" | 75 | command: "quit" |
91 | { | 76 | { |
92 | exit(); | 77 | exit(); |
93 | } | 78 | } |
@@ -147,6 +132,7 @@ situation <<beachCenter>> | |||
147 | 'east': <<beachEast>>, | 132 | 'east': <<beachEast>>, |
148 | 'west': <<beachWest>> | 133 | 'west': <<beachWest>> |
149 | }; | 134 | }; |
135 | situation.items = ['stick']; | ||
150 | } | 136 | } |
151 | enter | 137 | enter |
152 | { | 138 | { |