Hi! I have written some simple code to simulate a simple digital camera:
#camera
(name *)
your digital camera
(descr *)
(camera screen shows $Screen)
Your digital camera's screen shows (a $Screen).
(item *)
(proper *)
(* is #heldby #player)
(global variable (camera screen shows []))
(understand [photograph | $Words] as [photograph $Obj])
*(understand $Words as non-all object $Obj)
~(refuse [photograph $])
(prevent [photograph $])
~(#camera is #heldby #player)
You need a camera to do that.
(prevent [photograph #camera])
How do you intend to do that?
(perform [photograph $Obj])
\*CLICK\*
(if) (player can see) (then)
(now) (camera screen shows $Obj)
(else)
(now) (camera screen shows [])
(endif)
What I don’t like is that and
-ing objects results in multiple pictures being taken (and over-writing each other in this simple implementation).
> examine camera
Your digital camera's screen shows nothing.
> photograph apple and banana
Trying to photograph the apple: *CLICK*
Trying to photograph the banana: *CLICK*
> examine camera
Your digital camera's screen shows a banana.
Is there any way to collect the list of objects in an action call, rather than dispatch multiple actions on each object in turn? I’d be very interested in such a thing.