-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathturn.i
79 lines (64 loc) · 1.72 KB
/
turn.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
-- "turn.i"
Add to every object
Is
Not 'on'.
Not switchable.
End add.
Syntax
turn_on1 = turn 'on' (obj)
Where obj IsA object
else "You can't turn that on."
turn_on2 = turn (obj) 'on'
Where obj IsA object
else "You can't turn that on."
switch_on1 = switch 'on' (obj)
Where obj IsA object
else "You can't switch that on."
switch_on2 = switch (obj) 'on'
Where obj IsA object
else "You can't switch that on."
Add to every object
Verb turn_on1, turn_on2, switch_on1, switch_on2
Check obj is not ornamental else
If obj is plural
then say msg:ornamental_response_P1_pl.
else say msg:ornamental_response_P1_sg.
End if.
And obj is switchable
else "You can't turn that on."
And obj is not 'on'
else "It's already on."
Does
Make obj 'on'.
"You turn on" say the obj. "."
End verb.
End add.
Syntax
turn_off1 = turn off (obj)
Where obj IsA object
else "You can't turn that off."
turn_off2 = turn (obj) off
Where obj IsA object
else "You can't turn that off."
switch_off1 = switch off (obj)
Where obj IsA object
else "You can't switch that off."
switch_off2 = switch (obj) off
Where obj IsA object
else "You can't switch that off."
Add to every object
Verb turn_off1, turn_off2, switch_off1, switch_off2
Check obj is not ornamental else
If obj is plural
then say msg:ornamental_response_P1_pl.
else say msg:ornamental_response_P1_sg.
End if.
And obj is switchable
else "You can't turn that off."
And obj is 'on'
else "It's already off."
Does
Make obj not 'on'.
"You turn off" say the obj. "."
End verb.
End add.